OpenStreetMap logo OpenStreetMap

Editing with Overpass and Level0

Posted by escada on 20 December 2014 in English.

Recently I noticed that the links that I have been using for heritage:website in Flanders were broken. Since this has been going on for a couple of weeks, it is not just a temporarily hiatus, but a permanent problem. So I have to update them all.

The old format was http://para.ms/relict/<relict-number>

The new URL is https://inventaris.onroerenderfgoed.be/dibe/relict/<relict-number>

First, I use an Overpass query to find all those listed buildings.

Result of Overpass query

Overpass allows you to open the result in an editor, e.g. Level0.

Export from Overpass

Level0 is a “simple” editor that allows you to edit OSM data

The data in Level0

The editor is so simple that there is no find+replace functionality. So I copied all the data into a text editor on my computer. There, I replaced the wrong URLs with the correct ones. This is a straightforward operation on any text editor. Then I copied all data back into the Level0 editor.

I logged into OSM. You can find the login button just above the data section, on the left. I confirmed the OSM dialog in order to allow Level0 to use my account

Level0 account confirmation

The result is that Level0, now knows who I am Level0 knows how I am

After filling in a changeset comment the data is ready to be uploaded Updated data and changeset comment

is this a mechanical edit ? Not for me. I added at least 90% of those URLs myself. I checked several URLs myself and found that none of the old URLs were working anymore. So for me this is just a resurvey of data.

I also used this principle to update some fire hydrants that I added without specifying the type of the hydrant. This mechanism was also used to add some wikidata numbers to administrative boundaries in Belgium. Since I manually looked up the wikidata, this was not a mechanical edit neither.

I admit that this can be used to perform mechanical edits, but nevertheless I consider it as a powerful tool to quickly edit some incorrect data.

Discussion

Comment from Polyglot on 20 December 2014 at 17:29

Hehe, my first thought was also: mechanical edit. On the other hand, anything that helps mappers be more productive has my blessing.

I would probably have used Notepad++ to perform the search/replace as it supports regex (regular expressions; a very powerful way to work with text and morph it).

Thanks for looking into this. There is a good chance it will come in handy later on.

Polyglot

Comment from joost schouppe on 21 December 2014 at 01:03

Thanks for the write-up. Looks like a good way to fix errors. Can’t see how anyone could have anything against this method.

Comment from marczoutendijk on 21 December 2014 at 10:54

Indeed a helpful tool for some of the tasks we sometimes have to do!

Comment from jgpacker on 8 January 2015 at 10:51

@joost This method would normally be seen as a mechanical edit because the user doesn’t analyze each object and makes automatic changes instead, but the particular action he made isn’t a problem, considering the reasons he describes at end of his post.

Comment from dieterdreist on 11 February 2015 at 16:17

I also think this is clearly a mechanical edit, but I don’t have any objections in this case that it was done.

Comment from escada on 11 February 2015 at 17:15

I could have written a program that called http://para.ms/relict/ (the old scheme) for all numbers between 1 and 999.999 and counted how many 404's were returned. And only proceed when the answer was 999.999. In that case I would have analysed each URL, not ?

As for the the fire hydrants, I want to stress that I only edited those objects of which I was the last editor. Even when they were simply moved by someone else, they were not included in the overpass query since the “username=escada” part would not return them.

I could not repeat that one, as I have added underground fire hydrants since then.

Comment from ff5722 on 22 November 2016 at 12:48

Just an additional tip in case you’re using this method for more complicated things: you can download an OSM file of your changes in Level0, then open this in JOSM to have a more visual validation check.

Log in to leave a comment