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

osmconvert modify-node-tags TAG_MODIFICATION_LIST format help

1

Hello all,

I have a problem when trying to modify the column headers of my osm.pbf file when using osmconvert. I am trying to change the 'osm_id' to 'FCODE'. I think I have the syntax correct, but am honestly unsure. All the documentation I find online keeps repeating the information in the wiki which is not that helpful. This is the line of code where I try to accomplish that:

osmconvert64.exe new_syria.osm.pbf --modify-node-tags="osm_id=536143307 to FCODE=536143307" -o=new_syria_mapped.osm.pbf

The example from the wiki is as follows:

./osmconvert a.o5m --modify-node-tags="amenity=fire_hydrant to emergency=fire_hydrant" -o=new_hydrant_syntax.o5m

Any help would be greatly appreciated.

Thanks,

Zach

asked 02 Nov '17, 14:42

Zach%20Moose's gravatar image

Zach Moose
41113
accept rate: 0%


One Answer:

1

Hello Zach,

the --modify-tags option is meant for tags only. Are you sure there are tags with the key "osm_id" in your data? It looks to me as you would try to rename the object ids of OSM datasets. However object ids do not have names, the are just numbers which identify objects within the OSM data world (nodes, ways, relations).

It usually does not make much sense to add an object id as tag. All what you get is redundant information. What do you need it for? What is the subsequent process?

Greetings, Markus

answered 21 Nov '17, 21:08

Marqqs's gravatar image

Marqqs
448510
accept rate: 22%

Hi Markus,

Thank you for your response. I should have closed this answer as I figured out what I needed to do. I was in fact editing column names of the data. I accomplished this by loading the data into a Postgis database, manipulating the column names and attributes and then using the ogr2ogr tool to convert to shapefile.

Thank you for your input and clarification on tags.

Zach

(21 Nov '17, 22:12) Zach Moose

Source code available on GitHub .