Offline JuraMap downloads


JuraMap


Offline external map files:

  • vector (< 1 mB): Locus Map & Cartograph Maps .map ¦ OsmAnd .obf
  • raster (0.8 gB): Locus Map & Cartograph Maps .mbtiles

For a desktop or similar, selecting a trail on the JuraMap trails map downloads a GPX file of the trail.

For a smartphone, selection brings up a popup asking if the file should be opened or downloaded (for the latter, clicking "Open" asks which app should be used. OsmAnd and Locus Map are recommended, and Cartograph Maps is adequate). OsmAnd uses vector .obf files created with OsmAndMapCreator while Locus Map and Cartograph Maps use vector .map files created using the Mapsforge Mapwriter plugin. Raster .mbtiles are created using QGIS.


Notes

Only Google Play apps are considered and both lightweight vector map files (.map and .obf) and much larger raster map files (.mbtiles) are available

In using JuraMap with the OsmAnd, Locus or Cartograph Maps clients, please note that some of the north-facing slopes of the Jura Mountains do not have GPS coverage.

The JuraMap aims to recreate the network of roads tracks and paths as it existed before 1898 and before heavy machinery started to be used to create the modern road network.

All roads, tracks and paths are marked as tracks. In some cases, the original paths probably followed the modern road alignment. So in these cases the modern track corresponds to the historical path or track. But in most cases, sections of the modern road network are ignored completely.

Most of the historic tracks have been checked to be accurate to about the 15-metre GPS positioning accuracy. If you stray from a track it is recommended that you retrace your steps, especially in the many rocky, wooded and forested areas that cover the Jura Mountains.

Typically, for a smartphone, maps are downloaded beforehand and stored on the phone. Subsequent use does not require an Internet connection, which is useful if a map is used for say treking in a region where there is no internet coverage - as is the case for parts of the Jura Mountains.

The notes below apply to both raster and vector map files for Locus Map and Cartograph Maps and for vector map files for OsmAnd.


Using OsmAnd

OsmAnd is a GPS navigation and map application that runs on many Android and iOS smartphones and tablets.

JuraMap maps are made available in OsmAnd's .obf format (see below). For an Android smartphone, the simplest procedure is to use a file manager such as Files by Google. Currently, it seems that the only way to import an exernal map file in the .obf format is to download the file and in the Android Files app, press on the listed file name to load the "Open with" screen. Select "Open with" and select OsmAnd. OsmAnd imports the map file. The file is available by opening the menu on the bottom-left of the screen. It is listed under "Menu" -> "Maps & Resources" -> "Local" -> "Standard maps".

Depending on the version it may be possible to clear the OsmAnd cache in "Settings" -> "Apps" and restart OsmAnd. "Menu" -> "Maps & Resources" -> "Local" will display "Standard maps" (which may otherwise be absent). In "Standard maps", push the menu button at the top right and select "Import" and then then "juramap.obf".

A juramap.obf file for the JuraMap map is available here.

Using Locus Map

Locus Map is a GPS navigation and map application that runs on most Android smartphones and tablets.

JuraMap maps are made available in Locus Map's .map format (see below). It seems that one's own external offline map can be imported using the Map Manager. Map Manger is open from the menu at the bottom-left of the screen. Then choose the offline tab and press the + icon at the bottom-right. This opens a sceen with an Import Map entry. Press the entry and select System File Manager to access the map file in Downloads. Upon selecting the map a rather bizarre screen appears. Press "YES" and the offline map is loaded.

The juramap.map file can de deleted using the Map Manager.

A .map file for the JuraMap map is available here.

Using Cartograph Maps

Cartograph Maps is a farly basic but adequate GPS navigation app.

Downloaded map files are imported using "Menu" -> "Maps" -> "Offline" -> "+"

A .map file for the JuraMap map is available here.

Using other mobile apps

It seems that one can make offline OSM maps for Navit (see guide). One can probably set up the Navit web client to download maps from a self-hosted OpenStreetMap website to a mobile phone. But the app is very focussed on routing so doing this is not worth the effort for the JuraMap hiking maps.

It seems that external offline OSM maps are not easily created and loaded into a smartphone for Organic Maps. For example, one probably has to ask users to root their android mobile phone in order to be able to copy files to the Organic Maps data folder.


