diff options
author | Dane Springmeyer <dane@mapbox.com> | 2017-01-06 17:51:35 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-02-09 10:40:30 -0600 |
commit | 13e504155330fe0c0e6963a10c7f4e99d3d1696a (patch) | |
tree | 3f5b216bf04894a3c0014eb122755f27e8bb2fc1 /src | |
parent | dfb3c34837ca6b59ebafd7f03dfe3cf23a7955ea (diff) | |
download | qtlocation-mapboxgl-13e504155330fe0c0e6963a10c7f4e99d3d1696a.tar.gz |
compare polygon ring areas absolutelynode-v3.4.4-13e504
- This ensures we actually keep the largest polygons
- Adds testcase that fails without this patch
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/tile/geometry_tile_data.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mbgl/tile/geometry_tile_data.cpp b/src/mbgl/tile/geometry_tile_data.cpp index 2e465a6f65..ebf27e7858 100644 --- a/src/mbgl/tile/geometry_tile_data.cpp +++ b/src/mbgl/tile/geometry_tile_data.cpp @@ -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); } |