Hey, I was wondering if there is a tool to extract housenumbers from a OSM XML or pbf extract. I know this is a difficult task, but maybe someone already wrote a tool. Probably it would need Overpass API to get the surroundings borders that might not be included in the extract. Thanks in advance! asked 01 Apr '15, 19:46 kerosin |
Depends on what you want with your house numbers! Nominatim has an export facility which might be useful. I hear that people are also using https://github.com/ltog/osmi-addresses to extract house numbers, even if that was originally made as a quality control tool. answered 01 Apr '15, 19:49 Frederik Ramm ♦ Thanks. I want to store them in a separate database - just for testing purposes. SpatiaLite (SQLite) like in OSMI would be fine. So ./extract.osm.pbf output.sqlite would do the job?
(01 Apr '15, 20:01)
kerosin
|
Note that addresses are basically stored in three ways: as part of polygons (closed ways, multipolygons), lines (non-closed ways) and points (nodes). Unless you extract all these geometry types, you may not get a full picture of addressing in different regions. E.g. for line features, address interpolation values can be stored ("from" - "to" values). Since, as with the line features, different addressing systems are in use, you will generally need to extract a different set of keys with each geometry type, and also consider / extract multiple addressing keys, as each country / region may make a different use of the available keys. Even with all relevant keys extracted, making sense and technically using complete address information, will be hard across different regions. Of course, displaying just housenumbers (addr:housenumber=x), is less difficult and can be done relatively easy. answered 02 Apr '15, 18:44 mboeringa |