.map vector map file using OsmAndMapCreator for OsmAnd

For the technically minded, OsmAndMapCreator is used to convert the .xml file (called "osm.xml") created using the OpenStreetMap Rails port Postgresql database, called "osmdatabase", and Osmosis. As discussed elsewhere, the Osmosis command is:

  • /home/usr/osm/bin/osmosis --read-apidb host="localhost:5432" database="osmdatabase" user="user" password="password" validateSchemaVersion="no" --write-xml file="/home/user/osm.xml"

For Windows10, if Java JDK is not installed, one can download and install the .exe installation file (“x64 Installer”) here. OsmAndMapCreator can be downloaded (description) and is then extracted to any folder. Using a terminal (search Windows using "cmd"), move to the OsmAndMapCreator folder. OsmAndMapCreator can be executed by submitting:

  • OsmAndMapCreator.jar

In the OsmAndMapCreator graphic interface, deselect all "Build xxx index" except "Build map index" and under the "File" tab open the option "Build .obf from the .xml file ..." Use this option to select the "osm.xml" file. The "osm.obf" file takes a minute or so to build. Further details are available on the OpenStreetMap wiki.

Alternatively, submit in terminal:

  • OsmAndMapCreator/utilitiesx.sh generate-map osm.xml

to generate a map.

When the OsmAndMapCreator GUI opens, under Windows -> Settings one can specify the path to a rendering_types.xml file and a rendering style file.

A detailed description of how to use OsmAndMapCreator to create offline maps is also available.

.map vector map file using Mapsforge-Creator for Locus Map and Cartograph Maps

The Mapsforge-Creator Map-Writer plugin for Osmosis is used to produce Locus Map .map files from the OpenStreetMap "osm.xml" file. It is reasonably well documented. In brief, mapsforge-map-writer is downloaded from the Sonatype repository. Currently, clicking mapsforge-map-writer -> master-SNAPSHOT -> mapsforge-map-writer-master-20211104.091832-420-jar-with-dependencies.jar gives the necessary Java file that should be copied to the "osmosis ->lib -> default" folder of an osmosis installation. The latest mapwriter appears to be mapsforge-map-writer-master-20230426.074942-502-jar-with-dependencies.jar

For Windows10 running the latest version (0.48.3) of Osmosis, one can simply copy the "osm.xml" file to the "osmosis\bin" folder and run in a "cmd" terminal:

  • cd c:\osmosis\bin
  • osmosis --rx file=osm.xml --mapfile-writer file=osm.map threads=8 type=hd map-start-position=46.45,6.2 bbox=46.41,6.05,46.6,6.3

For us, the bbox bounds value is absolutely essential. Without it the .map file is not produced. There has been some discussion over the years of the Java enviroment variables. A straightforward version of the osmosis.bat file that accompanies the osmosis executable is:


@ECHO OFF

set JAVACMD_OPTIONS=-Xmx1g

set JAVACMD="C:\Program Files\Java\jdk-18.0.1.1\bin\java"

set SAVEDIR=%CD%

set MYAPP_HOME=%~dp0..

cd /D %MYAPP_HOME%

set MYAPP_HOME=%CD%

cd /D %SAVEDIR%

set MAINCLASS=org.codehaus.classworlds.Launcher

set PLEXUS_CP=%MYAPP_HOME%\lib\default\plexus-classworlds-2.5.2.jar

SET EXEC=%JAVACMD% %JAVACMD_OPTIONS% -cp "%PLEXUS_CP%" -Dapp.home="%MYAPP_HOME%" -Dclassworlds.conf="%MYAPP_HOME%\config\plexus.conf" %MAINCLASS% %OSMOSIS_OPTIONS% %*

%EXEC%

.mbtiles raster map file using QGIS for Locus Map and Cartograph Maps

QGIS can be used to create a .mbtiles file from a raster map source. In our case an XYZ Connection to map.peterboswell.net/openarea/{z}/{x}/{y}.png is set up and the QDAL Generate XYZ (MBTiles) tool is used to create an .mbtiles file.


Updated 23 June 2024

.mbtiles

PeterBoswell.com