-
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
Railway=tram no longer rendered when the way also has a highway tag #874
Comments
Taginfo tells us that there are 9 047 objects with both railway=tram and highway=*, out of 68 539 objects with highway=tram. There are 51 731 objects with both a railway and a highway tag. Out of these, 35 177 are railway=abandoned and 1 568 are railway=tram_stop. That leaves 5939 objects unaccounted for. |
This is an example of a way with highway=service and railway=tram: https://www.openstreetmap.org/way/60112647 |
I don't like the railway=* and highway=* tagging on a single way very much, because it gets messy when adding additional tags: what do oneway, maxspeed, voltage etc mean on such ways? However, this is the existing scheme, so I guess we will have to support it. Any ideas on how to implement this in a computationally feasible way? |
Probably with some sort of |
Good idea, that would work. Although it would again make the queries more complex. |
Any ETA on this issue? Many cities are now missing some or (almost) all of their tramway rails in the default OSM rendering. |
I agree this is urgent. I don't have time to fix this right now, we can consider reverting the change that caused it. |
I'd rather not - it was #626 that caused this, and unpicking that and reopening all those other bugs would be a nightmare. I'd rather keep the merge and fix this. |
Value of railway tags for objects with a highway tag:
|
415 times railway=rail is probably not something to ignore although it's limited compared to the others. It was also never rendered because we only had an exception for railway=tram, so the number will probably increase once we start rendering it. A union is probably the way to go, even though it increases query complexity even more. |
So your line of code currently says this (and there are 2 similar ones): I'd try changing that to: Of course, I haven't tested this at all. I'm a programmer with some SQL knowledge, but I'm not familiar with your code and don't have a testing setup for it. |
The mml file is JSON, so you really need to be careful with converting newlines, quotes, and backslashes. I don't believe the roads query is all as one line. |
@kkofler Thanks for your help. I get:
I have no time now to do extensive debugging, do you know where I should add the 'AS blabla' in the query? Possibly a MySQL / PostgreSQL dialect difference? |
Between "))))" and "order by prio". (And I think it's not a dialect difference, but just me not having enough SQL practice to get such details right. :-) ) Don't forget that the queries for the bridges and the tunnels need the same changes. (I think you can just paste my query and replace the 2 where clauses with copies of the where clause that was originally there.) |
And maybe roads_casing as well for consistency.
The ORDER BY are also different, but apart from that I think they should be the same. |
Would it be totally over the top to start working with views for such situations? @pnorman will probably be able to say more but in my experience, the performance hit is negligible. And while having to create views before one can use the style might seem cumbersome, having the aforementioned SQL in three or four different places would certainly not make the whole thing more accessible to newcomers. ("Duh, is this the same query here or is it slightly different...?) |
Afaik only hit is a very minor one in the stage which converts the query into a representation that can be planned from. The issue is it we then need to deal with database schema migrations. |
Nearly, we also needed to add prio in the select part of the two subqueries. Now I think it works, but I still need to merge the recent changes in. |
Make sure that ways that have both a highway and a railway tag are rendered both as highway and railway. This resolves gravitystorm#874. This assumes gravitystorm#866 and gravitystorm#884 are merged first. Thanks to @kkofler.
It's bad, that rendering of tramlines was broken. It's worse, that this isn't fixed for long time now. This bug affects openstreetmap really big. Priority=Blocker! |
@Cotta-R Your comment is unnecessary and is not helpful either. |
There is a pull request now, what is it waiting for? I can understand Cotta-R's frustration somehow, considering that the regression has been ongoing for 2 weeks now. And I already did what I could to help get this fixed. |
There has been a pull request for just three days and one that has some performance issues (see the comments on #894), so it's not an unequivocal easy merge. Regardless, if you think that project maintainers should commit to an SLA that requires them to fix everything within three days, especially during a popular holiday period, then you're in the wrong project. |
Hmm. We are a volunteering project, but that doesn't mean we shouldn't aim for quality. I would welcome any suggestions on how to minimize regressions (and the time before they are resolved) in the future - taking into account the limited personal resources we have. |
There's a performance decrease of only 0.38%, and pnorman, who measured it, also wrote that he thinks it's probably worth it. It was expected that the more complex query to get this right would take longer. That doesn't mean it isn't the right thing to do. I also don't see any benefit in waiting, I don't think we can realistically speed this up significantly without reintroducing the bug, and even if we could, the speedup can always be applied later. |
Hmmm, I still don't see the tram rails getting rendered in the affected places, are we sure the fix works? Or did the change not go live on osm.org yet? |
release is not active right now: |
The fix finally got deployed yesterday: |
Railway=tram is no longer rendered when the way also has a highway tag.
Due to the collapse in the SQL, we render ways that have both a railway tag and a highway tag only as highway. However, until #626, there was an exception for railway=tram, which was rendered even when tagged on a highway way.
Is a way with both a railway and a highway tag correct tagging? I suppose it is, because it is frequently used. In which cases should we render both the railway and the highway tag? The answer 'in all cases' would lead to a combinatorial explosion (number of railway types times number of highway types).
Reported on talk.
The text was updated successfully, but these errors were encountered: