I develop an Android app that uses Mapsforge to display OSM maps. I could use a pre-built map in the MapsForge file format but that makes my APK file to big and I only need a small part of my country anyway.

How can I only get a small rectangle part of the world of OSM and put it in a map file?


A ready-to-go solution can be the web service of http://extract.bbbike.org/, there you can define a boundingbox on an online map and choose many different output formats for OSM based maps. They also have mapsforge format there.

Have not tried on my own so far, so I cannot give any information about size limit for downloads, like a whole continent or similar


I assume that you require the .OSM format.

Start by downloading the Planet.osm file, and use the program Osmconvert.

The command osmconvert planet-160104.osm -b=-144,20,-50,90 -o=subset.osm will subset to a square AOI as specified.

See more info here and specifically for subsetting the dataset here.


You could try DogSheep Customizable Maps app. It lets you download maps by cutting it with a bounding box. The app uses MapsForge, so you could grab the map.map file from the download/dog_sheep/map_name directory, where map_name is the name you gave to the map when you downloaded it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.