| 38 | } |
| 39 | |
| 40 | void Translator::Emit(OsmElement const & src) |
| 41 | { |
| 42 | // Make a copy because it will be modified below. |
| 43 | OsmElement element(src); |
| 44 | |
| 45 | Preprocess(element); // Might use replaced_tags.txt via a TagReplacer. |
| 46 | if (!m_filter->IsAccepted(element)) |
| 47 | return; |
| 48 | |
| 49 | m_tagsEnricher(element); |
| 50 | m_collector->Collect(element); |
| 51 | m_featureMaker->Add(element); // A feature is created from OSM tags. |
| 52 | feature::FeatureBuilder feature; |
| 53 | while (m_featureMaker->GetNextFeature(feature)) |
| 54 | { |
| 55 | if (!m_filter->IsAccepted(feature)) |
| 56 | continue; |
| 57 | |
| 58 | // Pass non-modified source element. |
| 59 | m_collector->CollectFeature(feature, src); |
| 60 | m_processor->Process(feature); |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | void Translator::Finish() |
| 65 | { |
no test coverage detected