Skip to content

Commit e582f9d

Browse files
authored
Fix filter_area when used with combine_polygons_below (#814)
1 parent 8d372c0 commit e582f9d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/tile_worker.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -329,11 +329,6 @@ void ProcessObjects(
329329
continue;
330330
}
331331

332-
if (oo.oo.geomType == POLYGON_ && filterArea > 0.0) {
333-
RemovePartsBelowSize(boost::get<MultiPolygon>(g), filterArea);
334-
if (geom::is_empty(g)) continue;
335-
}
336-
337332
//This may increment the jt iterator
338333
if (oo.oo.geomType == LINESTRING_ && zoom < sharedData.config.combineBelow) {
339334
// Append successive linestrings, then reorder afterwards
@@ -361,6 +356,11 @@ void ProcessObjects(
361356
oo = *jt;
362357
}
363358

359+
if (oo.oo.geomType == POLYGON_ && filterArea > 0.0) {
360+
RemovePartsBelowSize(boost::get<MultiPolygon>(g), filterArea);
361+
if (geom::is_empty(g)) continue;
362+
}
363+
364364
if (oo.oo.geomType == LINESTRING_ || oo.oo.geomType == MULTILINESTRING_)
365365
writeMultiLinestring(attributeStore, sharedData, vtLayer, bbox, oo, zoom, simplifyLevel, simplifyAlgo, boost::get<MultiLinestring>(g));
366366
else if (oo.oo.geomType == POLYGON_)

0 commit comments

Comments
 (0)