User:Waschbaer

From OpenStreetMap Wiki
Jump to navigation Jump to search
Public domain
All my contributions to OpenStreetMap are released into the public domain. This applies worldwide.
In case this is not legally possible, I grant anyone the right to use my contributions for any purpose, without any conditions, unless such conditions are required by law.

I try to start the mapping in Erlangen. The most tracks are done by bike, so I don't have included the motorways. For my PDA I am looking for an OSM application. I am using an royaltek bluegps GPS_Reviews#BlueGPS and additional an Xaiox itracku GPS_Reviews#Xaiox_itracku. It works fine. As new program I found PocketMV. At first the script for converting the pocketmv nmea log to gpx:

## convert_gps
for file in `ls *.nme` ; do
  if [ ! -s ${file}a.gpx ] ; then
    echo starter Konvertierung a : $file
    cat "$file" \
      | sed "s.\r.\n.g" \
      | gpsbabel  -i nmea -f - \
        -o gpx -F  ${file}a.gpx
    ls -l $file*
  fi
done

This is the script for producing the garmin map file, that can loaded into the PocketMV program on the pda:

## get_garmin
BBOX="10.25,49.19,11.85,49.95"
name="Erlangen_Nuernberg_Fuerth"

# Grab the .osm file
download_url='http://www.openstreetmap.org/api/0.3/map?'
download_bbox="bbox=$BBOX"

#CURL_ARGS="-u $USERNAME"
CURL_ARGS="--netrc" # make shure, that the $HOME/.netrc file is OK

curl --anyauth $CURL_ARGS -o $name.osm "$download_url$download_bbox"


## convert_osm2polish  http://brainoff.com/osm/garmin/convert.txt
cat $name.osm | ./convert_osm2polish > $name.mp

## cgpsmapper-static http://www.cgpsmapper.com/download/cgpsmapper-static.gz
./cgpsmapper-static $name.mp


The following script converts osm-data into a PDF (vector based)

## get_pdf
BBOX="10.865,49.538,11.078,49.654"
name="Erlangen"

# Grab the .osm file
download_url='http://www.openstreetmap.org/api/0.3/map?'
download_bbox="bbox=$BBOX"

#CURL_ARGS="-u $USERNAME"
CURL_ARGS="--netrc" # make shure, that the $HOME/.netrc file is OK


#if  test ! -s $name.osm -o "`find $name.osm  -mmin +120`"; then
  echo trying get: curl --anyauth $CURL_ARGS -o $name.osm "$download_url$download_bbox"
  curl --anyauth $CURL_ARGS -o $name.osm "$download_url$download_bbox"
#fi

cp svn.openstreetmap.org/utils/osmarender/osmarender.xsl .
cp svn.openstreetmap.org/utils/osmarender/osm-map-features.xml .
cp svn.openstreetmap.org/utils/osmarender/Osm_linkage.png .
cp svn.openstreetmap.org/utils/osmarender/somerights20.png .

rm data.osm
ln -s $name.osm data.osm
xmlstarlet tr osmarender.xsl osm-map-features.xml > $name.svg

inkscape $name.svg -E $name.eps --export-area-drawing

ps2pdf14 -dEPSFitPage $name.eps $name.pdf