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

Fix reading of GeoJson multi-polygons

parent 9febf722
......@@ -68,11 +68,11 @@ QPolygonF GeoJson::readOuterPolygon(const QJsonObject &obj)
const auto coordinates = obj.value(QLatin1String("coordinates")).toArray();
QPolygonF poly;
for (const auto &polyV : coordinates) {
const auto polyCoords = polyV.toArray();
if (polyCoords.empty()) {
const auto polyElements = polyV.toArray();
if (polyElements.empty()) {
return {};
}
auto subPoly = readPolygonCoordinates(polyCoords);
auto subPoly = readPolygonCoordinates(polyElements.at(0).toArray());
poly = poly.empty() ? std::move(subPoly) : poly.united(subPoly);
}
return poly;
......
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