How to get aerial image into offline use?

231 views
Skip to first unread message

Antti Eskola

unread,
Jun 11, 2018, 3:42:38 AM6/11/18
to Osmand
Hello,

Would there be a way to get aerial image on Osmand+ loaded for offline use?
Or is there a way to use any image over the map? Image ofcourse need to be bounded to cordinates.

Specially Microsoft Earth seems to work best at areas we are heading this summer.
And as it is Russia the mapping isn`t that good..

Thanks

Antti

A Thompson

unread,
Jun 11, 2018, 10:20:36 PM6/11/18
to Osmand
Yes, you can use any image as an overlay/underlay in OsmAnd using free tools, whatever the map projection used for the image. I did this myself a while ago (with no prior experience) and kept careful notes. There will be other ways, this is just what I stumbled on. These notes were written for my eyes only so I hope they make sense. Good luck!

First, we need to georeference as described here:

http://www.qgistutorials.com/en/docs/georeferencing_basics.html

 

  • Start QGIS and activate the "Georeferencer GDAL" built-in plugin if not already
  • Open the plugin with Raster>Georeferencer>Georeferencer
  • Open the source image with File>Open Raster
  • Assuming our control points will be given GPS-style, make sure WGS 84 is the selected CRS (if taking them from the map image itself, the CRS and datum would be chosen accordingly)
  • Use the pan and zoom tools to home in on identifiable spots, then use the "add point" tool to give their coordinates. Need to do at least four; if we're changing the projection of the map then more will give better results. Right clicking on Bing maps is an easy way to get a point's coordinates.
  • Settings>Transformation Settings (should persist from previous usage)
    • Transformation Type: Thin Plate Spline
    • Output Raster: pick a name for the GeoTiff if default not wanted
    • Check "Load in QGIS when done"
  • File>Start Georeferencing
  • If desired, save points before closing the plugin, and save the project when back in QGIS

 

Now we generate the tiles:

  • Open the QTiles plugin (install / activate if necessary)
  • Output: choose a directory and tileset name. Tiles will sit under a new directory of the tileset name within the chosen directory.
  • Choose min and max zoom. Osmand zoom level 7 has England filling the screen of my Nexus 7 tablet. The map won't be shown at <minzoom, but is visible at >maxzoom --- but then you're zooming in on pixels. For a UK rainfall map I used 6-8.
  • Run with standard parameters, then close

 

Now we make the sqlite database file for OsmAnd using Mobile Atlas Creator (MOBAC) as described here:

https://groups.google.com/forum/#!topic/osmand/8iLr2fZKMpc

  • Give the directory (full pathname XXX) that was created with the tileset name above in a file called local.xml in the mapsources folder of MOBAC:

<?xml version="1.0" encoding="UTF-8"?>

<localTileFiles>

   <name>LocalTileTree</name>

   <sourceType>DIR_ZOOM_X_Y</sourceType>

   <sourceFolder>XXX</sourceFolder>

   <invertYCoordinate>false</invertYCoordinate> <!-- optional -->

   <backgroundColor>#000000</backgroundColor>

</localTileFiles>

 

  • Start MOBAC.
  • Atlas>New Atlas, and select OSMAND SQLite
  • Then from the list of sources choose "LocalTileTree" (or whatever is tagged as <name> in the xml above). The map should show.
  • Selection>Selection Mode, and draw around the part of the map to use
  • Pick the zoom levels to include
  • Selection>Add Selection
  • You can supposedly add disjoint regions, possibly with different zooms, by repeating the previous three steps. But it doesn't seem to be as effective at omitting tiles as it could be - they can be deleted by hand before starting MOBAC, though.
  • Atlas>Create Atlas

 

Put the resulting .sqlitedb into the tiles folder of OsmAnd.

Bart Eisenberg

unread,
Jun 13, 2018, 8:48:40 PM6/13/18
to Osmand
Last September, I made a video on creating overlay/underlays using MAPC2MAPC, which is reasonably priced but not free. https://youtu.be/o84C0z3Kydc
I wondered at the time if it were possible to use QGIS instead.  Now I know.  Thanks.

Bart Eisenberg

unread,
Jun 13, 2018, 8:57:35 PM6/13/18
to Osmand
Sorry, wrong link.  It's this one. https://youtu.be/Y_fekLfcUOc

Majka

unread,
Jun 14, 2018, 4:25:48 AM6/14/18
to Osmand


On Monday, 11 June 2018 09:42:38 UTC+2, Antti Eskola wrote:
Hello,

Would there be a way to get aerial image on Osmand+ loaded for offline use?
Or is there a way to use any image over the map? Image ofcourse need to be bounded to cordinates.
You don't need extern tools (map2map, mobac). These work but you can do it in Osmand directly if you have the download url for the maps. 
Microsoft Earth is directly available in Osmand as online source
You simply need at home zoom in on the Areas where you will be, switch to Microsoft Earth source, move around and cache the images for the areas and resolutions which you need.

The files will be in the Osmand/tiles/Microsoft Earth subfolder. You can make a backup of it to be quite sure you keep it.

It is a bother to "travel" the map to cache everything you need, but it is foolproof and easy. You can do it every time you have Internet access - I do it every time I get on free Wifi, if I need it for the current region.
The files can and will grow quite big - for this reason it is better to cache only what you need at the time. This means clearing the cached files when leaving one area and pre-caching the next area.

Bart Eisenberg

unread,
Jun 14, 2018, 12:22:02 PM6/14/18
to Osmand
Good point.  I think the tools are useful for the broader question of using "any image over the map".  Including, of course, other maps.
Reply all
Reply to author
Forward
0 new messages