Skip to content
This repository has been archived by the owner on Oct 5, 2024. It is now read-only.

Commit

Permalink
Fix for building Relation geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
emi420 committed Mar 6, 2024
1 parent 56601d7 commit 4a535e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/raw/queryraw.cc
Original file line number Diff line number Diff line change
Expand Up @@ -633,8 +633,8 @@ void QueryRaw::buildGeometries(std::shared_ptr<OsmChangeFile> osmchanges, const
}
auto way = osmchanges->waycache.at(mit->ref);

if (boost::geometry::num_points(way->linestring) == 0 &&
boost::geometry::num_points(way->polygon) == 0
if ((!isMultiPolygon && boost::geometry::num_points(way->linestring) == 0) ||
(isMultiPolygon && boost::geometry::num_points(way->polygon) == 0)
) {
noWay = true;
break;
Expand All @@ -653,7 +653,7 @@ void QueryRaw::buildGeometries(std::shared_ptr<OsmChangeFile> osmchanges, const
}

geometry.erase(geometry.size() - 1);
if (first && (mit->role == "outer" || mit->role == "")) {
if (first && (mit->role == "outer")) {
geometry_str += geometry + ",";
} else {
if (mit->role == "inner") {
Expand Down

0 comments on commit 4a535e4

Please sign in to comment.