Giter Site home page Giter Site logo

openmtbmap_openvelomap_linux's Introduction

Linux/Unix script to compile garmin *.img map files from openmtbmap.org or openvelomap.org files

Requirements

  • zsh
  • 7z
  • mkgmap OR wine

you can obtain mkgmap with your package manager or from http://www.mkgmap.org.uk/snapshots/

gmt linux version can be downloaded from http://www.gmaptool.eu/en/content/gmaptool

Installation of required files on Debian/Ubuntu

  sudo apt-get install zsh p7zip-full
  wget http://www.gmaptool.eu/sites/default/files/lgmt08220.zip
  unzip lgmt08220.zip gmt
  sudo mv gmt /usr/local/bin/

also, get newest mkgmap from http://www.mkgmap.org.uk/snapshots/ and install (aka copy) it to e.g. /usr/local/share/mkgmap/

Installation of required files on Gentoo

  emerge zsh p7zip mkgmap
  wget http://www.gmaptool.eu/sites/default/files/lgmt08220.zip
  unzip lgmt08220.zip gmt
  sudo mv gmt /usr/local/bin/

Installation of required files on openSUSE

  Alternativly use the following commands on the command line
  zypper ar http://download.opensuse.org/repositories/Application:/Geo/openSUSE_13.1/ GEO
  zypper ref
  zypper in p7zip mkgmap GMT

Usage

  Usage: create_omtb_garmin_img.sh [options] <mtb*.exe|velo*.exe> <TYP-file or TYP-style>
     as TYP-style you can choose:
     For OpenMTB-maps:
       clas: Classic layout - optimized for Vista/Legend series.
       thin: Thinner tracks and pathes - optimized for Gpsmap60/76 series.
       wide: High contrast layout, like classic but with white forest - optimized for Oregon/Colorado displays.
       hike: Like classic layout - but optimized for hiking (does not show mtb/bicycle informations).
       easy: Similar to classic layout - focused on easy readability, not showing mtb/bicycle information except routes.
     For OpenVelo-maps:
       velo: Layout optimized for small GPS screen
       velw: Wide layout optimized for high DPI screens like Oregon
       race: Clean layout for road biking. No buildings or features.
     or give the path to your own .TYP style file
  Options:
     -g <path/to/gmt>
     -m <path/to/mkgmap.jar>
     -o <path/to/outputdir>

openmtbmap_openvelomap_linux's People

Contributors

btittelbach avatar luhk avatar pathmapper avatar sharkdp avatar tblue avatar timmie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openmtbmap_openvelomap_linux's Issues

Extract command uses wrong option

Running the script with the map veloaustralia-oceania.exe, one gets the error message
ERROR: Could not find 6*.img file after extracting veloaustralia-oceania.exe
Further inspection shows that the files of the map have been extracted to subdirectories ???:
ls -la OMTB_tmp/ total 20 drwxr-xr-x 5 tikey tikey 4096 Jan 21 18:32 ./ drwxr-xr-x 3 tikey tikey 4096 Jan 21 18:33 ../ drwx------ 3 tikey tikey 4096 Jan 21 18:32 ???/ drwx------ 3 tikey tikey 4096 Jan 21 18:32 ???/ drwx------ 3 tikey tikey 4096 Jan 21 18:32 ???/

This could be fixed by changing the 7z extract command from x to e in line 154.

TYP files missing/ list incomplete

When running the script depending on the exe file it works with (from openmtbmap or velomap) some typ files are missing and thus the script ends with an error.
Running the script with files from Openmtbmap the stile "velo" can get selected but is missing and so the script throws an error.

Running the script with files from Openvelomap all styles offered by the script but velo don't exist.

Solutions: either offer only the styles available in the files used (openmtbmap or velomap¹) or somehow also fetch the TYP files which are only available in the other map variant.
e.g.: let the user download a small country like Andorra from the other map variant, place it in the same folder and let the script handle the rest (extract

¹ the complete list for velomap files is (from the readme-file):

velo*.TYP (Layout optimized for small GPS screen)
trdn*.TYP (Layout for Mapsource, Qlandkarte or pc screens. Low contrast for big resolutions (800x600 and up). No good on GPS. Simpy reinstall with other .TYP before sending maps to GPS.)
velw*.TYP (Layout optimized for high resolution (e.g. Oregon) screen.)
race*.TYP (Layout optimized for race biking / road biking. Optimized for GPS screen, but still quite good on Desktop.)

Address Search Index

Hallo,

eine Frage: ich kann mit dem Script unter Ubuntu 13.04 prima Karten für Garmin erstellen. Der Aufruf und die Meldungen lauten:

braun@miraculix:~/tmp$ create_omtb_garmin_img.sh -o ./ /misc/export/downloads/OpenMtbMap/mtbgermany_2013-10-05.exe wide
Extracting /misc/export/downloads/OpenMtbMap/mtbgermany_2013-10-05.exe ...
Using display-TYP-file: /home/braun/tmp/OMTB_tmp/widede.TYP
Using FID 6371
gmt v0.8.159.746b CC BY-SA (C) 2011-2013 AP www.gmaptool.eu

TYP correction: file 01002468.TYP, FID 6371, PID 1, CP 1252
Using mkgmap, building address search index...

Successfully created /home/braun/tmp/openmtbmap_germany_2013-10-05.img

Soweit so gut. Die Karte enthält aber leider keinen durchsuchbaren Adressindex auf meinem Oregon650. Wie ist denn die Aussage "building address search index" zu verstehen? Wenn ich das richtig verstehe, kann das bisher nur Basecamp oder Mapsource und dauert ewig.
Danke für die Klarstellung.
Gruß Folcr.

Inst. of req. files: Ubuntu / Debian

The installation of required files for Ubuntu / Debian incorrectly lists the package "7z", which does not exist.
You need the package p7zip-full instead.

Could not create the Java virtual machine

Hi Bernhard,

I tried to use the script as follow:
./create_omtb_garmin_img.sh openmtbmap.org/germany/mtbgermany.exe thin /usr/local/share/mkgmap/mkgmap.jar

but I get a syntax error:
./create_omtb_garmin_img.sh: line 6: syntax error near unexpected token newline' ./create_omtb_garmin_img.sh: line 6:'

Thanks a lot!

Debian 7z and gmaptool link

Hello!

In debian Jessie 7z changed to p7zip (not sure how it is on wheezy) and gmaptool link does not work anymore.

Bests
shearer

please update the documentation and online-help

According to the link https://www.velomap.org/updates/mapinstall-finally-fixed-by-garmin-download-lists-reworked-gmapsupp-img-downloads-now-showing-in-basecamp-by-default/ (the 2nd last paragraph):
Lastly - the windows installer for Germany finally broke the 2GB limit. The installers for France, Africa continent and Russia were also close to breaking the 2GB limit. I don't want to offer these countries as 2 downloads - so I've updated the installer to accept sizes over 2GB. However this causes the installer not to be extractable anymore with 7zip. Therefore I am now creating a new zipped version of those countries for Linux users. Also of course some bugs in the map creation got fixed.

If the .exe file is bigger than 2 GB, velomap.org ist offering a second download file which hyperlink is named Velomap - <country> - Linux. The link points to a velomap_<country>.7z file which has to be used as argument to create_omtb_garmin_img.sh

in other words:
if you have a .exe smaller than 2 GB then you call:
create_omtb_garmin_img.sh [options] <mtb*.exe|velo*.exe>
otherwise you call
create_omtb_garmin_img.sh [options] <mtb*.7z|velo*.7z>

ERROR: No module named -wy was found

I get the following error when running the script:

openmtbmap_openvelomap_linux/create_omtb_garmin_img.sh mtbcanary-islands.exe wide -m /usr/share/java/mkgmap/mkgmap.jar
Extracting mtbcanary-islands.exe ...
Using display-TYP-file: /home/shark/test2/OMTB_tmp/wideci.TYP
Using FID 6542

    GMT - The Generic Mapping Tools, Version 5.1.1 (r12968) [64-bit]
(c) 1991-2014 Paul Wessel, Walter H. F. Smith, R. Scharroo, J. Luis, and F. Wobbe

Supported in part by the US National Science Foundation (www.nsf.gov)
and volunteers from around the world.

This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of this program under the terms of the
GNU Lesser General Public License (http://www.gnu.org/licenses/lgpl.html).
For more information about these matters, see the file named LICENSE.TXT.

usage: gmt [options]
       gmt <module name> [<module options>]

options:
  --help            List and description of GMT modules.
  --version         Print version and exit.
  --show-datadir    Show data directory and exit.
  --show-bindir     Show directory of executables and exit.

if <module options> is '=' we call exit (0) if module exist and non-zero otherwise.

ERROR: No module named -wy was found,  This could mean:
  1. There actually is no such module; check your spelling.
  2. Module exists in the GMT supplemental library, but the library could not be found.
  3. Module exists in a GMT custom library, but none was specified via GMT_CUSTOM_LIBS.
Shared libraries must be in standard system paths or set via environmental parameter LD_LIBRARY_PATH.

Using mkgmap, building address search index...
Time started: Sat Apr 04 10:03:28 CEST 2015
Number of MapFailedExceptions: 0
Number of ExitExceptions: 0
Time finished: Sat Apr 04 10:03:30 CEST 2015
Total time taken: 2463ms

Successfully created /home/shark/test2/openmtbmap_canary-islands.img

The img file is created and it seems to work, so I'm not sure if this can be ignored. The following line triggers the error message:

$GMT_CMD -wy $FID 01002468.TYP

The gmt version is 5.1.1

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.