In this module we will export the Survey map with contours in maptiles format which can be used for offline navigation. Survey maps with contours would be the most detailed available topographic maps for the Himalayas and most valuable tool for the alpine hiker to explore.
In the main QGIS window, enable only these two layers: Survey map raster layer and contours vector layer. Select the “View” menu, “Panels” and enable “Processing Toolbox”. This brings up a separate panel in the QGIS main window with hundreds of useful tools. In the panel search for “Generate XYZ tiles (MBTiles)”. See Image 1 below
In the “Generate XYZ tiles” window set the following parameters: Extent as per boundaries of survey map 52d/6, min/max zoom range as 13/14, format as JPG, quality 95 and provide and output file name. Click “Run” to export the indicated region (showing survey map + contours) as an “MBTiles” file. See image 2 below
SQLite conversion
The “MBTiles” format is not supported by OSMAnd so we need to do one final conversion step to “SQLite” format. For this we will be using a python script “mbtiles2osmand” which can be downloaded from:
https://github.com/tarwirdur/mbtiles2osmand
Click on “Code”, “Download ZIP” to download the code. Unzip the downloaded file and copy the “mbtiles2osmand.py” Python script in the same directory where you saved the MBTiles file. See Image 1 below.
Open a command line window in Windows. (Start menu, type “cmd”) and type below batch file to set the python environment:
\OSGeo4W64\bin\python-grass78.bat
Exit the prompt by pressing Ctrl-Z to return back to Windows command prompt. Change to the directory where you saved the MBTiles file and type below to convert the MBTiles format to SQLite. See Image 2 below.
python mbtiles2osmand.py 52d6_topo.mbtiles 52d6_topo.sqlitedb
Now transfer the SQLitedb file to your phone, open in OSMAnd and set an Overlay map. Congrats! You have now the most detailed topographic maps for the Himalayas available in your phone for offline navigation! Use the transparency slider to switch between the base OSM map and Survey overlay map. See Image 3 below
Assignment
Submit the form below acknowledging the fact that you have gone through the above tutorial.