forked from OpenSeaMap/garmin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmkmymap.sh
executable file
·40 lines (29 loc) · 886 Bytes
/
mkmymap.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
cd $HOME/osm
#./getplanet.sh
#./getsea.sh
rm tiles/*
rm img/*.img
read="planet/planet-latest.osm.pbf"
write="planet/bbox.osm.pbf omitmetadata=true"
zipname=$1
bbox=$2
# Europe Central:
#zipname=oseam_ng_europe_central
#bbox="left=-8 right=25 bottom=38 top=61"
JAVACMD_OPTIONS="-Djava.io.tmpdir=$HOME/tmp -Xmx6G"
osmosis/bin/osmosis --read-pbf $read --tee 1 outPipe.0=a --bounding-box inPipe.0=a completeWays=yes $bbox --write-pbf $write
./splitter.sh
./mkgmap.sh
cd img
zip $HOME/osm/maps/$zipname.zip gmapsupp.img
rm gmapsupp.img
mkdir openseamap
mv * openseamap
cp ../installer/* openseamap
zip $HOME/osm/maps/"$zipname"_ms.zip openseamap/*
rm openseamap/*
rmdir openseamap
cd ..
ncftpput -u ftp -p [email protected] ftp5.gwdg.de /pub/incoming maps/$zipname.zip
ncftpput -u ftp -p [email protected] ftp5.gwdg.de /pub/incoming maps/"$zipname"_ms.zip