x

Script zum Erstellen einer aktuellen Deutschland OSM Karte - Hilfe!


  1. Script zum Erstellen einer aktuellen Deutschland OSM Karte - Hilfe! · pandabear (Gast) · 02.04.2009 23:15 · [flux]

    Hi, ich versuche mit einem Script, eine aktuelle OSM Karte für mein Garmin Legend zu erstellen.

    Die gmapsupp.img Datei wird leider nicht von meinem Garmin erkannt. Sie liegt aber im richtigen Verzeichnis auf der Speicherkarte (Garmin/gmapsupp.img). Das Script selbst wirft keine Fehler während der Ausführung.

    Kann mich jemand hier wieder auf richtigen Pfad bringen?

    DANKE

    Hier das Script (für Mac oder Linux):

    1. !/bin/sh

    echo "***Start***"
    echo "--------------"

    START=`date +%s`
    SDATE=`date`
    echo $SDATE

    echo "Start Download Germany"
    echo `date`
    echo "**********************"
    curl -v -g http://download.geofabrik.de/osm/europe/germany.osm.bz2 -o germany.osm.bz2

    echo "Delete old images"
    echo "**********************"
    rm osm_img/*

    echo "Unzip Germnay"
    echo `date`
    echo "*************"
    bunzip2 -dkf germany.osm.bz2

    echo "Start Split"
    echo `date`
    echo "***********"
    cd osm_img/
    java -Xmx2000m -jar ../splitter.jar ../germany.osm

    echo "Start MkgMap"
    echo `date`
    echo "**********************"

    1. java -Xmx512M -jar ../mkgmap.jar -c template.args --gmapsupp --utf8 --map-features=../teddys_map-features.csv [1-9]*

    java -Xmx1000m -jar ../mkgmap.jar -c template.args --gmapsupp

    1. rm germany.osm.bz2

    Echo "Map Finished"

    if [ "$1" = "-c" ]; then
    Echo "Copy to Garmin"
    NAME=Garmin
    FNAME=gmapsupp.img

    if [ -z `ls -1 /Volumes/ | grep $NAME` ] ; then
    cp gmapsupp.img /Volumes/GARMIN/Garmin/gmapsupp.img
    else
    echo "$NAME is not mounted"
    exit 1
    fi
    echo unmounting $NAME
    diskutil unmount /Volumes/$NAME
    fi

    END=`date +%s`
    EDATE=`date`
    ELAPSEDTIME=`expr $END - $START`
    echo $SDATE - $EDATE
    echo Elapsed Time: $(($ELAPSEDTIME / 60)) minutes
    echo "**********************"