compare polygon ring areas absolutely
- This ensures we actually keep the largest polygons - Adds testcase that fails without this patch
This commit is contained in:
committed by
John Firebaugh
parent
dfb3c34837
commit
13e5041553
@@ -127,7 +127,7 @@ void limitHoles(GeometryCollection& polygon, uint32_t maxHoles) {
|
||||
polygon.begin() + 1 + maxHoles,
|
||||
polygon.end(),
|
||||
[] (const auto& a, const auto& b) {
|
||||
return signedArea(a) > signedArea(b);
|
||||
return std::fabs(signedArea(a)) > std::fabs(signedArea(b));
|
||||
});
|
||||
polygon.resize(1 + maxHoles);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user