Commit Graph
1909 Commits
Author SHA1 Message Date
Erica Fischer 694bc9ddbb Remove feature with different rounding error on Mac vs x86 2023-10-28 13:12:58 -07:00
Erica Fischer 608859eab8 Add tests for polygons that would otherwise collapse away 2023-10-28 12:59:38 -07:00
Erica Fischer fad5eec726 Add a test to confirm that continuous polygons do not get buffered out 2023-10-28 12:55:37 -07:00
Erica Fischer c2d6760639 Fix the check for continuous polygons 2023-10-28 11:41:21 -07:00
Erica Fischer 23009c2cca Make it a little thicker.
Don't change the tiny polygon rules unless the option is set
2023-10-27 23:00:18 -07:00
Erica Fischer 6c58ae4162 Add --buffer-polygons-outward 2023-10-27 22:39:01 -07:00
Erica Fischer 089be8aff1 Merge branch 'main' into round-outward 2023-10-27 22:01:13 -07:00
Erica Fischer e1c665b35d Only detect longitude wraparound within each ring. (#150)
* Only detect longitude wraparound within each ring.

Between rings it's OK to jump around from one side of the world
to the other.

* Add test

* Update changelog
2.35.0
2023-10-17 12:04:47 -07:00
Erica Fischer 3e6fcf13ad I think it actually behaves now 2023-10-16 14:38:44 -07:00
Erica Fischer 9254f81f77 Merge branch 'main' into round-outward 2023-10-16 13:16:07 -07:00
Erica Fischer 0ca14086a9 Pull from the back of the list of tiles to overzoom, not the front (#149) 2.34.1 2023-10-04 14:59:19 -07:00
Erica Fischer cc5c1c79df Speed up overzooming in tile-join (#147)
* Clip away entire features by bbox. Avoid unnecessary recompression.

* Move parent tile decoding in tile-join out of overzoom proper

* An ever-growing cache of parent tiles

* Limit the size of the cache

* Remove the current reader *before* checking if we can run the queue

* Clean up

* Add missing #include

* Add comment

* When the tile-join cache fills up, evict the least recently used

* Fix microsecond math

* Factoring out tile-join's cache for testing

* Add unit tests for tile-join cache

* Update changelog and version
2.34.0
2023-10-04 12:14:22 -07:00
Erica Fischer 26bf08deb2 Externalizing polygon shard detection (#146)
* Start of externalizing polygon shard detection

* Completely untested external quicksort

* Add unit test for external quicksort

* Remember to clean up temporary files

* Sort and scan the vertices

* Bring over more vertex logic

* Make nodes from vertices

* Checkpoint on switching over to global shared nodes

* Do the thing

* Revert unintended change to coalesced linestring behavior

* Take shared nodes into account in early simplification

* Let it do more sorting in memory

* Fix overnoding of collinear linestrings

* Remove duplicate nodes, since only duplicate vertices now matter

* Remember to delete temporary files

* Fix out of bounds memory access below, apparently

* Fix the actual undefined behavior

* Still running out of memory in one case. Find out where.

* Forgot the conditional

* Try again to make it not run out of memory

* Update version and changelog
2.33.0
2023-10-03 10:53:12 -07:00
hfs dcc3a11915 Fix "make test": build required binaries first (#143)
When running "make test" in a pristine working copy, the "test" target
calls the "raw-tiles-test" target, which tries to execute ./tile-join.
But that binary has not been built, yet, at this point. The target fails
with an error.

Add the required binaries as dependencies to the test targets in the
Makefile. This makes sure that they are built before they are attempted
to be executed.
2023-10-02 10:47:32 -07:00
Erica Fischer 581b61f9aa Low zooms are OK now; medium zooms are still dropping sometimes 2023-09-26 12:39:21 -07:00
Erica Fischer f7dc7faf31 Reduce memory use of polygon shard detection (#139)
* Crunch down memory required per polygon joint

* *Actually* reduce the size of the structure

* Update version and changelog
2.32.1
2023-09-21 10:59:12 -07:00
Erica Fischer 390771f855 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 to 2fdec7d2

* 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 commit e04b19916e.

* 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 commit 13fefacfd7.

* 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
2.32.0
2023-09-14 16:51:38 -07:00
Tobias dee40802fd Docs: Link to layer name section (#135)
Add internal link to help understand how the layer name will be derived (and how to overwrite the default behavior)
2023-09-14 16:18:06 -07:00
Erica Fischer e6d05bc317 Fix tile-join crash when trying to merge empty tilesets with --overzoom (#138)
* Fix tile-join crash when trying to merge empty tilesets with --overzoom

* Add an option not to reduce tiny polygons to dust at maxzoom

* Add test for prevention of tiny polygon reduction at maxzoom

* Change version number
2.31.0
2023-08-31 13:02:03 -07:00
Erica Fischer 2ec6180003 Fix "strategies" accounting for 0-length linestrings and degenerate polygons (#137)
* Dropping a 0-length feature doesn't count as dropping-as-needed

* Add an option not to reduce tiny polygons to dust at maxzoom

* Add test for prevention of tiny polygon reduction at maxzoom

* Fix accounting for tiny polygons not to include degenerate geometries

* Revert "Add test for prevention of tiny polygon reduction at maxzoom"

This reverts commit f931bbd73e.

* Revert "Add an option not to reduce tiny polygons to dust at maxzoom"

This reverts commit 03f0882bb6.

* Fix tests

* Another test that no longer has any really tiny polygons

* Oops, that broke LineString simplification

* This time for sure!

* Update changelog and version
2.30.1
2023-08-29 10:54:39 -07:00
Erica Fischer 6778aeac52 Add an option to extend zooms if still dropping, but with a limit (#131)
* Add an option to extend zooms if still dropping, but with a limit

* At least when to overzoom, even if not actually doing it yet

* Refactor to give tile-join access to overzoom()

* Didn't work, but *might* have worked

* OK, it did something now

* Ah, there's the bug!

* Hook up pmtiles and dirtiles as overzooming sources

* Add command line option to enable or disable overzooming

* Add (currently broken) test of overzooming in tile-join

* Slightly more abstraction for the tile-join readers

* Factor out duplicated code

* Move construction into a constructor

* More changing accessors to methods

* Reduce magic

* Start tracking a list of the tiles at maxzoom

* I think it worked?

* Add missing #include

* Fix sequence of overzoomed tiles (Y sorts backwards for TMS)

* Don't spend memory on overzooming when we aren't going to use it

* Diff rather than cmp, in the hope of figuring out this broken test

* Keep full coordinate precision if we might extend zooms

* Try a slightly different byte limit

* Make drop-densest more consistent across tile boundaries

* Also affects this test

* Does it behave any differently if it can extend forever?

* I think the discrepancy is a thread-safety problem here

* Revert "Does it behave any differently if it can extend forever?"

This reverts commit 0dff0a0acc.

* Lost this change to the test

* This time for sure!

* Revert "Also affects this test"

This reverts commit cd1f7c2e78.

* Revert "Make drop-densest more consistent across tile boundaries"

This reverts commit 563f7d2bc2.

* Revert "Try a slightly different byte limit"

This reverts commit 2e271213d6.

* Add some more explanatory comments

* Amend the join-test to detect my current bug

* Allow overzooming to complete the zoom if it ever starts

* Forgot to correct the test

* Update changelog and version

* Cleanups from code review

* Remove version number from fixture to fix test
2.30.0
2023-08-25 12:42:38 -07:00
Jason FerrierandJason Ferrier 39ad95ed73 Updated installation instructions to include Homebrew (#130)
Updated installation instructions. felt/tippecanoe#70

Co-authored-by: Jason Ferrier <Jason.Ferrier@nrel.gov>
2023-08-18 16:15:32 -07:00
Bert Temme 2b133a1def Update Dockerfile typo tippacanoe -> tippecanoe (#129) 2023-08-14 14:07:15 -07:00
Brandon Liu f00eeb486a Fix narrowing of index_size (#126)
Fix narrowing of index_size, affecting indexed flatgeobufs with lots of features [#125]
2023-08-14 14:06:38 -07:00
Can Duruk 9e9e21bcc0 Remove Can from the codeowners (#128)
I am not immediately qualified to be a reviewer on this repo right now. I am still watching updates on Slack.
2023-08-14 14:05:59 -07:00
Erica Fischer 430d8edd17 Tool for overzooming individual tiles (#121)
* Starting work on overzooming

* Factor clipping out of geometry.cpp to simplify linkage

* Pull out more geometry functions into now-badly-named clip.cpp

* Not surprisingly, there is a bug

* Found the bug

* Make indent

* Pass attributes through

* Make formatting more consistent

* Fix typos in comments

* Fix the typos better

* Add tippecanoe-overzoom to the install list

* Give overzoom a predictable exit status

* Forgot to translate to and from polygon ring closepaths

* Fix geometry collapse at z21

* Add attribute stripping; don't generate layers if they have no features

* Add docs for tippecanoe-overzoom (as it will be, not as it is)

* Change overzoom to accept input and output files as arguments

* Working on overzooming tests

* Oops

* Hook up and test the detail and buffer options, and the empty-tile case

* Also test attribute stripping

* Fix error message

* Update changelog and version
2.29.0
2023-08-09 11:48:16 -07:00
Philippe Latulippe 5cba91981a Include errno.h in memfile.cpp (#122)
Include errno.h in memfile.cpp to fix compilation errors on some platforms
2023-07-27 18:34:22 -07:00
Erica Fischer 55b9aa501c Allow --set-attribute to override existing attribute values (#123)
* Allow --set-attribute to override existing attribute values

* Bump version number
2.28.1
2023-07-26 11:05:35 -07:00
Erica Fischer 4318e964e3 Add maximum pseudocluster size option for low-zoom points (#119)
* Trying to improve cluster positions

* Fix centroid calculation

* Just move points to cluster centroids; add point gap threshold

* Add maximum-point-gap option

* Fix formatting

* Rename options for clarity; add tests; update changelog

* Add missing break to switch

* Revert unneeded constructor cleanup that broke a test somehow

* Clean up comments

* Remove unused --move-points-to-cluster-centroids

* Mention tile-join change in changelog
2.28.0
2023-07-17 15:33:07 -07:00
Erica Fischer 1c3bd5352c Add a new option to set an initial value for an attribute in each feature (#115)
* Starting on --set-attributes

* Add a JSON form to accumulate-attribute

* Fix formatting

* Set attributes, JSON form

* Also handle setting attributes to unquoted values

* Factoring out character-mangling in the names of tests

* Rename tests for new quoting convention

* Test for JSON form of attribute setting

* Test for JSON form of attribute accumulation

* Forgot to increment the version
2023-07-14 10:47:55 -07:00
Erica Fischer 48e769c94c More codeowners (#118)
* Add more code owners

* Fix typo
2023-07-12 10:34:53 -07:00
John SeekinsandJohn Seekins 58bfd121a7 fix build on fedora 38 (#117)
Signed-off-by: John Seekins <john@pluralpolicy.com>
Co-authored-by: John Seekins <john@pluralpolicy.com>
2023-07-12 10:34:26 -07:00
Erica Fischer b5ec3c46f0 Reduce excessive progress logging during pmtiles conversion (#111)
* Don't log progress so often during pmtiles conversion

And turn off the `catch` tests, which have bit-rotted

* Fix accidental double-multiplication-by-100

* Reenable catch

* Update changelog
2023-07-10 15:59:52 -07:00
Erica Fischer c1051232ad Do more of line simplification with integer coordinates (#113)
* Turn off unit, which has bit-rotted

* Instrument line simplification

* Do more work in integer space

* Update tests with simplification done with more integers

* Clean up

* Update changelog

* Eradicate calls to deprecated sprintf()

* Revert "Turn off unit, which has bit-rotted"

This reverts commit 998779313f.

* Fix catch by switching to an unsigned type
2023-07-10 15:54:21 -07:00
Erica Fischer b09a880822 Add CODEOWNERS (#114)
* Add CODEOWNERS

* Narrower list?
2023-07-10 15:53:13 -07:00
Mary M ba3e42568c Try catch exception (#108)
* catch exception when parsing invalid pbf - fixes #817

* updating exit error
2023-07-05 14:03:02 -07:00
James Scott-Brown 87ed674a30 Add backticks around an option in README (#109) 2023-07-05 14:02:14 -07:00
Tim FinerandTim Finer 0422d77bbe Check for nullptr in call to properties, fixes segfault. (#106)
* Added -fPIE as g++ 9.4.0 complained and would not link

* Prevent crash by checking for properties before dereferencing.

---------

Co-authored-by: Tim Finer <finert@pixia.com>
2023-05-23 09:47:45 -07:00
Erica Fischer 20eb9c8dae Avoid crashing if there is a polygon ring containing only one point (#102) 2.26.1 2023-05-11 12:20:00 -07:00
Erica Fischer 523ca55243 Fix bugs in --no-simplification-of-shared-nodes (#99)
* Fix bugs in --no-simplification-of-shared-nodes

* Update changelog
2.26.0
2023-05-08 15:31:46 -07:00
Erica Fischer 605640e138 Add --include/-y to tile-join (#86)
* Add --include/-y to tile-join

* Update documentation and changelog
2023-05-04 11:55:36 -07:00
Jt Miclat 5bd46e7ed5 Update dockerfile (#79)
Update docker image to use newer version of ubuntu and reduce image size
2023-05-04 11:54:27 -07:00
James 434817bde9 Update makefile to use c++17 standard (#94)
The C++ standard didn't match the utilization inside the code and would fail to compile using the original makefile
2023-05-04 10:49:00 -07:00
James Scott-Brown da7bbbd6ea Change fpclassify() to std::fpclassify() (#92)
Change fpclassify() std::fpclassify()

This fixes the compiler errors "'fpclassify' was not declared in this scope"
2023-05-04 10:47:46 -07:00
Brandon Liu e43d6dacdd update pmtiles.hpp from upstream (#98)
* remove unused code [#93]

* fix OOB caused by specific entry set lengths

* add more checks for valid tile IDs
2023-05-04 10:45:22 -07:00
Erica Fischer afc7ca01a2 Calculate an antimeridian-adjusted bounding box in tileset metadata (#82)
* Calculate a new antimeridian-adjusted bounding box

* Add antimeridian bounding box to pmtiles, dirtiles, and tile-join

* Don't take out-of-bounds latitudes into account in the adjusted bbox

* Update changelog

* Forgot to adjust tests after the last change
2.24.0
2023-03-09 20:26:48 -08:00
Erica FischerandAurele Nitoref 329dd86bfd Add --cluster-maxzoom option (#75)
* Add `--cluster-maxzoom` option

* Add tests, update changelog

* Update manpage

* Update tests

---------

Co-authored-by: Aurele Nitoref <aurele.nitoref@icloud.com>
2023-02-24 16:05:45 -08:00
Erica FischerandAurele Nitoref 3d714e32b0 Add point_count_abbreviated property to clustered features (#74)
* Add `point_count_abbreviated` property to clustered features

* Update tests and changelog

---------

Co-authored-by: Aurele Nitoref <aurele.nitoref@icloud.com>
2023-02-24 15:59:00 -08:00
DarcyB 7371072e45 Make Tippecanoe build on FreeBSD in response to issue 18 (#72)
* Make tippecanoe build on FreeBSD in responce to issue 18 (https://github.com/felt/tippecanoe/issues/18)

* Make conditional FreeBSD specific, instead of otherway around.
2023-02-24 11:32:56 -08:00
DarcyB 0fa758c1e3 Allow passing a file with a list of input files to tile-join in response to issue 69 (#73)
* Allow passing a file with a list of input files to tile-join in response to Issue 69 (https://github.com/felt/tippecanoe/issues/69)

* Do not print usage if -r is specified without a commandline readfrom file

* Add test for -r option to tile-join
2023-02-24 11:31:46 -08:00