Search objects based on a specific criteria (Key:name:etymology) in JOSM

Posted by ads' corner on Thursday, 2020-11-12
Posted in [Openstreetmap]

This posting is mainly a reference for myself, because I was looking for this specific issue a couple times.

OpenStreetMap (OSM) is a map of the world, created by anyone who wants to contribute. It so happens that data might be missing (just go and add it, if you see that something is not on the map). It also happens that someone adds too much data.

In my case someone added “Wikidata” entries to each and every footpath.The OSM folks in Berlin made a great effort to find the etymology of names, and add them to Wikidata. And then link the street names to the Wikidata entries. That’s nice and very useful, but it’s enough to do that forĀ streets. Not for every path, including the underground parking.

I raised this in the Berlin Telegram channel, and we agreed that it’s best to keep the etymology tags to the main streets. Now I had to find all the entries which were tagged with a Wikidata entry, and update most of them.

For this task I started JOSM (Java OpenStreetMap Editor), zoomed to the area I’m interested in, and used the search option for the selection:

Selection in JOSM
Selection in JOSM

Once the search window opens, enter the following query:

1
"name:etymology:wikidata"=*

Selection in JOSM
Selection in JOSM

This selects every entry with a etymology entry in Wikidata. Therefore if you want to select all entries without this specific tag, you can negate the query:

1
-"name:etymology:wikidata"=*

Hit Search, and the Selection box will show all matching entries.

Selection in JOSM
Selection in JOSM

And on the map itself, all matching entries are marked in red:

Map in JOSM
Map in JOSM

To deselect the current query, just click somewhere into the map.

This selection made the update task easy, from here I have two different ways forward:

  1. If I just want to delete the tag from ALL entries, I can do that in JOSM in the Tags box. Select the entry, hit Delete. However that will also delete the Wikidata entry from the streets.
  2. Click on all (or a few) of the footpath which have this Wikidata entry, you can select multiple entries by holding down the Ctrl key. And then repeat the deletion of the Tag in the Tags box. Run the search again (just use the small arrow next to the search button to select the last search), and see if you missed something.

Save your changes!

Screenshots made by me, copyright of the OSM screenshot: OpenStreetMap Contributors.


Categories: [Openstreetmap]