User:Pavel

From OpenStreetMap Wiki
Jump to: navigation, search

I do not know if it is useful to someone, but here's my mapedit2gpx convertor. It eats same input cgpsmapper does, and produces gpx output.

cat << EOF
<?xml version="1.0" encoding="ISO-8859-2"?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd" version="1.1"
creator="Pavel's crazy script">

EOF
cat /tmp/delme_42000003.mp | grep Data0 | sed 's/),(/_/g' | tr '_' '\n' | sed 's/Data0=//' | tr -d '()' | tr ',' ' ' | while true ; do
        read A B || exit
        echo "<wpt lat=\"$A\" lon=\"$B\"><name>Foo</name></wpt>"
done
echo "</gpx>"