Add Open Address Data To OSMAND

2019-08-31

One of the biggest pains when using OSMAND for navigation is the lack of addresses in many areas. Through some research for an OpenStreetMap(osm) import, I've learned there is open address data for the counties around me that hasn't been imported due to the amount of work it takes. As a stopgap measure, I decided to find a way to load that open address data into OSMAND. The process was a bit of a pain to figure out due to OSMAND not having documentation on using non OSM extract data to create an obf file(OSMAND's map format)

  1. Install software if needed (e.g. OGR2OSM, Osmium, OSMAND Map Creator)
  2. Get address file with open license (e.g. King County Address Shapefile)
  3. Download extract for area I want to merge address data with (e.g. WA state osm extract in OSM format)
  4. Translate address file as needed (e.g. use ogr2osm to translate to osm, expand street names, you'll have to create your own translation file since each dataset can have different column names, formats etc.)
  5. Conflate address file with OSM extract as needed (e.g. trim address file to limit overlap with OSM data, I did a quick and dirty cleanup by filtering cities that had imports done)
  6. Combine osm files into pbf file with .osm.pbf extension (e.g. osmium merge)
  7. Run Osmand map creator to create map for OSMAND
  8. Upload obf file to OSMAND's data folder on your phone
    /mnt/sdcard/osmand or /Android/data/net.osmand/files

The end result is full address coverage for King Co. with the minor inconviences of some duplicate addresses and addresses with a 0 housenumber since I didn't do a full clean of the data.

Lessons Learned:

  • OSMAND must have addresses in same file as other features to build its index that makes the addresses searchable. Found on a page buried on the OSMAND site: MapAddressDataStructure
  • Map file size may stay roughly the same. The WA map went from 309 MB to 308.8 MB after adding 350,000 addresses. That's correct, it got smaller after adding data.
    • UPDATE: after looking into it, osmium merge does some deduplication that may have been dropping addresses. File sizes have been steadily increasing in newer iterations of the file

Links: