| 128 | } |
| 129 | |
| 130 | void Process(feature::FeatureBuilder & fb) |
| 131 | { |
| 132 | auto const forcePushToWorld = generator::FilterWorld::IsPopularAttraction(fb, m_popularPlacesFilename) || |
| 133 | generator::FilterWorld::IsInternationalAirport(fb); |
| 134 | |
| 135 | if (!m_worldBucket.NeedPushToWorld(fb) && !forcePushToWorld) |
| 136 | return; |
| 137 | |
| 138 | if (!m_boundaryChecker.IsBoundaries(fb)) |
| 139 | { |
| 140 | // Save original feature iff we need to force push it before PushFeature(fb) modifies fb. |
| 141 | feature::FeatureBuilder originalFeature; |
| 142 | if (forcePushToWorld) |
| 143 | originalFeature = fb; |
| 144 | |
| 145 | if (!PushFeature(fb) && forcePushToWorld) |
| 146 | { |
| 147 | // We push Point with all the same tags, names and center instead of Line/Area, |
| 148 | // because we do not need geometry for invisible features (just search index and placepage |
| 149 | // data) and want to avoid size checks applied to areas. |
| 150 | if (!originalFeature.IsPoint()) |
| 151 | generator::TransformToPoint(originalFeature); |
| 152 | |
| 153 | m_worldBucket.PushSure(originalFeature); |
| 154 | } |
| 155 | } |
| 156 | else |
| 157 | { |
| 158 | std::vector<feature::FeatureBuilder> boundaryParts; |
| 159 | m_boundaryChecker.ProcessBoundary(fb, boundaryParts); |
| 160 | for (auto & f : boundaryParts) |
| 161 | PushFeature(f); |
| 162 | } |
| 163 | } |
| 164 | |
| 165 | bool PushFeature(feature::FeatureBuilder & fb) |
| 166 | { |
nothing calls this directly
no test coverage detected