OsmAnd Android application has a free version with a limitation on maps updates.
This repo was created for two Proofs of Concept, one Graphical application and one Command line application to define a set of map and feed the latest updates available. Those maps downloaded maps could be copied into your smartphone over ADB or any network share.
Usage: osmad_cli.py [OPTIONS] COMMAND [ARGS]...
Options:
--version Show the version and exit.
-ad, --asset-dir DIRECTORY Path where to download assets
(value saved in config file)
-ed, --extract-dir DIRECTORY Path where to extract assets
(value saved in config file)
--help Show this message and exit.
Commands:
list List assets available in cache
refresh Refresh cache from OpenStreet Map server
update Download/Update assets based on watch list
watch Watch list management
This command line interface allows three basic operation :
- Listing assets available on server
Usage: osmad_cli.py list [OPTIONS]
List assets available in cache
Options:
-c, --cache Use cached file rather than online server
-l, --list [ALL|AREAS|TYPES] List assets available
-t, --type TEXT List only assets part of this type
-a, --area TEXT List only assets part of this area
-d, --date TEXT Retrieve date update for specified asset
-s, --sort [name|size|date] Order to use for list display
--help Show this message and exit.
- Handling watch list
Usage: osmad_cli.py watch [OPTIONS]
Watch list management
Options:
-l, --list List all assets to watch
-c, --clear Remove all assets from watch list
-a, --add TEXT Add specified asset to watch list
-d, --del TEXT Remove specified asset from watch list
--help Show this message and exit.
- Pulling updates available
Usage: osmad_cli.py update [OPTIONS]
Download/Update assets based on watch list
Options:
-n, --no-progress Disable progress bar during download
--help Show this message and exit.
Prepare a Vitrual environment for your project and install requirements
$ python -m venv venv
Switch to your venv
- on linux
$ source venv/bin/activate
- on Windows
$ .\venv\Scripts\activate.bat
Install dependencies
$ python -m pip install -r requirements_cli.txt
$ python -m pip install -r requirements_gui.txt
Using linux env, you might require deb packages to be installed
$ sudo apt install python3-pyqt5 pyqt5-dev-tools
Before launching the application, you must build UIs and Resource file with the following commands
$ pyuic5 src/ui/ui_main.ui -o src/ui/ui_main.py
$ pyrcc5 src/resources.qrc -o src/resources_rc.py
In order to create a native executable (easier to deploy), you should proceed as following :
- Install dependencies
$ python -m pip install pyinstaller
- Generate self-contained binaries
$ pyinstaller osmad_cli.spec
...
$ dist\osmad_cli.exe
$ pyinstaller osmad_gui.spec
...
$ dist\osmad_gui.exe