This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

How to do complex edit of tag data for many objects through text input ?

1

I would like to fix broken URLs in the source tag of many objects and also include a "GPS;" prefix. I will need to change the domain name and insert the prefix. This is not something that can be done with the simple UI editor of Id or JOSM.

Is there a way (JOSM?) to edit objects manually using text manipulation (.osm extension?) before uploading them to OSM?

asked 26 Sep '21, 08:27

cmoffroad's gravatar image

cmoffroad
205151727
accept rate: 0%

3

curious: What is a "GPS" prefix in an URL?

And a thought: Does it make sense to update source tags at all, where we usually tag the sources to the changesets nowadays?

(26 Sep '21, 19:27) TZorn

hi. don't forget to accept an answer, otherwise your question will still figure as unanswered.

(28 Nov '21, 12:53) mariotomo

4 Answers:

2

what about you:

  • download the data into JOSM,
  • save the data in an .osm file,
  • edit it with your favourite text editor (or even through sed -i),
  • reload into JOSM,
  • upload to OSM?

(but I support the answer by h_mlet, the OP's question is really a very good use case for level0)

answered 26 Sep '21, 13:32

mariotomo's gravatar image

mariotomo
3006819
accept rate: 0%

edited 25 Nov '21, 13:48

1

I've never used it myself, but Level0 editor was made for that kind of operation I think.

Regards.

answered 26 Sep '21, 14:22

H_mlet's gravatar image

H_mlet
5.4k1781
accept rate: 13%

I also keep hearing about this "level0" and I still can't decide I should try it out. ;-)

(26 Sep '21, 18:52) mariotomo

0

If the objects you want to modify have some common tag, and others have not: - Download area of interest to JOSM. - Search all objects after the unique property. - Select all found objects. - Change the tag/tags. (Which mean all the found objects are changed simultaneously). - Upload

answered 28 Sep '21, 08:00

Msiipola's gravatar image

Msiipola
227171826
accept rate: 0%

0

Try Level0 (http://level0.osmz.ru/). You can copy the text into an editor like VSCode or Sublime Text where you can do advanced string manipulations, using RegEx for example. When done, copy the text back to Level0.

answered 28 Nov '21, 05:17

Privatemajory's gravatar image

Privatemajory
1.1k142233
accept rate: 23%

Source code available on GitHub .