Commit Graph
23 Commits
Author SHA1 Message Date
Erica Fischer b763625862 Add an option to generate label points in place of polygons (#20)
* 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 403828d2f7.

* 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 2261adf05e.

* 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
2022-10-13 14:21:36 -07:00
Erica Fischer 073700aa38 Reduce maxzooms being guessed a little: (#2)
* 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
2022-09-08 15:47:32 -07:00
Erica Fischer a447dfc089 Extra coordinate precision; feature ordering; compression improvements
* 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 fec5e8354c.

* 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 db6bc27d9e.

* Add --order-by and --order-descending options

* Accept multiple --order-by and --order-descending-by sort keys
2022-09-06 13:08:11 -07:00
Eric Fischer 4f7459c797 Record the command line options in the tileset metadata 2019-04-04 17:03:36 -07:00
Eric Fischer e9eca57393 Upgrade to Wagyu 0.4.3 2018-07-31 17:47:52 -07:00
Eric Fischer 759bceb986 Duplicate features within the buffer of the antimeridian on both sides 2018-07-27 16:14:49 -07:00
Eric Fischer d1a0e495ce Require that per-feature maxzoom and minzoom be small integers
Also fixes a place in the Makefile that accidentally still used
CFLAGS instead of CXXFLAGS
2018-07-12 11:24:30 -07:00
Eric Fischer 262fbf26f0 Fix missing null pointer check 2018-06-19 13:10:58 -07:00
Eric Fischer c217a77b0a Add UTF-8 and UTF-16 emoji to a test 2017-11-03 15:13:08 -07:00
Eric Fischer ee6da93494 Fix error when parsing attributes with empty-string keys 2017-10-13 11:22:15 -07:00
Eric Fischer 607ea6c643 Lower the precision of all test input coordinates to 6 decimal digits 2017-08-30 10:31:51 -07:00
Eric Fischer 15a48e67d6 Canonicalize numbers in stringified attributes so geobuf can match 2017-08-29 17:40:57 -07:00
Eric Fischer cc28bbab3a Move the tilestats into the "json" row of the metadata 2017-07-26 09:54:49 -07:00
Eric Fischer 7b03e1ee87 Include tilestats in the metadata table. (Not all tests are passing) 2017-07-19 13:09:47 -07:00
Eric Fischer bdac4d4e80 Upgrade Wagyu to bfbf2893 2017-01-04 16:33:43 -08:00
Eric Fischer a4f5406cfb Switch polygon topology correction from Clipper to Wagyu 2016-12-07 14:29:09 -08:00
Eric Fischer 9fbc7b9a55 Add an ignored third coordinate to improve code coverage 2016-10-26 15:33:46 -07:00
Eric Fischer ae50abefc4 Add layer version and extent to tippecanoe-decode output and test standards 2016-06-16 12:50:08 -07:00
Eric Fischer 24327e195f Fix area calculation for polygon rings in tippecanoe-decode 2016-05-10 12:13:03 -07:00
Eric Fischer 4f01b13fe1 Let zoom level 0 have just as much extent and buffer as any other zoom 2016-05-09 16:01:10 -07:00
Eric Fischer 64faa1d79e Upgrade Clipper to 68c49e9a9a 2016-04-07 13:52:39 -07:00
Eric Fischer 707036fe79 Upgrade Clipper to 07b828b1 to fix self-intersecting polygons 2016-03-18 16:35:29 -07:00
Eric Fischer 0fcd2d9a79 Test for crossing the date line, property encodings, zoom level filters 2016-03-02 14:57:03 -08:00