Repository navigation
Conversation
Contributor
|
Point 1 is a duplicate of PR #933 I did the same as you but this introduced some new effects so i had to change to a 2-step approach Don't know which PR will be merged by the maintainer but this should be considered |
Owner
|
Thanks both! I'm currently waiting for feedback on #939 but once we have that then I'll look at applying the currently outstanding PRs over that. |
Contributor
Author
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.
Fix dropped polygons in
scaleRing; skip shapefile records and rings outside the clipping boxTwo changes, both affecting shapefile polygons such as the coastline's water polygons.
1.
TileBbox::scaleRingcould drop whole polygonsscaleRingremoves small loops by comparing each point with the last few added, but it never compares with the first point. If clipping leaves a ring whose first point is repeated (p0 p0 p1 p2 p3 p0), the repeat is kept. When the ring closes onp0, it matches the repeat and is taken for a loop, so the ring is cut down to two points and the polygon is dropped.Clipping a large polygon to a tile can leave exactly this four-cornered shape. In my renders, large areas of sea disappeared at particular tiles and zooms, for example off the Moroccan coast at z8 and in the Bay of Biscay at z9.
The fix skips any point identical to the one before it, including the first.
2. Faster shapefile reading against a clipping box
SHPReadObjectstays, as a fallback for records whose box can't be read this way.This helps renders of a regional extract (
--bbox, or an input with bounds) using the worldwide coastline shapefile. A whole-planet render is unaffected.Testing
I rendered two coastal extracts (
--bbox -6,35,-3,37and--bbox -3,43,-1,45, up to z10) withconfig-openmaptiles.json, comparing against currentmaster: