Changeset View
Changeset View
Standalone View
Standalone View
src/plugins/runner/osm/translators/OsmDocumentTagTranslator.cpp
Context not available. | |||||
20 | #include "GeoDataGeometry.h" | 20 | #include "GeoDataGeometry.h" | ||
---|---|---|---|---|---|
21 | #include "GeoDataPoint.h" | 21 | #include "GeoDataPoint.h" | ||
22 | #include "GeoDataPolygon.h" | 22 | #include "GeoDataPolygon.h" | ||
23 | #include "GeoDataBuilding.h" | ||||
24 | #include "GeoDataMultiGeometry.h" | ||||
23 | #include "GeoDataPlacemark.h" | 25 | #include "GeoDataPlacemark.h" | ||
24 | #include "GeoDataLinearRing.h" | 26 | #include "GeoDataLinearRing.h" | ||
25 | #include "GeoDataTypes.h" | 27 | #include "GeoDataTypes.h" | ||
Context not available. | |||||
56 | 58 | | |||
57 | for (auto const & relation: converter.relations()) { | 59 | for (auto const & relation: converter.relations()) { | ||
58 | if (auto placemark = geodata_cast<GeoDataPlacemark>(relation.first)) { | 60 | if (auto placemark = geodata_cast<GeoDataPlacemark>(relation.first)) { | ||
59 | auto polygon = geodata_cast<GeoDataPolygon>(placemark->geometry()); | 61 | if (const auto building = geodata_cast<GeoDataBuilding>(placemark->geometry())) { | ||
60 | Q_ASSERT(polygon); | 62 | auto polygon = geodata_cast<GeoDataPolygon>(&building->multiGeometry()->at(0)); | ||
61 | OsmRelationTagWriter::writeMultipolygon(*polygon, relation.second, writer ); | 63 | Q_ASSERT(polygon); | ||
64 | OsmRelationTagWriter::writeMultipolygon(*polygon, relation.second, writer ); | ||||
65 | } else { | ||||
66 | auto polygon = geodata_cast<GeoDataPolygon>(placemark->geometry()); | ||||
67 | Q_ASSERT(polygon); | ||||
68 | OsmRelationTagWriter::writeMultipolygon(*polygon, relation.second, writer ); | ||||
69 | } | ||||
62 | } | 70 | } | ||
63 | } | 71 | } | ||
64 | 72 | | |||
Context not available. |