OpenStreetMap 로고 OpenStreetMap

BitSchupser의 일기

최근 일기 항목

Shell script to filter gpx tracks before uploading

BitSchupser님이 English로 2011년 4월 22일에 게시함.

I wrote a little shell script that processes various gpsbabel filters on gpx files, perhaps it is usefull for somewone else.

The following filters will be used:
- remove any trackpoints in the neighbourhood of your home (for privacy, do not forget to enter your position, lat= and lon=) (if you want to filter more regions you can duplicate the radius,distance line)
- remove any trackpoints that have a distance < 2 meters
- remove duplicate trackpoints
- simplify the track (removes unnecessary trackpoints)
- remove trackpoints with a hdop > 4

Here is the script:

#!/bin/sh
if [ -z "$1" -o -z "$2" ]; then
echo "usage: $0 infile outfile"
exit 1
fi

tmpfile=$(mktemp)

gpsbabel -i gpx -f "$1" \
-x transform,wpt=trk,del \
-x radius,distance=0.8K,lat=48,lon=11,nosort,exclude \
-x transform,trk=wpt,del \
-x duplicate,location \
-x position,distance=2m \
-x simplify,crosstrack,error=0.001k \
-x discard,hdop=4 \
-o gpx -F "$tmpfile"

# removes some crap gpsbabel added to the file
sed '/^.*<name>.*$/d' "$tmpfile" | sed '/^.*<cmt>.*$/d' | sed '/^.*<desc>.*$/d' > $2

rm $tmpfile

New track

BitSchupser님이 English로 2009년 8월 17일에 게시함.

I just arrived from a journey threw Gaismarkt Winzer and Aletshausen and added some of the residential roads of these villages. There is amazing weather in the south of Germany - so mapping with the bike is just a great occupation :)

위치: Wasserberg, Haupeltshofen, Aletshausen, Krumbach (Schwaben) (VGem), Landkreis Günzburg, Bavaria, 86480, Germany

Starting to collect data with my bicycle

BitSchupser님이 English로 2009년 8월 9일에 게시함.

Hi everybody. This is my first article in my OSM blog :-).
I just got a holder to mount my smart phone onto my bike. Tomorow I will start my first journey to collect data by bike - I think this will be much more fun than by car.
Near my hometown there are many villages and hamlets who need to be collected - much work for the summer holiday :-)

위치: Niederraunau, Krumbach (Schwaben), Landkreis Günzburg, Bavaria, 86381, Germany