Repository navigation
Conversation
wayListMultiPolygon called within(inner, outer) for every pair, and Boost analyses the outer ring afresh each time. Skip pairs whose bounding boxes aren't nested, and for big outer rings with many inners, index the outer segments once: an inner ring that touches no outer segment is decided by one vertex; touching rings still go to within(inner, outer). Planet: 273,813 indexed calls checked against within(), 0 mismatches; Germany output identical. Guri Reservoir 48 -> 9 s (-81%); planet relations phase 105 -> 61 s (-42%, wall -2.4%) together with the correct.hpp closing fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gain (planet, PMTiles, 32 threads), measured together with the
correct.hppring-closing PR #974: relations phase 105 → 61 s (−42%), total wall 1659 → 1620 s (−39 s, −2.4%). Guri Reservoir alone 48 → 9 s (−81%); time at 1–3 busy threads ~46 → ~15 s (−67%). Output identical.OSMStore::wayListMultiPolygonassigns each inner ring of a multipolygon to the outer rings that contain it withgeom::within(inner, outer). Boost analyses both rings afresh on every call, so a relation with one huge outer ring and many inner rings pays for the outer ring once per inner ring. On the planet, Guri Reservoir (r3400721: a 627,000-point shore, 2,525 islands) spends 47 s there, on one thread at the end of the relations phase.This PR changes two things, and keeps Boost's answer in every case where the rings touch.
within.within(point, ring)). If any intersects,geom::within(inner, outer)decides as before.Verification
A debug build ran both the indexed test and
geom::within(inner, outer)for every indexed call on the whole planet: 273,813 calls, 0 disagreements. Germany output (compare_area, per-tile area/length per layer and tag group) is identical; onlypoidiffers, as between identical runs.Planet, PMTiles, 32 threads,
--store --fast, together with thecorrect.hppring-closing fixThe relations phase used to end with one thread finishing the few huge relations while the others waited; now it ends with Lake Huron (r1205151, 25 s). The tile phase, which this doesn't touch, took about the same in both runs (1038 s and 1048 s).
🤖 Generated with Claude Code