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%


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

permanent link

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
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×37
×2

question asked: 02 Nov '17, 14:42

question was seen: 828 times

last updated: 21 Nov '17, 22:12

powered by OSQA