NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Thank you for providing osm cake, that is wonderful an offer.

Attempted to read india-latest.osm.pbf to .csv file using osmconvert.exe. Built structure with following keys: addr:street addr:postcode addr:district addr:subdistrict addr:state addr:country @id @lat @lon

The outcome showed values only for three keys: id, latitude, longitude. The rest were null. Need your support to know the reason for null output and how get value instead.

The command used in osmconvert.exe is given below osmconvert india-latest.osm.pbf --csv="addr:street addr:postcode addr:district addr:subdistrict addr:state addr:country @id @lat @lon" -o=indiancountry.csv

asked 23 Aug '18, 05:34

mbracedevelop's gravatar image

mbracedevelop
11112
accept rate: 0%


I'm not 100% sure how osmconvert works, but I suspect that if there is no tag for those keys, then it will output a null value. So what you're seeing makes sense. Additionally, OSM has plenty of objects that do no have address details, so you might want to filter it first.

permanent link

answered 23 Aug '18, 12:28

rorym's gravatar image

rorym
5.4k1449100
accept rate: 11%

1

Yes you will need to filter the data only for those keys: something like : 1. osmconvert india.pbf --out-o5m >india.o5m 2. osmfilter --keep="addr:street"= india.o5m >india.addr.o5m 3. osmconvert to csv.

You will probably need quite a complex filter to cover addresses with only some of the addr:* tags you want. Also if you want pure lat/lon I'd recommend using --all-to-nodes.

(23 Aug '18, 14:35) SK53 ♦

Tried the script. Displayed error :could not get 183500800 bytes of memory

(25 Aug '18, 04:54) mbracedevelop

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:

×47
×42
×22

question asked: 23 Aug '18, 05:34

question was seen: 2,233 times

last updated: 25 Aug '18, 04:54

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum