GithubHelp home page GithubHelp logo

garmin-toolbelt's Introduction

Garmin Toolbelt

This project provides a small set of tools to generate gmapsupp.img with contours from OSM.

It provides a simple to use bash script that abstracts all splitter.jar, mkgmap.jar and phyghtmap interactions. Also fetches automatically those binaries (except phyghtmap).

This project was tested in debian only. An alternative vagrant setup is also available so you can run in any platform (OSX, Windows and other Linux flavors).

Configuration

Place *.conf files under ./maps. Each configuration file will generate a gmapsupp.img. Configuration file is a simple properties file with the following fields:

  • map_name: descriptive map name
  • map_url: downloads map from given URL. Only tested with geofabrik.de
  • map_poly: polygon file URL. Also tested with geofabrik.de

Example:

$ ls -la ./maps
ireland.conf portugal.conf

$ cat ./maps/portugal.conf
map_name="portugal"
map_url="http://download.geofabrik.de/europe/portugal-latest.osm.pbf"
map_poly="http://download.geofabrik.de/europe/portugal.poly"

$ cat ./maps/ireland.conf
map_name="ireland"
map_url="http://download.geofabrik.de/europe/ireland-and-northern-ireland-latest.osm.pbf"
map_poly="http://download.geofabrik.de/europe/ireland-and-northern-ireland.poly"

Generating maps

# usage of vagrant is optional
$ vagrant up
$ vagrant ssh

$ ./generate_gmap.sh
# ... this will take a while ...
# first run will take longer as it will download binaries, bounds and sea files
# those files are downloaded once and stored inside ./bin and ./tmp directories
# and are reused on subsequent runs
# maps defined in configuration files are also cached under ./tmp/maps directory

# list gmapsupp for each configuration file (map+contour)
$ ls -la ./tmp/*/*-*.img
-rw-r--r-- 1 joao joao 9.6M Oct 22 22:21 ./tmp/ireland/ireland-contours.img
-rw-r--r-- 1 joao joao  62M Oct 22 22:19 ./tmp/ireland/ireland-map.img
-rw-r--r-- 1 joao joao  18M Oct 22 22:17 ./tmp/portugal/portugal-contours.img
-rw-r--r-- 1 joao joao  54M Oct 22 22:12 ./tmp/portugal/portugal-map.img

# list single gmapsupp - combination of all generated maps
$ ls -lah ./tmp/single_gmap/gmapsupp.img
-rw-r--r-- 1 joao joao 143M Oct 22 22:21 ./tmp/single_gmap/gmapsupp.img

# copy desired maps into SD card, ./Garmin folder

Customizing it

The current ./generate_gmap.sh generate maps for trekking/cycling and works fine for my garmin etrex 20. Feel free to edit ./generate_gmap.sh and adjust it to your context.

References

garmin-toolbelt's People

Contributors

joaocenoura avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.