OpenStreetMap

Creating .obf files for OsmAnd using Overpass Turbo API and OsmMapCreator

Posted by ccalista on 1 July 2015 in English (English). Last updated on 10 July 2015.

This is probably a tutorial you want to look at when you have just created a changeset somewhere and you want to view it in OsmAnd on your phone offline. There is another tutorial but I tried to follow the instructions and I just didn’t get it. So, apologies to the authors of that tutorial if I am basically repeating them, but here we go.

Getting the Data

  1. Go to overpass-turbo.eu
  2. Zoom to your area of interest (if need be do a search in the search toolbar)
  3. Push “Load”, which is one of the options on the top bar; go to Examples, and hit Map Call. A query will appear in the left window pane
  4. In the map window, choose “manually select bbox” (there is a little box icon under the magnifying glass and random round “locate me” thing that does this)
  5. Move the bounding box with your mouse to reflect the area you want
  6. (optional) If you want to see what this will do in your browser, hit “Run”. This will, however, take time, download more data (bad if you have a poor internet connection) and possibly complain about downloading too much data
  7. Hit “Export raw data directly from Overpass API”

Converting the Data

  1. A file will download, probably called “interpreter”. Move that file to wherever you are working, and rename it (we suggest using the date of download and name of the area of interest as a file name). Remember to add the extension .osm to the end of your filename (example “2015-09-21 mytown.osm”). This is important is OsmMapCreator will not recognize it otherwise.
  2. Open OsmMapCreator - instructions for this can be found in the tutorial I mentioned before. If you are having problems with it, just download the file, unzip it and run the “batch” file in that folder. (You will have to see which of those items type=batch)
  3. In OsmMapCreator, choose File > Create .obf from .osm file
  4. Choose the .osm file that you just downloaded
  5. Wait
  6. Wait more
  7. It will eventually show you a dialogue saying that it’s created a file in a folder (probably something like c:/users/Yourname/osmand. You will need to locate this folder, and go find the .obf file, which will have the same name as your osm download, but with the .obf extension. Use cut and paste to get them into your working directory.

Putting it on your Phone

1.Close Osmand on your phone, put the .obf file on your phone in the osmand folder, and restart Osmand.

Hope this works for you :) Feedback appreciated!

Comment from Enock4seth on 1 July 2015 at 20:01

Thanks for sharing. Bookmarked.

Comment from malenki on 8 July 2015 at 20:18

Thank you for the write-up.

Tiny formatting hint: before 5a a linebreak got lost (happens easily with Markdown when forgetting to use to whitespaces before).

Comment from ccalista on 10 July 2015 at 08:21

Thanks @malenki, just changed it to point 6 instead, was easier!

Comment from leodobrasil on 11 July 2015 at 13:20

Great!


Login to leave a comment