Commit bfd57531 authored by Volker Krause's avatar Volker Krause
Browse files

Improve check for closed polygons

This was failing on highway=* areas so far, treating them as (open) ways
and badly messing up clipping as a result of that. This is visible in the
old tiles as well, and affects both Marble's rendering as well as geometry
reassembly.
parent 75fe1f3d
......@@ -94,11 +94,11 @@ private:
copyPlacemark.reset(new GeoDataPlacemark(*placemark));
ring = geodata_cast<T>(copyPlacemark->geometry());
}
bool const isClosed = ring->isClosed() && canBeArea(placemark->visualCategory());
auto const & osmData = placemark->osmData();
bool const isClosed = ring->isClosed() && (canBeArea(placemark->visualCategory()) || osmData.tagValue(QStringLiteral("area")) == QLatin1String("yes"));
if (isClosed && minArea > 0.0 && area(*static_cast<const GeoDataLinearRing*>(ring)) < minArea) {
return;
}
auto const & osmData = placemark->osmData();
using namespace ClipperLib;
Path subject;
QHash<std::pair<cInt, cInt>, const GeoDataCoordinates*> coordMap;
......
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