Commit Graph
1844 Commits
Author SHA1 Message Date
Erica Fischer 2261adf05e 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.
2022-10-07 12:11:12 -07:00
Erica Fischer 2f0c9bf9c8 Checkerboard which tiles labels are generated in, to reduce adjacency 2022-10-07 11:00:09 -07:00
Erica Fischer c34348218f Try a little harder to find an optimal label point 2022-10-06 13:05:38 -07:00
Erica Fischer ffd07befce Don't choose a label point that is too close to a border 2022-10-06 11:46:10 -07:00
Erica Fischer 7127f8af97 If the label point isn't within the polygon, find one that is 2022-10-06 11:27:44 -07:00
Erica Fischer dd43a8d79a Use Turf's center-of-mass algorithm for polygon label points 2022-10-05 19:02:30 -07:00
Erica Fischer ce54668d7c Add --order-smallest-first and --order-largest-first options 2022-10-05 10:43:10 -07:00
Erica Fischer daf5992e3b Revert "Change all these places where I said "extent" but really meant "area""
This reverts commit 403828d2f7.
2022-10-04 16:24:25 -07:00
Erica Fischer 403828d2f7 Change all these places where I said "extent" but really meant "area" 2022-10-04 16:12:33 -07:00
Erica Fischer 1885f989bf Add an option to generate label points in place of polygons 2022-10-04 16:02:31 -07:00
Erica FischerandRoman Karavia 182093bdc7 Improve precision of polygon area calculations (#19)
* 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>
2.8.1
2022-10-04 10:04:34 -07:00
Erica Fischer a6abb0bc30 Add the option to use a different simplification level at maxzoom (#17)
* Add an option to specify a different simplification at maxzoom

* Add test
2022-10-03 12:18:02 -07:00
Erica Fischer 4ef430b913 Add an option for the Visvalingam simplification algorithm (#16)
* 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
2022-09-30 12:00:07 -07:00
Erica Fischer 6de00c15ec Fix tests that I missed updating in 2.6.2 (#15) 2022-09-27 10:37:02 -07:00
Erica Fischer 3086838a10 Fix wrong-way comparison that was causing buffer overflow crash in tile-join (#14)
* Fix wrong-way comparison that was causing buffer overflow in tile-join

* Update changelog
2.6.3
2022-09-27 09:15:54 -07:00
Erica Fischer af1a7ed7ae Once features can't possibly fit in a tile, stop trying (#9)
* 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
2.6.2
2022-09-23 20:01:13 -04:00
Vincent Sarago ed31b9ac84 Update README.md (#13)
protomaps -> felt
2022-09-23 19:54:57 -04:00
Erica Fischer 8e46650da7 Upgrade to protozero 1.7.1 (#5)
* Upgrade to protozero 1.7.1

* Bump version number
2022-09-13 11:24:01 -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
2.6.0
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
2.5.0
2022-09-06 13:08:11 -07:00
Erica Fischer 4ea8a37611 Accept tilestats limiting options in tile-join, not just tippecanoe (#8) 2.4.1 2022-08-12 13:57:04 -07:00
Erica Fischer fec5e8354c Improve maxzoom guessing for tightly-clustered point data sources (#4)
* 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
2022-08-11 10:13:54 -07:00
Erica Fischer a9bf6cacd4 Add --smallest-maximum-zoom-guess to specify a minimum maxzoom to guess (#2)
* 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
2022-08-11 10:04:03 -07:00
Erica Fischer 86f3e98c02 Track the desired tile size for each zoom level in tileset metadata (#7) 2022-08-11 09:58:00 -07:00
Erica Fischer c65d6938a4 Drop or coalesce points too when dropping or coalescing smallest (#6)
* 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
2022-08-09 15:29:03 -07:00
Erica Fischer 67cd9d8d85 Reduce tippecanoe memory usage (#5)
* 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
2022-08-09 15:18:51 -07:00
Erica Fischer 6978a0e102 Reindent with clang-format (#3) 2022-07-28 11:19:30 -07:00
Brandon Liu e6ab02ddd3 lambda default progress is public [#13] 2022-07-06 12:21:12 +08:00
Brandon Liu fbc7b02123 improvements to lambda wrapper [#13] 2022-07-05 21:26:13 +08:00
Brandon Liu f442e403c5 add logging struct with -u json options flag, log tiling progress [#13] 2022-07-05 15:32:11 +08:00
Brandon Liu 4adb22b74e suppress flatgeobuf message 2022-07-05 15:32:00 +08:00
Brandon Liu 9875ae97a8 add lambda info 2022-05-17 15:29:38 +08:00
Brandon Liu d04bd09d11 fix struct name collision [#12] 2022-04-27 22:14:22 +08:00
Brandon Liu 7c726e4d2c add missing column types [#2] 2022-04-23 13:26:26 +08:00
Brandon Liu 170ddf73ff comments cleanup 2022-04-02 12:28:28 +08:00
Brandon Liu 7f678502af FlatGeobuf: read files with heterogeneous geometry types [#8] 2022-04-02 12:07:22 +08:00
Brandon Liu 19241f8373 FlatGeobuf: if fgb has index, assign feature IDs based on sequence number [#2] 2022-03-30 12:37:55 +08:00
Brandon Liu fe6f21fe55 FlatGeobuf: support Point geometries [#2] 2022-03-28 00:01:08 +08:00
Brandon Liu cc52f65939 update man page to reflect new README 2022-03-27 21:53:50 +08:00
Brandon Liu 9bf3326764 update README clone path 2022-03-27 21:53:20 +08:00
Brandon Liu 155f129616 readme updates 2022-03-27 19:27:41 +08:00
Brandon Liu bb2aa65bcc version 2.1.0 2022-03-27 19:26:22 +08:00
Brandon Liu 35b576d0fd Merge pull request #10 from protomaps/flatgeobuf
FlatGeobuf input support [#2]
2022-03-27 19:22:49 +08:00
Brandon Liu e5856398dd update LICENSE to reflect fork. 2022-03-27 19:21:05 +08:00
Brandon Liu e1a5fd1221 README changes for FlatGeobuf [#2] 2022-03-27 19:18:09 +08:00
Brandon Liu d2951d3437 FlatGeobuf style fixup, fix starting of queue with few features, buffer verification [#2,#6] 2022-03-27 19:14:35 +08:00
Brandon Liu 6e6cd29399 FlatGeobuf multithreading [#2] 2022-03-27 19:14:27 +08:00
Brandon Liu 245570feff FlatGeobuf multipoints [#2] 2022-03-27 19:13:43 +08:00
Brandon Liu 33a9aef758 Handle indeterminate length FlatGeobuf headers, linestring geometries [#2] 2022-03-27 19:13:22 +08:00
Brandon Liu b350a8dda7 FlatGeobuf MultiPolygon parsing [#2] 2022-03-27 19:13:12 +08:00