New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove bridge/tunnel attributes from tiny bridges #1283
Conversation
Results evaluating commit bbf2f81 (merged with base 0c6dd1f as fe472e9). See run details. PostgreSQL DB size in MB: 4864 ⇒ 4863 (-0.0% change)
expand for details...
|
This is actually reverting PR we did last year #1038. |
Perhaps we could limit the brunnel suppression to bridges that are too small to show, which is the real space waster. |
0e2b6a2
to
f9e358c
Compare
Thanks.. removing attribute from very small bridges (less than 3 pixels) make sense! When I tested it on the Czech Republic I found some bridges were split and merging with the surrounding sections of the roads did not work so well (maybe out of the scope of this PR). Example of not merged road https://www.openstreetmap.org/way/327298025 with https://www.openstreetmap.org/way/327298027. The bridge has When I looked at another bridge the roads were also split. e.g.
Anyway, in Prague, I find a bridge where this logic is not working
Would be possible to implement this logic after merging the roads? Or merging the bridges first and then deciding if it is long enough? I understand that this could be just an edge case, but still (another e.g. in Dubuque 1st, 2nd section) Thank you! |
Adding the |
I think this is the best I can do easily for z9-10 with how the update functions are set up with triggers and ids. There is probably a way to further improve tile size but it would involve changing the way the update functions work and I'm concerned about breaking things. So I think this is ready for review at this stage. |
Thanks! Looks good! |
EDIT
This PR now removes bridge/tunnel/ford attributes from the
transportation
layer from sections of bridge/tunnel etc that are too small to be meaningfully visible at a particular zoom level. This allows those segments to be generalized into geometries along with the surrounding sections of road, thereby dropping lots of useless little pieces of geometry in lower-zoom tiles.ORIGINAL
This PR removes bridge/tunnel/ford attributes from the
transportation
layer for zooms 4-8. At these zooms, bridges and tunnels are so small that it doesn't make sense to create differentiated rendering. For comparison, openstreetmap-carto does not begin rendering bridges and tunnels until zoom v11/r12, so this change still preserves bridge and tunnel attributes two zooms lower than openstreetmap-carto.For reference, here is a zoom 9 map of openstreetmap-americana:
Here is an equivalent zoom 8(raster) map of openstreetmap-carto:
The images above represent the lowest zoom level that bridge/tunnel attributes are retained. Below this zoom, it is unlikely that a style might want differentiated bridge/tunnel based on feature density.
In addition to saving space by removing these attributes, it also allows for improved generalization of transportation layer LineString objects, which can be better simplified when they are not disrupted by tiny bridge sections.