* Change sqlite3 schema to deduplicate identical tiles
* Limit guessed maxzoom to avoid spending too many tiles on polygon fill
* Fix test.
These dust polygons now have their area calculated because their
maxzoom is being guessed, so the attributes from the largest one
rather than the last one are preserved.
* Increase polygon limit to a million tiles
* Two million tiles ought to be enough for anyone, right?
* Add explanatory comments for mysterious numbers
* Generate labels points after simplification, not before.
Previously there were some cases where dropping the smallest
polygons would never reduce the number of labels.
* Also wait until after polygon cleaning to make labels
* Remove the extra newlines after the TILES ONLY COMPLETE message
* Add an option to generate label points in place of polygons
* Change all these places where I said "extent" but really meant "area"
* Revert "Change all these places where I said "extent" but really meant "area""
This reverts commit 403828d2f7c8fc21329f76408abf1ae61b6faf86.
* Add --order-smallest-first and --order-largest-first options
* Use Turf's center-of-mass algorithm for polygon label points
* If the label point isn't within the polygon, find one that is
* Don't choose a label point that is too close to a border
* Try a little harder to find an optimal label point
* Checkerboard which tiles labels are generated in, to reduce adjacency
* Use a label point for the general representative point for polygons
(Skipping the iteration to find one that is as far as possible from
the borders)
This makes the labels look better in many cases (like France at z1)
but unfortunately ripples into changing the sequence of polygons in
many tests, so the diff is big.
* Revert "Use a label point for the general representative point for polygons"
This reverts commit 2261adf05eba1d454f6792f08e1e107f4b8342b5.
* Checkpoint work on spiral labels
* Clip label spirals to the feature bounds
* Fix label test
* Be careful not to place spiral labels too close to borders either
* For spiral anchors, only check tile scale, not feature size
* Update test
* Only try to find a central label point for the largest ring
* In tiny polygon dust, keep the attributes of the largest feature
* Improve precision of get_area by using long double
* Trying to get consistent polygon area results between ARM and x86
* Calculate polygon area closer to the origin for better precision
* Update changelog
* Also exercise tiny polygon dust in the ring area test
They previously behaved differently here between x86 and ARM
* On M1 Macs, long double is just double anyway, so don't use it
* Be more careful about overflow: scale the polygon ring down into range
* Fix the bug I just introduced in the scaled area calculation
* Use only the sign from the scaled-down area calculation
Co-authored-by: Roman Karavia <47303530+romankaravia@users.noreply.github.com>
* First attempt at porting Paul Mach's Visvalingam implementation
* Make indent
* Mostly working
* Approximate equivalence from Douglas-Peucker to Visvalingam levels
* Don't simplify away tile boundary crossing points
* Add a command-line option and test for Visvalingam simplification
* Update changelog
* Cleanup in response to review feedback
* Include <stdio.h> to fix compiler warnings
* Stop adding features to a tile if it can't possibly work
* Add --integer and --fraction options to tippecanoe-decode
* Carry the strategies field from tileset metadata through tile-join
* Update changelog
* Assign different codes to different kinds of error exits
* Reduce maxzooms being guessed a little:
* Use 1.5 standard deviations, not 2, as the minimum distinguishable
* Give overlapping polygons and linestrings more distinct indices
* Add another drop rate guessing options, from the same metrics -zg uses
* Guard against using -rp without -zg
* Add an option to retain extra coordinate precision at maxzoom
* Make sure not to shift away the extra detail from coordinates
* Add an option to convert double-precision attributes to single
* Sort attribute values in tiles to make them compress a little better
* Slightly improve polygon simplification
By choosing a point that would be retained after simplification
to be the start/end point that always gets retained
* I regret making all of these tests involve polygons
* Add an option to specify the size of tiny polygons
* Fix accidental requiring of argument for --single-precision
* Guard against duplicate points when generating "sizes" for them
* Restore the intended behavior that tiny polygons don't get simplified
* Make the extra detail settable rather than always maximizing it
* Revert "Improve maxzoom guessing for tightly-clustered point data sources (#4)"
This reverts commit fec5e8354cff7ab6d64f00ea7db6da21c5c732c6.
* Add an option to prevent choosing a base zoom higher than the maxzoom
* Keep the drop rate high enough when the basezoom gets constrained
* Revert "Revert "Improve maxzoom guessing for tightly-clustered point data sources (#4)""
This reverts commit db6bc27d9e5bd6b5a218ba9a07117b4f1abb75fb.
* Add --order-by and --order-descending options
* Accept multiple --order-by and --order-descending-by sort keys
* Improve maxzoom guessing for tightly-clustered point data sources
* Go back to the old distance estimate, since it is less mysterious
* Update changelog and version
* Add --maximum-zoom-at-least to specify a minimum maxzoom to guess
* Check whether the specified minimum maxzoom is out of range
* Rename the option to --smallest-maximum-zoom-guess
* Update tests, changelog, and version
* Handle points too when dropping or coalescing the "smallest" features.
* Add statistics of tile size reduction strategies to tileset metadata
* Update changelog and version
* Update documentation
* Change JSON objects to a union type to use less memory
* Stop storing the string representation of JSON numbers
* Restore the ability to create features with large integer attributes
* Make sure large-integer feature IDs still behave as before
* Add missing #include
* Don't preallocate as much space for arrays and objects
* Treat inability to check free disk space as a warning, not an error
* Update changelog and version