-
Notifications
You must be signed in to change notification settings - Fork 819
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
Resolve wrong layering of low-zoom layers #555
Conversation
The rendering rules of the low-zoom layer are inserted into the regular layers. This makes sure that low-zoom roads are rendered like other roads, and prevents therefore incorrect layering of roads on low zoom levels. It should also improve the readability of the code. This solves gravitystorm#400.
I suspect this would be a significant performance problem. The lowzoom layer was coming from the planet_osm_roads table, whereas selecting the motorways out of the lines table at z5 would take a lot longer. As for ordering, I'm fine with 'importance'-based ordering at low zoom levels and 'physical' ordering at high zoom levels, if that makes things easier. Thoughts? |
Thanks, I missed the roads/lines difference. I will test the performance first.
Yes, makes sense. Closed for now. |
Can I find anywhere what the difference between planet_osm_roads an planet_osm_line is? |
The C tag transform code. The default lua transform might be an easier read and should be equivalent. |
If I read it correctly, the tags in planet_osm_roads are: highway = {secondary_link, secondary, primary_link, primary, trunk_link, trunk, motorway_link, motorway}, railway=*, boundary=administrative. Although I don't understand why tagtransform.c checks for
rather than
|
that's just the way strcmp works - it returns 0 if they are equal so you need to negate it to make it |
Ah, thanks. |
This merges code for low-zoom road definitions into the corresponding high-zoom road definitions. Data on z<10 now comes from osm_planet_roads, data on z>=10 comes from osm_planet_line. Chosen is for zoom level 10 as cut-off, because residential is rendered from z10 and is not included in osm_planet_roads, so on z>=10 osm_planet_line needs to be queried anyway. Advantages: * This separates the zoomlevel cut-off for querying from the roads vs line table from the zoomlevel cut-off for the lowzoom rendering style. * This brings related code (i.e. code per feature) closer together in the file, which should make the code more easy to modify. This is mainly a code cleanup, but it causes some small changes in rendering: * Take into account layering of roads on z10 and z11. * Fix the loss of layering problem of railway tunnels on z12 (resolves gravitystorm#400). * Fix bug that prevented tunnel rendering style for railway on z11/12, and add tunnel style rendering for spur/siding/yard for z<12. * Give railways on z<12 a round line-join. This is an improvement of gravitystorm#555.
This merges code for low-zoom road definitions into the corresponding high-zoom road definitions. Data on z<10 now comes from osm_planet_roads, data on z>=10 comes from osm_planet_line. Chosen is for zoom level 10 as cut-off, because residential is rendered from z10 and is not included in osm_planet_roads, so on z>=10 osm_planet_line needs to be queried anyway. Advantages: * This separates the zoomlevel cut-off for querying from the roads vs line table from the zoomlevel cut-off for the lowzoom rendering style. * This brings related code (i.e. code per feature) closer together in the file, which should make the code more easy to modify. This is mainly a code cleanup, but it causes some small changes in rendering: * Take into account layering of roads on z10 and z11. * Fix the loss of layering problem of railway tunnels on z12 (resolves gravitystorm#400). * Fix bug that prevented tunnel rendering style for railway on z11/12, and add tunnel style rendering for spur/siding/yard for z<12. * Give railways on z<12 a round line-join. This is an improvement of gravitystorm#555.
This merges code for low-zoom road definitions into the corresponding high-zoom road definitions. Data on z<10 now comes from osm_planet_roads, data on z>=10 comes from osm_planet_line. Chosen is for zoom level 10 as cut-off, because residential is rendered from z10 and is not included in osm_planet_roads, so on z>=10 osm_planet_line needs to be queried anyway. Advantages: * This separates the zoomlevel cut-off for querying from the roads vs line table from the zoomlevel cut-off for the lowzoom rendering style. * This brings related code (i.e. code per feature) closer together in the file, which should make the code more easy to modify. This is mainly a code cleanup, but it causes some small changes in rendering: * Take into account layering of roads on z10 and z11. * Fix the loss of layering problem of railway tunnels on z12 (resolves gravitystorm#400). * Fix bug that prevented tunnel rendering style for railway on z11/12, and add tunnel style rendering for spur/siding/yard for z<12. * Give railways on z<12 a round line-join. This is an improvement of gravitystorm#555.
This merges code for low-zoom road definitions into the corresponding high-zoom road definitions. Data on z<10 now comes from osm_planet_roads, data on z>=10 comes from osm_planet_line. Chosen is for zoom level 10 as cut-off, because residential is rendered from z10 and is not included in osm_planet_roads, so on z>=10 osm_planet_line needs to be queried anyway. Advantages: * This separates the zoomlevel cut-off for querying from the roads vs line table from the zoomlevel cut-off for the lowzoom rendering style. * This brings related code (i.e. code per feature) closer together in the file, which should make the code more easy to modify. This is mainly a code cleanup, but it causes some small changes in rendering: * Take into account layering of roads on z10 and z11. * Fix the loss of layering problem of railway tunnels on z12 (resolves gravitystorm#400). * Fix bug that prevented tunnel rendering style for railway on z11/12, and add tunnel style rendering for spur/siding/yard for z<12. * Give railways on z<12 a round line-join. This is an improvement of gravitystorm#555.
The rendering rules of the low-zoom layer are inserted into the regular
layers. This makes sure that low-zoom roads are rendered like other
roads, and prevents therefore incorrect layering of roads on low zoom
levels.
It should also improve the readability of the code.
This solves #400.
This supersedes #493.