Hello,
Several relations have both type=route and highway=* or railway=* tags; I would
like to remove the highway or railway tags from the relations, and leave them
on the members. The relation highway tags are redundant with the member ways,
make no semantic sense, and can cause rendering issues:
- Redundancy: A route typically contains highways or railways that each
have a highway=* or railway=* tag. Because the information is already included
in the members of the relation, it is redundant to tag the relation with that
tag as well — you're tagging in two places when you only need one.
- Semantic meaning: These relations are not highways or railways, they are
a *group* of them that make up a route. The tag belongs on the members, not on
the relation. It causes semantic problems when the value of the tag differs on
the relation and on the member: is the street a motorway like the relation's
highway tag says, or residential like the way's tag says?
- Rendering: if both a way and its relation are tagged as highway=* or
railway=*, the line will get drawn twice on the map — once for the way, and
once on top of that for the line formed by all the ways in the relation. While
this is invisible in most cases, it will cause unexpected results if the tags
disagree, e.g. a trunk that's part of a highway=motorway relation, or a railway
tunnel that's part of a railway=rail relation.
Since this is a bit abstract, here are concrete examples:
http://www.openstreetmap.org/way/25435351 is a tunnel and part of
http://www.openstreetmap.org/relation/404214 . Both the way and the relation
are tagged as highway=tertiary, but the tunnel isn't shown on the map because
of the wrong tag on the relation. http://www.openstreetmap.org/relation/270118
and http://www.openstreetmap.org/way/182573964 show the same issue on railways.
If a country uses highway= [on a way] to reflect a route's administrative
classification, then I can see why mappers transfer that to a relation for that
route. If, say, the M1 and the M2 both share a stretch of motorway, and you
build two relations to express that, it makes sense to tag the M1 relation as
highway=motorway. However, the relation *isn't* a highway, but a group of
highways.
Taginfo finds type=route combined with 1374 instances of railway=* (0.48%) and
6426 instances of highway=* (2.23%). User pnorman has found relations where the
highway relation tag disagrees with one or more members[0] — I have manually
fixed some of them while investigating the issue, and there are now 504 left.
The same analysis will have to be run for the railway tag, and all of these
special cases will have to be looked at and fixed manually.
In the vast majority of these special cases, just deleting the tag or the
useless redundant relation will be sufficient, improve the map, and prevent
things like service roads on the side of a motorway from being rendered as a
motorway. In a minority of cases, the way that disagrees with the relation on
highway type shouldn’t be in the relation — the service way that runs parallel
to the motorway isn’t part of it.
The edit will be from a specially created imports/mechanical edit account, and
follow the Mechanical Edit Policy[1]. Any failed chunks or areas, or all
remaining relations the Overpass API finds after running the tool, can simply
be re-processed. The different OSM editors should explicitly mark relations
tagged as type=route and highway=* or railway=* as an error. If there is no
significant negative feedback or issues that cannot be resolved, I will
probably open tickets for the various validators and QA tools, and run the fix
again every couple of months.
The Overpass API makes it easy to find the relations. The problematic relations
exist worldwide, but because they are more common in some regions because of
mappers imitating local (bad) habits — France has zero, Bavaria has many, Japan
is full of them — I plan on splitting my edits by creating arbitrary groups of
400 relations, or creating tiles and subdividing them up until they contain
less than 400 relations. Any better ideas are very welcome.
Guillaume Rischard [2]
[0] http://paste.ubuntu.com/6704102/ using
https://gist.github.com/pnorman/cb841edb214a4ab8eb83 on a pgsnapshot database.
[1] http://wiki.openstreetmap.org/wiki/Mechanical_Edit_Policy
[2] htp://openstreetmap.org/user/Stereo/
_______________________________________________
talk mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/talk