I'm new to OSM and I'm particularly interested in address point data. Currently I'm hoping to extract address point data using osmosis:

osmosis --rx washington-latest.osm --tf accept-nodes 'addr:housenumber=', 'addr:street=' --tf reject-ways --tf reject-relations --wx ap_hn_st_nd_only.osm

I found that many nodes that have housenumber and street information do not have a city or state tag. For instance:

<node id="31368542" version="8" timestamp="2016-07-08T22:50:39Z" uid="137875" user="lukobe" changeset="40602379" lat="47.6611364" lon="-122.3140309"> <tag k="name" v="Neptune Theatre"/> <tag k="source" v="local knowledge"/> <tag k="amenity" v="theatre"/> <tag k="addr:street" v="Northeast 45th Street"/> <tag k="addr:housenumber" v="1303"/> </node>

Is there a way to find out and backfill the data? For my use case, housenumber, street, city, and state are indispensable.

asked 05 Mar '17, 18:59

zlzhao1104's gravatar image

accept rate: 100%

The safest way would be loading the whole Washington file into a database with osm2pgsql (use hstore!) and then copy interesting objects into a new table, filling in missing state (well all should be Washington, right?) and city info based on what polygons the points are in.

permanent link

answered 05 Mar '17, 19:25

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
accept rate: 23%

Thank you for the suggestion. Actually, we are working on extracting address point data at different countries. As far as I understand, in many countries (other than US), I can download data in the country-level granularity.

Does OSM provide administrative boundary data as well (e.g., city, state)? If yes, I assume the type should be relation, right? If I understand you correctly, I probably can backfill missing city/state information in terms of the point-in-polygon relationship?

(06 Mar '17, 04:45) zlzhao1104
Your answer
toggle preview

Follow this question

By Email:

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



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:


question asked: 05 Mar '17, 18:59

question was seen: 1,531 times

last updated: 06 Mar '17, 04:45

powered by OSQA