-
-
Notifications
You must be signed in to change notification settings - Fork 475
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
route_name tag #315
Comments
The special handling for routes is rather old. The original commit is here and was done for the cycle map, I believe. It was never used by the mapnik style. @gravitystorm should know more details. I suspect that a lot of maps that handle route relations still rely on this code. If we want to phase this out, it has to be long term thing (with announcements on dev@ etc.) and we should provide a lua style that emulates the old behaviour. Personally, I'm more for just leaving the C transform as is with all it's quirks, concentrate on making the lua tagtransform more efficient and promote that in the future. |
ping @gravitystorm Would it cause problems if the The relevant code is for (keyval *p = rel_tags->firstItem(); p; p = rel_tags->nextItem(p)) {
//copy the name tag as "route_name"
if (is_route && (p->key == "name"))
tags.addItem("route_name", p->value, true);
//copy all other tags except for "type"
else if (p->key != "type")
tags.addItem(p->key, p->value, true);
} I'd do this by changing the |
I think the original intention was to have the name of the underlying way clearly distinct from the name of the route relation, hence the different tags. Or I think it might have been a way to access routes before Of course, getting access to properties of underlying ways when dealing with route relations (e.g. is this part of the relation off-road, on a bridge, etc) is still a dark art and I've no idea of the current output for route relations in osm2pgsql. So make whatever changes you think are appropriate! |
The C transforms don't do this, but there is #230 open about adding the ability to do this in Lua.
Assuming default.style, they get populated in the line table, but not the roads table. For a road relation, they are like |
The C transforms used to turn the name tag into a route_name tag on route relations, for reasons that are not entirely clear. This change doesn't remove route_name, but does also populate the name column, eliminating a source of confusion to users. Fixes osm2pgsql-dev#315
A user on IRC was confused why names for route relations were not appearing in their osm2pgsql database. So was I, until I found
tagtransform.cpp:113
https://trac.openstreetmap.org/ticket/1703 is related, but I don't believe it is relevant anymore.
It may have been relevant if relying on catchalls with osm.xml, but isn't relevant to any recent stylesheet.
The lua transforms do not do this.
It is undocumented.
Should we still be doing this?
This does not impact openstreetmap-carto.
cc @Tommyf
The text was updated successfully, but these errors were encountered: