[Gpsbabel-code] fix for merging google routes
Brought to you by:
robertl
From: Robert L. <rob...@us...> - 2006-07-09 01:36:03
|
I'm applying the following change to our google reader. It allows us to read multiple google routes in a single invocation without memory corruption as one might wish to do if he or she happened to want to build a route with maps.google.com with via points by merging multiple routes. If such a merging program were to exist and it were to take multiple arguments and generate a GPX 1.1 file suitable for uploading to a web service, invocation might look like getgoogleroute "nashville,tn" "pomona,IL" "murphysboro,il" "st. louis, mo" > foo.gpx and such a program might theoretically look something like this: #!/bin/sh while [ $# -ge 2 ]; do FROM=$1 TO=$2 # echo "Getting $FROM -> $TO " wget -O - \ "http://maps.google.com/maps?q=$FROM to $TO&output=js" > /tmp/gpxr.$# CMD="$CMD -f /tmp/gpxr.$#" shift done gpsbabel -i google $CMD -x simplify,count=250 -o gpx,gpxver=1.1 -F - |