mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
Polygon shards (#105)
* Put all of this back in geometry.cpp for conflict resolution * Stabilize line simplification to behave the same regardless of winding * Round instead of truncating when clipping lines * Restore non-Wagyu polygon clipping from prior to2fdec7d2* Make it round, not truncate, which reverts the last commit's test diffs * Clip in floating point, not integers, which makes no difference * Track nodes added at tile edges during clipping * Scale geometry up before wagyu to prevent changes from precision loss * Actually do the shared edge detection * Fix cases where nodes were not being added at the tile boundary * One more place I should have rounded * Narrow down where the discrepancy comes in * Revert "Narrow down where the discrepancy comes in" This reverts commit 221c4c5fc0ac9a6567e091c6a94b3d87dc8ade83. * Another attempt to narrow it down * The discrepancy seems to be introduced in reordering. No obvious bug * Was still truncating instead of rounding in projection * Also makes no difference... * Just forget that line reversal exists for a minute * Just reversal no coalescing * Try clipping in integers instead of floating point * Don't simplify after coalescing if they said no simplification * Check whether behavior is consistent with intentional simplification * Replace more floating point with integer * Are these three features enough to demonstrate the problem? * Add a few more nearby borders * All the features that touch tile 6/16/23 * Stay in integers in line simplification * More attempts to solve failures to simplify consistently * Fix most of the overflow errors * Fix known cases of integer overflow * All the tests change again * Pull clipping and scaling code back out into clip.cpp * Resolve the test conflicts * Stabilize choice of which three points to keep with different windings * Almost right, I think! * Fix collapse of islands to shards * Self-intersections in the same feature don't count * Revert "Self-intersections in the same feature don't count" This reverts commite04b19916e. * Don't scale down geometry if we are going to look for shared nodes * Fix the missing multiply that was keeping simplification from happening * Fix one more opportunity for overflow * Somehow I deleted this test? * Lost this test too * Clean up debugging printfs * Restore code sequence from main to make it reviewable * Remove unneeded rounding * Update documentation * This test is no longer useful * Back to floating point Douglas-Peucker to fix undersimplification * Try an older ubuntu * Revert "Try an older ubuntu" This reverts commit13fefacfd7. * Log OS info * Remove tests that are no longer needed * Oops, did need that one after all * Fix the arm vs x86 discrepancy? * Try another quantization * Cleanup from review * Add a test for the actual purpose of this PR
This commit is contained in:
+2
-2
@@ -629,7 +629,7 @@ the line or polygon within one tile unit of its proper location. You can probabl
|
||||
.IP \(bu 2
|
||||
\fB\fC\-\-simplification\-at\-maximum\-zoom=\fR\fIscale\fP: Use the specified \fIscale\fP at maxzoom instead of the standard simplification scale (which still applies at lower zooms)
|
||||
.IP \(bu 2
|
||||
\fB\fC\-pn\fR or \fB\fC\-\-no\-simplification\-of\-shared\-nodes\fR: Don't simplify away nodes that appear in more than one feature or are used multiple times within the same feature, so that the intersection node will not be lost from intersecting roads. (This will not be effective if you also use \fB\fC\-\-coalesce\fR or \fB\fC\-\-detect\-shared\-borders\fR\&.)
|
||||
\fB\fC\-pn\fR or \fB\fC\-\-no\-simplification\-of\-shared\-nodes\fR: Don't simplify away nodes that appear in more than one feature or are used multiple times within the same feature, so that the intersection node will not be lost from intersecting roads. (This will not be effective if you also use \fB\fC\-\-coalesce\fR\&.) For polygons, the vertices where polygon rings meet will be detected, and the shared edges between the polygons will be simplified identically if possible. Use this instead of \fB\fC\-\-detect\-shared\-borders\fR\&.
|
||||
.IP \(bu 2
|
||||
\fB\fC\-pt\fR or \fB\fC\-\-no\-tiny\-polygon\-reduction\fR: Don't combine the area of very small polygons into small squares that represent their combined area.
|
||||
.IP \(bu 2
|
||||
@@ -642,7 +642,7 @@ the line or polygon within one tile unit of its proper location. You can probabl
|
||||
.SS Attempts to improve shared polygon boundaries
|
||||
.RS
|
||||
.IP \(bu 2
|
||||
\fB\fC\-ab\fR or \fB\fC\-\-detect\-shared\-borders\fR: In the manner of TopoJSON \[la]https://github.com/mbostock/topojson/wiki/Introduction\[ra], detect borders that are shared between multiple polygons and simplify them identically in each polygon. This takes more time and memory than considering each polygon individually.
|
||||
\fB\fC\-ab\fR or \fB\fC\-\-detect\-shared\-borders\fR: DEPRECATED. In the manner of TopoJSON \[la]https://github.com/mbostock/topojson/wiki/Introduction\[ra], detect borders that are shared between multiple polygons and simplify them identically in each polygon. This takes more time and memory than considering each polygon individually. Use \fB\fCno\-simplification\-of\-shared\-nodes\fR instead, which is faster and more correct.
|
||||
.IP \(bu 2
|
||||
\fB\fC\-aL\fR or \fB\fC\-\-grid\-low\-zooms\fR: At all zoom levels below \fImaxzoom\fP, snap all lines and polygons to a stairstep grid instead of allowing diagonals. You will also want to specify a tile resolution, probably \fB\fC\-D8\fR\&. This option provides a way to display continuous parcel, gridded, or binned data at low zooms without overwhelming the tiles with tiny polygons, since features will either get stretched out to the grid unit or lost entirely, depending on how they happened to be aligned in the original data. You probably don't want to use this.
|
||||
.RE
|
||||
|
||||
Reference in New Issue
Block a user