planetiler-openmaptiles
planetiler-openmaptiles copied to clipboard
Disconnected line features
I'm seeing a few cases of line features that are disconnected:
In this location in OSM Americana we see the issue:
It's connected in the data:
... but is disconnected on my planetiler tileset:
I think what happens here is that in the vector tile data these are 2 separate line features and the vertical one gets simplified which moves the connection point slightly. The default simplify tolerance at max zoom is 256/4096
or 0.0625 pixels or around 0.6 meters. That is as low as it can get with a max zoom of 14 and 4096 tile resolution
So you have a couple of options:
- make sure your style makes roads wide enough that a 0.5m difference isn't noticeable (
["interpolate", ["exponential", 2], ["zoom"], <initial zoom level>, <initial size in px>, 24, <width in meters> * 215 }]
would make your road widths look like you are zooming in on a satellite map at high zooms - render to z15 to reduce the potential discrepancy to 0.25 meters (but double the tileset size)
- increase the tile resolution from 4096 to say 8192 - but that would require a lot of changes in planetiler and increase your tile sizes
- we could add a preprocessing step in planetiler that identifies nodes where transportation lines intersect, then split road segments at those intersections so the intersection points never get moved. That could get a bit complex and expensive though.
It's hard to do a "topology aware simplification" because each feature is initially simplified in isolation without knowledge of surrounding features.
I realized we might be able avoid this by not simplifying z14 features at all (at least transportation and building layers), but that does increase max z14 tile sizes by 15-20%
The default simplify tolerance at max zoom is
256/4096
or 0.0625 pixels or around 0.6 meters.
plus:
I realized we might be able avoid this by not simplifying z14 features at all
I've tried --simplify-tolerance-at-max-zoom=0
and:
- It does fix the problem at overzoom
- But yes, it does increase the tilesize: I tried it on some smaller areas with tilesets from Z0 to Z1 and total increase is 1-2%