Skip to content
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

Do not render type=route relations #302

Closed
wants to merge 1 commit into from

Conversation

cquest
Copy link

@cquest cquest commented Jan 1, 2014

When a type=route relation with matching tags exists (like railway=* or highway=*) the rendering takes place twice. This may cause tunnels to be re-rendered as non tunnels.
I've fixed it with success in OSM-FR tiles.

When a type=route relation with matching tags exists (like railway=* or highway=*) the rendering takes place twice. This may cause tunnels to be re-rendered as non tunnels.
I've fixed it with success in OSM-FR tiles.
@matthijsmelissen
Copy link
Collaborator

Thank you, I will look at it.

@cquest
Copy link
Author

cquest commented Jan 1, 2014

@gravitystorm
Copy link
Owner

Good catch. But is this a bug in osm2pgsql relation handling? It's not obvious why you would need to add these "and route is null" to every sql statement in the first place.

@cquest
Copy link
Author

cquest commented Jan 9, 2014

That's not really an osm2pgsql bug. It depends on the style used by osm2pgsql (is it keeping route=* relations or not) and OSM data (is there some tags on the route relation that could be the same as other object rendered).

Another way to avoid the rendering bug could be the same as with polygons... order by decreasing length forcing mapnik to render small pieces on top of long ones, but this implies have a length column like we have an area column on polygons.

@pnorman
Copy link
Collaborator

pnorman commented Jan 9, 2014

but this implies have a length column like we have an area column on polygons

Well you could order by st_length(way), but that'd probably send performance down; although you could add a btree index on st_length(way), and it could sort by that without evaluating the function.

Either way, it doesn't exactly sound like a great option.

The problem with a length column is that it's meaningless in a way, because osm2pgsql splits long ways.

@matkoniecz
Copy link
Contributor

railway=* or highway=* in relations - is it a correct tagging?

@Theodin
Copy link

Theodin commented Jul 3, 2014

Does this collide with #596 ? In my opinion routes should be tagged as relations (individual roads can have different names) and tagging them as ref on a way is just tagging for the renderer.

@pnorman
Copy link
Collaborator

pnorman commented Jul 22, 2014

railway=* or highway=* in relations - is it a correct tagging?

No.

I'm thinking to close this as it sounds like a tagging error

@matkoniecz
Copy link
Contributor

I would propose to close it as a tagging error, I see no reason to use this kind of tagging and I found no recommendations to do this on wiki.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants