GithubHelp home page GithubHelp logo

roballey / osm_maps_for_garmin Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 1.0 993.46 MB

Maps for Garmin GPS units generated from OpenStreetMap data. Can build non-routeable images (suitable for Garmin Edge 520 etc) and routeable images (suitable for Garmin Edge 705, Fore Runner 955 etc). Pre built images of NZ, NI and SI

Shell 100.00%
garmin mkgmap openstreetmap osm edge 520 705 955

osm_maps_for_garmin's Introduction

OSM_Maps_For_Garmin

Maps for Garmin GPS units generated from OpenStreetMap data using mkgmap. Includes all the configuration files used to generate the Garmin maps

Using Pre-Generated Maps


See the release zip files for routable and non-routable maps of the whole of NZ and the North Island and South Island seperately.

Generating Your Own Maps


The following instructions work under Linux or Windows if running a Bourne shell compatible shell (e.g. bash under Cygwin or Mingw/Msys etc.)

As described below these steps will generate maps for the New Zealand North Island, generating for other regions involves editing the scripts as described later in this document.

Setup steps


The following setup steps only need to be performed once:

  1. Download splitter from http://www.mkgmap.org.uk/download/splitter.html and install in 'tools'
  2. Download mkgmap from http://www.mkgmap.org.uk/download/mkgmap.html and install in 'tools'
  3. Download sea.zip from http://www.mkgmap.org.uk/download/splitter.html and install in 'input'

Optional


Only if you want to include contours built from SRTM data:

  1. Windows
    • Install phygtmap pre-reqs:
      • pip install setuptools
      • pip install matplotlib
      • pip install numpy
      • pip install beautifulsoup
      • pip install http
      • pip install cookiejar
      • pip install bs4
  • Download phygtmap_2.21 from http://katze.tfiu.de/projects/phyghtmap/ and extract into /c/python27
  • In /c/Python27/phyghtmap-2.21 directory run python setup.py install
  • Edit build/contours.py to set your username and password for Earthexplorer
  • (NOTE: I'm currently, May-2019, not able to generate contours on Windows, might by a python version issue)
  1. Linux:

Generation Steps


  1. Download an OSM extract as a PBF file and place it in the 'input' directory

  2. Split the PBF file into multiple parts with 'build/split.sh'

    split.sh options:

    • -i= Specify the name of the input PBF file to split. If not specified defaults to .pbf
    • -p= Specify the name of an optional polygon file that will be used to define the region to which the split data is clipped
    • -r= Specify the name of the region being split, defaults to oceania_nz_ni
  3. If including contours, perform the steps from 'Generating Contours' below

  4. Generate the Garmin image file with 'build/map.sh', by default this will build a routeable map without contours

    map.sh options:

    • -c Add contour lines to map
    • -r= Specify the region for which map is generated, defaults to oceania_nz_ni
    • -s=<STYLE> Use <STYLE> style rules to convert OSM data to Garmin
    • -t= Use type rules when rendering the Garmin map

Generating Contours


The following steps are only required if you wish to add contour lines to the generated maps. The steps do not need to be performed every time maps are generated as unlike OSM data the DEM data used to generate the contours does not often change.

NOTE: On Windows currently not working with Python2.7, does this require Python3?

Building contours from SRTM data:

Use this step to download SRTM data and build a PBF file of contours from the data.

  1. Generate the contours with 'build/contours.sh'
  2. Build your maps as usual using the -c option to include contours
  • NOTE: Generate contours after splitting the source OSM PBF file into multiple parts as phygtmap uses the polygon file generated during splitting to define the area extent for the contours.

Building contours from LINZ data:

  1. Download LINZ contour data as a shapefile from https://data.linz.govt.nz/layer/50768-nz-contours-topo-150k
  2. Convert LINZ contour data by loading into JOSM (requires the XXX plugin) and then saving as an OSM file
  3. Split the resulting OSM file into multiple pbf files with: java -Xmx1000m -jar tools/splitter-*/splitter.jar [osm_file] --output-dir=work/contours/[region]
  4. Build your maps as usual using the -c option to include contours

Generating For Other regions


  1. Download a OSM data in PBF format for the area for which you wish to generate a map. http://download.geofabrik.de/ is one source. Put the file in the input directory
  2. Create a .poly file defining the area for which you wish to generate the map. Name the file .poly and put it in the input directory. This can be ommitted if you wish to generate for the whole downloaded area but this will probably be too big for most Garmin devices.
  3. Perform the generation steps as above

See build/nz.sh for an example that downloads a PBF file for the whole of New Zealand and builds seperate routable and nonroutable maps for the North and South islands using two different poly files to specify the clipping area.

Previewing Garmin maps on PC


Under either Linux or Windows QMapShack may be installed and used to preview the Garmin map img files

osm_maps_for_garmin's People

Contributors

roballey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

matze74

osm_maps_for_garmin's Issues

Contours not displayed on Edge 705

When generating routeable maps for the Edge 705 with "maps.sh -c -style route -t route" the resulting gmapsupp.img shows with contours in QLandkarte but the contours do not show on the Edge 705

Render gates differently to other barriers

At least for the routeable maps gates are currently rendered the same as other barrier types (bollard, kissing gate etc) which is potentially misleading for cyclists, pedestrians.

Solution: include gate poi bitmap from offroad.typ in route.typ and render different poi's for various values of barrier tag.

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.