| 86 | } |
| 87 | |
| 88 | void BuildingPartsCollector::CollectFeature(feature::FeatureBuilder const & fb, OsmElement const &) |
| 89 | { |
| 90 | static auto const & buildingChecker = ftypes::IsBuildingChecker::Instance(); |
| 91 | if (!fb.IsArea() || !buildingChecker(fb.GetTypes())) |
| 92 | return; |
| 93 | |
| 94 | auto const topId = FindTopRelation(fb.GetMostGenericOsmId()); |
| 95 | if (topId == base::GeoObjectId()) |
| 96 | return; |
| 97 | |
| 98 | auto parts = FindAllBuildingParts(topId); |
| 99 | if (!parts.empty()) |
| 100 | { |
| 101 | BuildingParts bp; |
| 102 | bp.m_id = MakeCompositeId(fb); |
| 103 | bp.m_buildingParts = std::move(parts); |
| 104 | |
| 105 | BuildingParts::Write(*m_writer, bp); |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | std::vector<base::GeoObjectId> BuildingPartsCollector::FindAllBuildingParts(base::GeoObjectId const & id) |
| 110 | { |
nothing calls this directly
no test coverage detected