Hi, I am testin to extract a .csv file from the germany-latest.osm.pbf including latitude, longitude, street, hausnumber, and city.

But when I let the following command run, I get a csv file with mainly only latitude and longitude entries, all the other address information is missing: ./osmconvert germany-latest.osm.pbf --csv="@lat @lon addr:street addr:housenumber addr:city" -o=3.csv

What am I doing wrong?

Thank you for your help

asked 18 Aug '16, 10:53

Stephano007's gravatar image

Stephano007
617710
accept rate: 0%


osmconvert doesn't do any filtering. So --csv="@lat @lon addr:street addr:housenumber addr:city" includes every object with a latitude and longitude, which is every node in the file, regardless of whether it has an address or not.

You can take a look at the companion tool osmfilter. It first requires using osmconvert to translate the .pbf into a format it understands, you will likely want the --all-to-nodes option when you do this step. Many addresses are associated with OpenStreetMap ways and relations, objects which do not directly store location information. The --all-to-nodes will extract a location for them.

permanent link

answered 18 Aug '16, 13:54

maxerickson's gravatar image

maxerickson
10.5k1071147
accept rate: 30%

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:

×36
×1

question asked: 18 Aug '16, 10:53

question was seen: 1,409 times

last updated: 18 Aug '16, 13:54

powered by OSQA