mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 16:35:40 +02:00
More commenting to stop confusing myself about hole logic
This commit is contained in:
+4
-2
@@ -221,8 +221,10 @@ drawvec reduce_tiny_poly(drawvec &geom, int z, int detail, bool *reduced, double
|
||||
// in a tiny polygon rather than letting it represent itself,
|
||||
// OR it is an inner ring and we haven't output an outer ring for it to be
|
||||
// cut out of, so we are just subtracting its area from the tiny polygon
|
||||
// rather than trying to deal with it geometrically
|
||||
if ((area > 0 && area <= pixel * pixel) || (area < 0 && -area <= pixel * pixel && !included_last_outer)) {
|
||||
// rather than trying to deal with it geometrically (even if it is too big
|
||||
// to really be considered a tiny polygon, which shouldn't happen because
|
||||
// it should be smaller than its outer ring, which was considered tiny).
|
||||
if ((area > 0 && area <= pixel * pixel) || (area < 0 && !included_last_outer)) {
|
||||
// printf("area is only %f vs %lld so using square\n", area, pixel * pixel);
|
||||
|
||||
*accum_area += area;
|
||||
|
||||
@@ -12,4 +12,9 @@
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 0, "x": 0, "y": 0 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 100.810547, 0.790990 ], [ 100.810547, 0.175781 ], [ 100.195312, 0.175781 ], [ 100.195312, 0.790990 ], [ 100.810547, 0.790990 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
] }
|
||||
|
||||
Reference in New Issue
Block a user