Commit Graph
1945 Commits
Author SHA1 Message Date
Erica Fischer bfb0104bd1 Sketch of finding intersections by bubbling 2023-12-22 12:19:04 -08:00
Erica Fischer 0cb09dbca4 Merge remote-tracking branch 'origin/main' into clean-polygons 2023-12-22 10:34:48 -08:00
Erica Fischer 15a3e313ff Tolerate polygon rings with insufficiently many points in input (#175)
* Tolerate polygon rings with insufficiently many points in input

* Fix changelog typo
2.38.0
2023-12-11 11:14:26 -08:00
Erica Fischer d7bdbe363b Reduce maximum memory used for vertex sorting (#170)
* Add logging for out-of-memory debugging

* Use less memory for sub-sorting

* Reduce maximum memory used for vertex sorting
2.37.1
2023-11-30 13:48:50 -08:00
Erica Fischer 21f02049da Make polygon cleaning output idempotent 2023-11-16 13:42:41 -08:00
Erica Fischer ef271ad0bb Switch other calls to Wagyu over. But now coalesce is slow. 2023-11-14 18:39:09 -08:00
Erica Fischer 33052aa60b Make polygon scaling its own function 2023-11-14 18:00:03 -08:00
Erica Fischer 9e46ac8c0e Tiebreaker for snap-rounding examination order 2023-11-14 13:24:36 -08:00
Erica Fischer 8a996b9057 Tiebreaker for comparing rings of the same area 2023-11-14 13:19:59 -08:00
Erica Fischer 68d7d907d4 Clean up 2023-11-14 13:15:01 -08:00
Erica Fischer 52e6e7479a So many affected tests 2023-11-14 12:26:32 -08:00
Erica Fischer 78a964776f Don't revive spikes that are beyond the tile edge 2023-11-14 12:19:18 -08:00
Erica Fischer b22d6c8ba1 Remove debug spew 2023-11-14 10:06:42 -08:00
Erica Fischer 624c2b697a Try to fix winding reversals introduced by scaling 2023-11-14 09:56:31 -08:00
Erica Fischer bee87bdab2 Limit decay into polygon dust to reasonably compact polygons 2023-11-13 22:16:37 -08:00
Erica Fischer dd8762da1f Remove dead code 2023-11-13 16:03:52 -08:00
Erica Fischer c05ae1bbff Compare segments to the current pool as they come into scope 2023-11-13 13:08:46 -08:00
Erica Fischer 1238711571 Only reinspect segments that changed in the previous pass 2023-11-13 12:12:58 -08:00
Erica Fischer d23f0a243b Speed improvements from doing less repetitive rounding 2023-11-13 11:31:14 -08:00
Erica Fischer e80d8786b8 Drop holes that are not inside an outer ring 2023-11-13 10:30:14 -08:00
Erica Fischer 546b5fdbd3 Remove collinear points 2023-11-13 10:24:07 -08:00
Erica Fischer bd24168416 Add missing header 2023-11-13 10:10:26 -08:00
Erica Fischer d06363e9f9 Turn polygon revival back on; turn off some debug spew 2023-11-12 23:17:26 -08:00
Erica Fischer c0866b9cde Maybe right now? 2023-11-12 22:51:28 -08:00
Erica Fischer ba9dbda6f6 Something is wrong with the traversal 2023-11-12 19:19:35 -08:00
Erica Fischer 3eddb81d81 Trying to straighten out ring nesting 2023-11-12 18:28:43 -08:00
Erica Fischer 5d6a54a235 Ring nesting isn't right yet, so just keep the outer rings 2023-11-11 22:57:47 -08:00
Erica Fischer 10290b1b1b Committing to integer coordinates to fix more accidental mirror segs 2023-11-10 15:45:25 -08:00
Erica Fischer e849d42b13 Bow spindle polygons out in the center to prevent collapse 2023-11-10 14:40:49 -08:00
Erica Fischer c59202788a Remove debug spew 2023-11-10 12:35:56 -08:00
Erica Fischer 5e14b68560 Ring search basically works now? 2023-11-10 12:31:37 -08:00
Erica Fischer f6305b9b51 Deal with horizontals 2023-11-10 09:28:24 -08:00
Erica Fischer 35231d39e4 Deal with vertical lines 2023-11-09 15:15:57 -08:00
Erica Fischer 6bd0cdcb1b Fix multiply duplicated spikes 2023-11-09 14:26:13 -08:00
Erica Fischer 5ba24f0712 Get rid of most spikes 2023-11-09 14:04:38 -08:00
Erica Fischer 474270c151 Visual testing 2023-11-09 13:38:26 -08:00
Erica Fischer 22c308f623 Do some intersecting 2023-11-09 11:09:40 -08:00
Erica Fischer 3f98aa96b2 More missing headers and compiler warnings 2023-11-09 09:16:28 -08:00
Erica Fischer 690738b69c Add some missing headers 2023-11-09 09:11:41 -08:00
Erica Fischer c540ec5764 More progress on intersecting 2023-11-09 09:08:32 -08:00
Erica Fischer 31defc1dc2 Line intersection algorithms 2023-11-08 22:32:23 -08:00
Erica Fischer 6bebc1b427 Doing the scan line through the segments 2023-11-08 15:44:01 -08:00
Erica Fischer 966b911e1f Setting up for scanline 2023-11-08 14:55:27 -08:00
Erica Fischer e15239efdb Starting on my own polygon cleaner 2023-11-08 14:42:35 -08:00
Erica Fischer d359461e61 Reduce tile-join overzooming memory usage (#162)
* 16 bits is enough for tile numbers

* Revert "16 bits is enough for tile numbers"

This reverts commit 71a0c4e1cf.

* Check what child tiles each overzoomed tile will have

and don't queue further overzooming of empty tiles

* Clean up naming; use std::move to avoid copying large arrays
2.37.0
2023-11-08 12:51:28 -08:00
Erica Fischer 2c56187530 Make tile-join distrust source tilesets' metadata maxzoom and minzoom (#161)
* Special-case a longitude wraparound of exactly 360°

* Update version and changelog

* Make tile-join distrust source tilesets' metadata maxzoom and minzoom
2.36.0
2023-11-07 14:41:05 -08: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 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