I'm currently working through relations and verifying alignment of Oklahoma state highways. I'm wondering, after I get relations done, what's the easiest way to generate the ref=* tags for ways based on the networks and refs that it belongs to? For example, if a highway is a member of a relation with (network=US:OK, ref=1) and another with (network=US, ref=270), the way should get ref=OK 1; US 270. It seems a bulk change would be best once relations are completed and verified, but what would be the best way to accomplish that task? asked 06 Jul '12, 17:23 Baloo Uriza |
The way should certainly not get a ref tag based on the relation, and most certainly not by way of a bulk change. answered 06 Jul '12, 17:37 Frederik Ramm ♦ Though if the relations are accurate, what's the problem with generating the refs from the relations?
(06 Jul '12, 19:04)
Baloo Uriza
3
Problem is that you are generating data duplication with it. If the ref information already exists on relations then it should not exist on the ways any more.
(06 Jul '12, 19:09)
RM87
That's kind of what I was thinking, too. However, in practice, since Mapnik doesn't render relation references, people will add them anyway. In places like Oklahoma, where duplex routes of 4 different refs aren't uncommon, an incomplete ref isn't the answer.
(06 Jul '12, 19:30)
Baloo Uriza
4
If the standard mapnik rendering does not render ref tags from relations then it is a rendering issue. If you do a search on trac then you can find a ticket about it: https://trac.openstreetmap.org/ticket/2610 . Sadly it is still waiting implementation. But it does not mean that in the meantime data duplication should be generated because of rendering shortcomings.
(06 Jul '12, 19:59)
RM87
True enough, but it is exploiting a human shortcoming in the meantime.
(06 Jul '12, 20:15)
Baloo Uriza
While I agree with the sentiment that it is duplication of data and would rather not do so, this is the only reasonable way to do it right now to get anything sensible in both rendering and routing data. Mapnik, MapQuest, OSRM, YOURS, cloudmade... they all use ref=* on ways. And as pointed out by the trac ticket above, it has been this way for years which means that by now, tagging the highway ref on ways is a very well established standard in the US, like it or not. I would be happy to do a mass edit to remove them... when enough tools support route relations.
(06 Jul '12, 23:12)
ToeBee
Is MapQuest actively maintaining and accepting it's own mapnik styles on Github? I'd be interested in fixing the problem for the base mapnik and MQ mapnik if possible.
(07 Jul '12, 02:15)
Baloo Uriza
showing 5 of 7
show 2 more comments
|
I'm not sure why you'd want to copy relation attributes to constituent ways within the data itself. If it's for use on a Garmin map, have a look here at the use of "apply" to acheive the result of having the way labelled with relation refs. answered 06 Jul '12, 19:24 SomeoneElse ♦ Largely to head off some tag fiddling people do to make route refs render otherwise. Though I'd be interested if Lambertus is generating garmin tiles that take refs from relations overriding refs on ways.
(07 Jul '12, 02:14)
Baloo Uriza
|
Why does the way need a ref tag, if the refs are already in the relations?
This question gets downvotes for, I assume, proposing a method that is presumed to be wrong (see Frederik's answer). Down- and upvotes on a question should be solely on the technical merits of the question itself (is it well-formed? Not a duplicate? Not solliciting opinions?) and not on the methods suggested. For that, we have discussion forums and mailing lists. This is, the way I see it, a site for practical, answerable questions based on reasonably scoped real-world problems. We should not clutter it by opinionating.