I am trying to create a script which I can use to create a new map for my Garmin Legend based on the latest data.
The gmapsupp.img file the following script creates is however not recognised by my Garmin. The basemap is shown instead. The gmapsupp.img file is saved at Garmin/gmapsupp.img on the card. The script as such does not show any errors.
My question: Is there someone out there, who can tell me what I need to change to make the script work?
Here the bash script (for Mac or Linux):
#!/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 "*********************"
#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
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 “**********************”