Commit 9f697227 authored by Volker Krause's avatar Volker Krause Committed by Torsten Rahn
Browse files

Don't discard non-visual multi-polygon parts with tags during OSM loading

Those are extremely rare, and obviously have no visual impact in Marble,
but they do contain valuable information for other users of the vector
tiles.

An example are railway=platform_edge segments of railway platforms (and
that's actually the only case affected by this I have found so far), and
that's about 1.5k elements for all of Germany, so not an amount that would
matter in the big picture.
parent 507171b5
......@@ -90,8 +90,9 @@ void OsmRelation::createMultipolygon(GeoDataDocument *document, OsmWays &ways, c
for (auto wayId: outerWays) {
Q_ASSERT(ways.contains(wayId));
GeoDataPlacemark::GeoDataVisualCategory const category = StyleBuilder::determineVisualCategory(ways[wayId].osmData());
if (category == GeoDataPlacemark::None || category == outerCategory) {
const auto &osmData = ways[wayId].osmData();
GeoDataPlacemark::GeoDataVisualCategory const category = StyleBuilder::determineVisualCategory(osmData);
if ((category == GeoDataPlacemark::None || category == outerCategory) && osmData.isEmpty()) {
// Schedule way for removal: It's a non-styled way only used to create the outer boundary in this polygon
usedWays << wayId;
} // else we keep it
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment