Commit Graph
24 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 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
Brandon Liu f442e403c5 add logging struct with -u json options flag, log tiling progress [#13] 2022-07-05 15:32:11 +08:00
Eric Fischer bd2423a5ea Add an option to use a specified feature attribute as the feature ID 2018-11-02 15:21:52 -07:00
Eric Fischer 5dfbc4a281 Add --clip-bounding-box option to clip input geometry 2018-10-22 16:49:33 -07:00
Eric Fischer f1eede1106 Track the last progress update with an atomic type, not volatile 2018-03-13 15:04:28 -07:00
Eric Fischer 834c05038c Add --progress-interval setting to reduce progress indicator frequency 2018-03-13 14:51:48 -07:00
Eric Fischer aaf08a6c55 Add an option to specify the clustering distance directly 2017-12-20 17:33:30 -08:00
Eric Fischer b03dabe098 Add an option for clustering features 2017-12-14 14:30:08 -08:00
Eric Fischer 621e0afc3c Merge branch 'more-warnings' into rate-clarify 2017-11-17 11:21:01 -08:00
Eric Fischer 76d86f7d45 Add an option to quiet the progress indicator but not warnings 2017-11-16 17:08:59 -08:00
Eric Fischer ba62ab8596 More structure initializers 2017-11-07 15:20:17 -08:00
Eric Fischer c79f19e3ca Merge branch 'master' into plugins 2017-08-08 11:08:10 -07:00
Eric Fischer 65c095cc2b Clean up #includes and add fields for counting attributes 2017-07-14 16:56:23 -07:00
Eric Fischer 04d0cc6fa1 Merge branch 'master' into plugins 2017-07-06 22:28:35 -07:00
Eric Fischer cf3a0800b8 Add an option to increase maxzoom if features are still being dropped 2017-05-31 10:47:34 -07:00
Eric Fischer 87d86ecfc9 Set close-on-exec flag for most file descriptors 2016-12-07 10:57:56 -08:00
Eric Fischer f32916c472 Tests of the three current strategies for reducing tile size 2016-10-24 15:33:14 -07:00
Eric Fischer 92cc08a554 Fix some compiler warnings about signed comparisons 2016-10-14 17:11:57 -07:00
Eric Fischer 81d8fe21f8 Fix structure packing to fix polygon dropping 2016-10-11 17:47:53 -07:00
Eric Fischer 5ab41417fc Calculate feature-dropping (except gamma) during geometry reordering 2016-10-10 17:15:33 -07:00
Eric Fischer c4274303ea Fix indentation 2016-04-27 15:10:26 -07:00
Eric Fischer ee97e6c307 Whittle down tile.hpp to the things that actually related to tile.cpp 2016-04-27 15:09:06 -07:00
Eric Fischer 3662f1a66b Split main program functions apart from GeoJSON parsing 2016-04-27 14:59:20 -07:00