Christoph Wagner schrieb:


Am 26. März 2009 11:08 schrieb Christoph Wagner <[email protected] <mailto:[email protected]>>:



        Die Sachen werden bei mir mit wget geholt, mit bunzip2 / tar
        entpackt
        und dann mit den JAVA Tools verarbeitet.

Kann man bei JAVA ne default encoding einstellen?


Ich hab gerade nochmal gelesen, dass du ja auch cygwin verwendest. Könnte es passiert sein, dass deswegen was schiefgelaufen ist? (Kenn mich leider damit weniger gut aus und kann nur raten)

Wenn ich mir die points Datei mit Notepad++ anschaue, meint er das Dateiformat wäre "UTF8 ohne BOM" und das ö wird auch passend als ö dargestellt. Sieht also nach dem entpacken etc. erstmal ok aus.

Hab mal spaßeshalber probiert das Format auf "ANSI" bzw. "UTF8" umzustellen, hat aber in beiden Fällen keinen Effekt.

Kompletter Konsolenoutput übrigens (hab das Bash Skript das ich verwende auch mal angehängt):


Title: andorra
Download andorra.osm.bz2
--2009-03-27 01:28:31-- http://download.geofabrik.de/osm/europe/andorra.osm.bz2

Resolving download.geofabrik.de... 62.75.161.199
Connecting to download.geofabrik.de|62.75.161.199|:80... connected.
HTTP request sent, awaiting response... 416 Requested Range Not Satisfiable

    The file is already fully retrieved; nothing to do.

Make a backup copy of andorra.osm.bz2 ...
Unzip andorra.osm.tmp.bz2 ...
bunzip2: Output file andorra.osm.tmp already exists.
Split andorra.osm.tmp into smaller parts ...
start Fri Mar 27 01:28:32 CET 2009
key max-nodes/ val 1500000
comparing size 21625
a (42.4072265625,1.40625) to (42.6708984375,1.8017578125), size=21625
starting write out  Fri Mar 27 01:28:32 CET 2009
starting ways Fri Mar 27 01:28:32 CET 2009
starting rels Fri Mar 27 01:28:32 CET 2009
Finish Fri Mar 27 01:28:32 CET 2009
Total time 0s
Create the Map layer ...
Error in style: Error: (points:68): Invalid operation 'V' at top level
Could not open style null
Create the gmapsupp.img file, including the TYP file ...


Gruß, ULFL

#!/bin/bash

# Create Garmin gmapsupp.img file
#
# Download and convert osm (country) file to Garmin gmapsupp.img file
# (Also downloads any required tools )
#
# some information sources:
# http://wiki.openstreetmap.org/wiki/DE:All_in_one_Garmin_Map
# http://www.mkgmap.org.uk/page/tile-splitter


# Choose only one of the following:

#OsmDownload=http://download.geofabrik.de/osm/europe/germany/bayern.osm.bz2
#OsmDownload=http://download.geofabrik.de/osm/europe/germany/bremen.osm.bz2
#OsmDownload=http://download.geofabrik.de/osm/europe/germany/hamburg.osm.bz2

OsmDownload=http://download.geofabrik.de/osm/europe/andorra.osm.bz2
#OsmDownload=http://download.geofabrik.de/osm/europe/germany.osm.bz2
#OsmDownload=http://download.geofabrik.de/osm/europe/luxembourg.osm.bz2

#OsmDownload=http://download.geofabrik.de/osm/europe.osm.bz2


# Derive settings from download filename
inputbase=`basename $OsmDownload`
OsmFile=${inputbase/.bz2/}
OsmDir=${OsmFile/.osm/}

title=$OsmDir
echo Title: $title


# Download tools - identical for all osm files (only if necessary)
# To update the tools, simply delete the whole tools dir
mkdir -p tools
cd tools

# If splitter.jar is not here, download it
if [ ! -s splitter.jar ]; then
    echo Download splitter.jar
    wget http://www.mkgmap.org.uk/splitter/splitter.jar
fi

# If mkgmap is not here, download and unzip it
if [ ! -d mkgmap ]; then
    echo Download mkgmap
    wget http://www.mkgmap.org.uk/snapshots/mkgmap-latest.tar.gz

    echo Unzip mkgmap file
    gunzip -d mkgmap-latest.tar.gz
    tar -xf mkgmap-latest.tar
    rm mkgmap-latest.tar
    mv mkgmap-* mkgmap
fi

# If TYP and style files are not here, download and unzip them
if [ ! -s master.TYP ]; then
    echo Download TYP and style files
    wget http://www1.inf.tu-dresden.de/~s9080279/typ_style.tar.bz2
    bunzip2 typ_style.tar.bz2
    tar -xf typ_style.tar
    rm typ_style.tar
    # replace german umlaut ö with oe (otherwise we'll ge a style error)
    #sed 's/ö/oe/g' masterstyle/points > masterstyle/points2
    #mv masterstyle/points2 masterstyle/points
fi

cd ..


mkdir -p $OsmDir
cd $OsmDir

echo Download $OsmFile.bz2
wget --continue --timestamping $OsmDownload

echo Make a backup copy of $OsmFile.bz2 ...
# make a copy, otherwise we'll retrieve the .bz2 file again and again
cp $OsmFile.bz2 $OsmFile.tmp.bz2

echo Unzip $OsmFile.tmp.bz2 ...
bunzip2 $OsmFile.tmp.bz2

echo Split $OsmFile.tmp into smaller parts ...
# (even Bayern is already too large for a single tile)
java -Xmx1024m -jar ../tools/splitter.jar --max-nodes=1500000 $OsmFile.tmp

# TODO: For germany I get lot's of messages like "Crosses too many areas 
way31142237" or "Crosses too many areas relation7655" is this ok?

echo Create the "Map" layer ...
java -Xmx1024M -jar ../tools/mkgmap/mkgmap.jar 
--style-file=../tools/masterstyle --description=$title 
--country-name='Deutschland' --country-abbr='DE' --region-name='Deutschland' 
--region-abbrev='DE' --latin1 --lower-case --mapname=63240042 
--draw-priority=10 --net --route *.osm.gz

#echo Create a transparent "Address" layer ...
# ULFL: doesn't have any effect on my Nüvi / Zumo devices! Is this necessary 
for older Garmins?
#java -Xmx1024M -jar ../tools/mkgmap/mkgmap.jar 
--style-file=../tools/addresslayer_style --description='Address' --latin1 
--lower-case --mapname=63240030 --draw-priority=20 --road-name-pois=0x7101 
--transparent *.osm.gz

echo Create the gmapsupp.img file, including the TYP file ...
cp ../tools/master.TYP master.TYP
java -Xmx1024M -jar ../tools/mkgmap/mkgmap.jar --family-id=42 
--family-name='OpenStreetMap.org' --gmapsupp --latin1 --net --route *.osm.gz 
master.TYP

exit -1

echo Cleanup temporary files
rm -f 6324*.img
rm -f *.osm
rm -f *.tmp
rm -f *.tmp.bz2
rm -f areas.list
rm -f master.TYP
rm -f template.args


echo ###
echo $OsmDir/gmapsupp.img should be ready now!
echo Copy the gmapsupp.img file from $OsmDir to the Garmin folder of your device
echo DONT FORGET TO MAKE A BACKUP OF YOUR GARMIN FIRST ...!

cd ..
_______________________________________________
Talk-de mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/talk-de

Antwort per Email an