OpenStreetMap logo OpenStreetMap

Small cause, big impact

Posted by mabapla on 28 July 2008 in English.

Hello everybody.

Have you noticed OpenRouteService (http://openrouteservice.org) already?
It's really cool and works quite well already, better than I thought it would as it's still pretty new AFAIK.
I already found some mistakes by trying several route calculations:
-The end of the A 23 near Heide had the oneway flag of the very last piece of road at the end of the Autobahn wrong in northern direction. So a big detour is calculated for Hamburg -> Tönning. It's corrected in OSM but OpenRouteService didn't update their data yet so you can still see it.
-A piece of the A 7 north of Northeim (which is north of Göttingen) in southern direction had been deleted. I put a mark in OpenStreetBugs (http://openstreetbugs.appspot.com) and somebody brought it back - thanks!
-The bridge of the A 8 over the B 313 near Wendlingen (east of Stuttgart) in eastern direction also had the oneway flag wrong. So the route sent you on the exit ramp and then back on the Autobahn. Subtle, so I'm glad I noticed it.

I'm sure we'll find many more mistakes like that as route calculations are much more sensitive to errors in the OSM data than the map renderers.
Especially, I see a lot of ways that should have a connection with another way but actually they don't. The distance is usually so small that you don't see it in the rendered maps but route calculations reveal them.
This seems to be a problem with Potlatch not snapping the way to the other way in some cases as all the cases where I've seen this were created_by=Potlatch 0.XY.
Also, people sometimes just draw a way across another way without connecting them which is very bad for routing algorithms. If two ways intersect, it should be clear in the OSM data what it is: An actual road crossing, a bridge or a tunnel.
I'm not pointing at any examples as I don't want to fingerpoint at anybody's work here. Also these errors are so frequent that I'm sure you'll find some near you so you can check my claims.

CU, Markus

Discussion

Comment from LivingWithDragons on 28 July 2008 at 12:37

Make sure you check any cases in real life.
I have frequently found roads that stop just before another road, with a thin brick wall separating them. Sadly on the renderer this can look like they connect.

Comment from Richard on 28 July 2008 at 19:52

Would be interesting to know the X and Y. :)

There is a known issue if you upload a new way, starting on a new node from another way, before the server has returned a response to the first way. In this case the two different write operations will return two different node IDs so the connection isn't made. It shows up most often at times of high server load. I'm working on it but it's not an easy one...

Comment from mabapla on 29 July 2008 at 12:30

Hi LivingWithDragons, hi Richard.

It's clear that you have to check whether the connection is actually missing.
I checked some cases in YWMS and it's pretty clear that they should connect. Don't worry, I'll check every case before changing it, no question!
Then there are cases where one way intersects the other and ends, say, half a meter after it. I think it's clear that a junction was intended but the editor didn't snap to the other way.

Richard, as you are the author of Potlatch let me (being a programmer as well, but C++ at work and Java at home) first express my respect for your achievement of writing Potlatch. If I critize stuff then it's not to bash Potlatch but to hopefully help a little to find improvements. I'm sure that OSM wouldn't be where it's today without this low-barrier entry to editing the data. If people create more errors with it then we'll have to cope with it and try to minimize the causes for it.

Can you first comment on the snapping please? Does Potlatch increase the snap-to-way radius at lower zoom levels? If not then it really should if you ask me.

I'll have to check some of the problems I know in my area to see the version number as I don't have JOSM here at work and Potlatch doesn't show the created_by tag. I'll let you know but I'm quite sure some of it was 0.10 which is probably what you're most interested in.
I think what you are describing is the cause for at least some of the duplicated nodes I see. With your description, it sounds rather obvious to me that you should first write all changes, wait for them to complete, and then write the additions. Could it be that JOSM (which doesn't seem to suffer from this problem) does it like this? It clearly lists what it will change, add and delete which implies that these are separate steps.
The other main problem I see, as already described above, are completely duplicated ways, i.e. Potlatch must have made a completely new copy of the nodes and the way and uploaded that.
I'll also look up one of these and let you know.

While we're here, another point I have about Potlatch is that it's rather easy to accidentally create "key=whatever" tags. I had one town where somebody created a lot of these instead of "name=whatever" (he added the names later so the tags offered automatically for a residential road couldn't help). And it's easy, you just need to forget to change "key" to the tag you wanted and it's there. I think Potlatch should warn you that "key" must be changed to the actual tag name.

Cheers, Markus

Comment from mabapla on 12 August 2008 at 22:45

Hello Richard.

I promised to provide you with sample problems.
Here's one example of the many duplicated nodes for you to look at:
http://www.informationfreeway.org/?lat=51.07504681579814&lon=7.011004998236302&zoom=17&layers=B000F000F, nodes id=283253529 and 283253533, both lat=51.1490567,lon=7.0179454. Potlatch 0.10b it seems. Result is that the two roads aren't actually connected from the viewpoint of a routing algorithm. :-(
As for the duplicated way nodes here is one of these:
http://www.informationfreeway.org/?lat=51.07504681579814&lon=7.011004998236302&zoom=17&layers=B000F000F, node id=29680417, lat=51.0751697, lon=7.0108352 at intersection of Elsbachstraße and Dechant-Krey-Straße.

I also mentioned the unconnected ways. Here's an area with a lot of these:
http://www.informationfreeway.org/?lat=51.060180640321384&lon=6.9582513227575165&zoom=17&layers=B000F000F
You don't see it on the rendered map, but if you zoom in far enough with JOSM or Potlatch, you can see missing connections, e.g. at Boberstraße and Butterheiderstraße. There is also Samlanstraße a bit to the north-west which was created with Potlatch 0.10b. (Don't let yourself be confused if you see me as author. I just removed some abbreviations (str. -> straße).)
As I already said, but I can't stress this enough, these missing connections are deadly for routing applications. Plus another result is open areas (lakes, landuse etc.) which are then not rendered by Mapnik. (About which he is totally right in my opinion. Areas have to be closed.) So if you could comment if I'm right about the snapping radius in Potlatch, that would be really good.

I haven't found a duplicated way yet where I'm sure it was Potlatch. Could be JOSM as well :-) or maybe two people editing at the same time. Sometimes people probably just draw another one on top of an existing one, but I don't mean these, I mean identical copies (often with added attributes).

Another thing I keep seeing a lot is untagged ways. With JOSM you get a warning before uploading if you have the validator plugin installed (but I think none without it, which isn't good either). I think all editors should warn you about this as this is almost never intended.

I'm eager to hear you comments.
So long,
Markus

Comment from Richard on 31 August 2008 at 09:24

Hi Markus,

Thanks for the comments, appreciated as ever.

I'm not sure from them whether or not you've ever used Potlatch but, if not, it would be worth you doing so. You'll see, for example, that ways get larger as you zoom in which (by definition) increases the click area.

Please see http://lists.openstreetmap.org/pipermail/talk/2008-August/028988.html for a more detailed explanation of the duplicated node issue. I do note your comparison with JOSM but the editing model of the two is completely different, so it's not just as simple as borrowing its behaviour. Because JOSM uploads modally in one (user-prompted) operation, the connection is already made by the time the node is uploaded, so there's only one ID. But because Potlatch uploads modelessly, the connection hasn't been made at the time the node/way is initially uploaded.

As the message explains this will be fixed but is not a five-minute job. However, it's then reasonably simple to write a bot which iterates over the planet file and automatically fixes any duplicated nodes at the same position created by Potlatch.

For untagged ways and key=, the intention is ultimately to have an integrated help system that provides suggestions as you go along. Potlatch doesn't "block" the user by throwing up modal dialogs every time something, that's contrary to its design - for example, untagged ways are very strongly favoured by some people (see wiki passim). The aim is to make the user aware of what they're doing and how to fix it, but allow them to do differently if they want to.

Until then, remember these are human beings doing the editing, and they can be contacted! You can use the site messaging system if you see someone making the same mistake repeatedly. OSM's a friendly community: people are generally receptive to suggestions if phrased nicely!

Final note, it really really helps if you can use trac for bug-reporting; having to monitor the diaries, diary comments, talk@, dev@, the forum, the national mailing lists, the wiki, IRC, my personal e-mail, and doubtless some other channels I've forgotten, gets really wearing... if it's in the same place then things are less likely to get forgotten. Trac's also much more efficient for the developer (you can assign bugs as duplicates, for example) so means I can spend less time discussing and more time coding. :)

cheers
Richard

Log in to leave a comment