Thoughts on Offline Maps for a large Area

osasigbinedion

Member
Licensed User
Longtime User
Hello,
I am developing an application that would require offline mapping on a fairly large scale. OsmAnd has available offline maps .obf files of fairly reasonable size (Ontario province is about 265MB)

I believe OsmDroid requires maps in slippy tiles convention (x/y) is there anyway I could use OsmAnd with OsmDroid.

I am open to thoughts and different approach to my problem
 

warwound

Expert
Licensed User
Longtime User
The offline maps you're looking at there are vector map databases.
These databases contains all the info about where roads and towns are, and the OSMAnd application renders raster tiles on the fly from the info in the database.

A vector map database does not contain imagery - it is not an archive of raster image tiles.

Unfortunately OSMDroid renders only raster image tiles and there is no way you can use a vector map database with OSMDroid.

The only real alternative currently is to create offline tile archives for use with OSMDroid, see this post: http://www.b4x.com/forum/basic4andr...smdroid-mapview-b4a-tutorial-2.html#post92702

And if you're trying to create an offline tile archive for a large area you'll find that Mobile Atlas Creator (MOBAC) will show a message as in the attached image.
MOBAC only allows you to create tile archives with less than 500,000 tiles to avoid you from downloading excessive amounts of data from the open source servers that it fetches the tiles from.

That message was shown when i tried to download tiles for zoom levels 0 to 16 for coordinates: N58.170702, S42.163403, E-72.070312, W-98.085938.

You could workaround that by creating several tile archives of less than 500,000 tiles and combining them.
A tile archive is a zip format file so combing two or more archives is not that tricky.

If you have a few days to spare you could even set up your very own tile server and generate as many tiles as you want, but it's an advanced topic and could take more than a few days.
Take a look at this page for info: switch2osm*|* Building a tile server from packages

Assuming that you can create the required tile archive you'd then have to download it to your device where your app is installed.
A tile archive for a large area is likely to be massive - Ontario covers an area of 1,076,000 square kilometers (so Google says) and i think you'd find a single tile archive for such a large area to be impractical.
You could reduce available zoom levels in the tile archive, instead of including offline tiles from zoom level 0 to 16 you could include 0 to 15 or 0 to 14 etc.

Using the same NSEW coordinates as i used when i got the MOBAC warning message above but only including tiles for zoom levels 0 to 13 creates a tile archive of 458,074.
I set MOBAC running and after 40 minutes it was just 5% complete, the tile archive had reached ~110MBs in size.
Estimating a total file size of (20 times 110MBs) you'd have a tile archive just too large to be useable to many users.

So unless you can reduce the area that you want to be covered by a single offline tile archive you're going to have practical problems with the size of the tile archive.

Martin.
 
Upvote 0
Top