I screwed up. I did a lot of work editing Tiger data in my hometown of Homer, Alaska. Afterward I read about updating the Tiger-reviewed tag on all those ways so that subsequent Tiger imports wouldn't overwrite my changes. Not wanting to edit each way individually I merely selected multiple ways in JOSM and changed the Tiger tags to Tiger-reviewed=yes. A dozen or so big selections later I was done. Earlier this week I discovered to my surprise and chagrin that every single NODE included in my selections now carries the Tiger_reviewed=yes tag. That was certainly not expected and I would lke a way to undo those changes. A roll-back is not desirable because a ton of other useful edits would get tossed with the Tiger tags. I could do what I need to do in a desktop database like Access with a fairly simple SQL statement but the OSM database is a different beast altogether. My question: Is there any way to select just those nodes that have the Tiger_reviewed=yes tagging in my neighborhood and delete that tag? The ways are fine with that tagging of course. It's just the nodes I want to strip of Tiger tags. asked 14 Apr '13, 15:25 AlaskaDave aseerel4c26 ♦ |
Type the following in the search box in JOSM
More examples of search queries: http://wiki.openstreetmap.org/wiki/JOSM search function answered 14 Apr '13, 18:05 cartinus I tried every combination of your suggested query that I could come up with. Tiger_reviewed:yes type:node type:node key:"tiger:reviewed=yes" type:node tiger:reviewed type:node key:tiger:reviewed and even type:node key:tiger yes None of these produced results. I tried them both with and without an active selection. WTF? Finally I hit on simply selecting ALL nodes, i.e., only the words type:node in the search box. I discovered that the nodes making up the ways I tagged do not inherit tags from their "parents" so when the results appeared I merely deleted the tiger:reviewed tag. It affected nodes only, which is just what I wanted. Thanks for your help...
(14 Apr '13, 19:24)
AlaskaDave
Try ("tiger:reviewed"=yes) (type:node) By the way, am I doing it wrong? Instead of changing tiger:reviewed=no to yes I delete the tag.
(27 Nov '14, 03:09)
n76
|
Here's an example of doing a mass change. Let's say you forgot to add "http://" in front of every 'website' url tag you added and now want to correct this. In Overpass turbo, you can select your area/edits by modifying the following query:
You can then open the results of this query in JOSM, and save it to a .osm file. After it's saved, you can use xmlstarlet to modify the tag. You also need to add 'action=modify' to the nodes you changed. Finally, compare the original and your edited file.
Load the edited file into JOSM, validate it, and upload. Of course the usual caveats regarding mass edits apply, so make sure you are only fixing your own mistakes or have circulated you change with correct mailing list. answered 26 Nov '14, 13:56 brianegge Thanks Brian, I did those edits long ago in JOSM but your answer intrigues me nonetheless. Lets say I want to substitute one sub-string for different one? These are all my own additions I'm wanting to edit. It's a special case where I used a description:en tag set to Mile Zero Milestone and want to change that to read Kilometer Zero Milestone. There is other information in the description:en that I want to keep which is why I want only to replace the word "Mile" with the word "Kilometer".
(27 Nov '14, 07:40)
AlaskaDave
A quick look at xmlstarlet convinced me that I don't want to learn its intricacies at the moment. So perhaps you'd be willing to provide the command line? By the way, I'm running Windows, not Unix, and there are approximately 40 nodes (no ways or relations) that need editing. Thanks again Dave
(27 Nov '14, 07:40)
AlaskaDave
xmlstarlet is tricky - but powerful. The two commands I wrote should have been able to have been written as one, but I couldn't figure it out. You can use a text editor to do search/replace. For 40 nodes, it might be easiest to edit them manually in JSOM. You can do 'Search Next', and then edit your tag.
(27 Nov '14, 12:01)
brianegge
Thank you both for responding. I can do this edit in JOSM, and yes, the ToDo list plugin is helpful. I've used it before in similar situations. I want to eventually learn how to download OSM data into a local postgreSQL database and manipulate it with SQL commands, with which I am already familiar. The mention of xmlstarlet got me thinking along those lines. Cheers
(28 Nov '14, 00:29)
AlaskaDave
|