[Talk-GB] Select and correct a discovered key duplication of sorts in JOSM

Dan S danstowell+osm at gmail.com
Sat Aug 19 14:33:17 UTC 2017


Hi

Overpass lets you search for things like this, and then export them into
JOSM. You can do it via http://overpass-turbo.eu/ - but to do it
case-insensitively, you need to know this tip with regular expressions:
http://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#Key.2Fvalue_matches_regular_expression_.28.7E.22key_regex.22.7E.22value_regex.22.29

So what I'd do is:
1. In overpass-turbo, construct the query using case-insensitive regular
expressions: [~"^ref:Chiltern_Society$"~".",i] - if you follow this link
you'll see I've done it
http://overpass-turbo.eu/s/r4W
You can click "Run" to execute this query.
2. I'd suggest lowercase is the best thing to go for.
3. After you have run the query, click "Export" and load it into JOSM. In
JOSM you can then use the program's own search tool to select all the
objects which use that key, and you can then convert them all in one go.
You can then upload.
It's possible that some would find this upload controversial: editing over
1000 objects in a single find-and-replace is verging on the kind of
automated edit which many people would say needs community approval. In
this case since it's a specific region and if as you say it's your own
edits you're revisiting, you might be OK...? Not sure.

Best
Dan





2017-08-19 15:53 GMT+02:00 Bob Hawkins <bobhawkins at waitrose.com>:

> I discovered to my dismay yesterday while I was adding/updating Public
> Rights of Way in JOSM that I have been using a mix of initial upper case
> and lower case alone for a key I created: ref:Chiltern_Society and
> ref:chiltern_society.  I have tried searches that will select
> Chiltern_Society, say, by using a ā€œCā€ in the search, for case sensitive,
> without success.  I have covered a large amount of South Oxfordshire with
> my additions and updates.  I have three questions, I guess:
> 1. how do I search this whole area of OSM in my search to know that all
> cases have been found?
> 2. what should the key be, now that I find myself in this situation:
> ref:Chiltern_Society or ref:chiltern_society?
> 3. what would be the best method of changing all deemed to be incorrect
> without carrying out changes singly?
> I appreciate this matters not at all so far as the data is concerned.
> Having discovered it, however, I should prefer not to have to live with
> it.  Furthermore, will the two keys remain in the list of keys displayed
> when adding or editing tags?
>
>
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> Virus-free.
> www.avast.com
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
> <#m_2724482478730571796_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> _______________________________________________
> Talk-GB mailing list
> Talk-GB at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/talk-gb
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk-gb/attachments/20170819/29b6e06c/attachment.html>


More information about the Talk-GB mailing list