I have to confess: many years ago I made a noob tagging mistake - one that I have been perpetuating ever since! Shoot me now ;-) I started custom tagging buildings around my university campus with 'building_number', corresponding to our organisational numbering of buildings. I realised much later, that I should have done something with a namespace that at least made some sense. I'm thinking 'unimelb' (our main domain name) would be an appropriate namespace that we may reuse in other ways, and therefore the tag I'd use would be unimelb:building_number or something like that. Is this making sense so far? Is this the right way to go about it? My next problem is, that there are now quite a few of these buildings, and being a point and click type of person, it represents quite a bit of work to change - a bit haphazard, too. I'm sure there must be a way of making a bulk change using some sort of command line/API magic. Am I right? Should I attempt this, or should I talk to someone with stronger query fu? I have been tagging the buildings concerned (about 95% completed) with operator="University of Melbourne", partly so they're easier to isolate and style in Tilemill, but I figure it might also make it easier to perform the change I'm intending. Any input/suggestions/help gratefully received! asked 07 Feb '14, 03:34 woowoowoo he_the_great |
My answer is similar to jgpacker's, but can be done more quickly and all within JOSM.
What this will do is retain the respective value field for each of the objects, but change the key for all of them. For example, building_number=100 would become ref=100. This saves having to edit each one individually or edit an .OSM file. answered 07 Feb '14, 17:07 alester 1
Oh, I was under the impression this was possible, but I couldn't test it at that time. I was going to forget about this anyway, so thanks.
(07 Feb '14, 17:18)
jgpacker
1
yep - this is a winner. discovered it myself and ran a few small tests very successfully. Big thanks to all :-)
(07 Feb '14, 21:33)
woowoowoo
|
In JOSM, you can simply search(ctrl+f) for building_number or building_number:* and you will find them. That's probably the first thing you want to do to verify that only the buildings you added that actually have this tag. If you want to automate this process, you may do the following: After downloading the university via JOSM, save it as a In this case, you probably want to use
permanent link
This answer is marked "community wiki".
answered 07 Feb '14, 11:11 jgpacker 1
I've found the JOSM TODO_list plugin useful for working down a list:
(07 Feb '14, 11:26)
SomeoneElse ♦
|
I believe the JOSM editor has functionality to find downloaded items with a specific tag. I don't believe there is anything which well help you bulk modify these tags. The OSM community has had strong reservations about bulk modifications, so tools are written without this capability. I'd love to be shown wrong though. answered 07 Feb '14, 04:27 he_the_great 1
hmm - yes, I'm aware of the 'dangers' of bulk processing, but are there not bots which do automated processing? scuse my ignorance on this. In any case, is my thinking around the right way to tag these correct? - with the unimelb namespace?
(07 Feb '14, 05:17)
woowoowoo
2
There are bots, but these must go through long formal review or risk changes being reverted. I don't have an answer for how to tag your buildings (there are questions about tagging university buildings somewhere).
(07 Feb '14, 05:34)
he_the_great
ahh - that makes sense. To be honest, I've found JOSM too clunky in the past, but was just having another look at it, and it's improved markedly since my last encounter. Seems to make the process less painful, so I guess I'll be going that way. Thanks for your help.
(07 Feb '14, 05:38)
woowoowoo
1
If you really want to get risky, save the downloaded area as a OSM file which is just a XML text file. Then use a text editor to find and change the key name on your custom key. Fire JOSM back up, load the OSM file, verify your changes and then up load.
(07 Feb '14, 06:14)
n76
|