I'm using google maps to build some MapSend routes for me. GPSBabel is
building the routes for me fine but the generated waypoint name isn't
much to be desired. Is there a format that will allow me to change to
waypoint name like you can with XCSV and still preserve the route
snippet of gpx showing generated name:
<rtept lat="30.505020000" lon="-97.819980000">
<rtept lat="30.511210000" lon="-97.823950000">
<rtept lat="30.520620000" lon="-97.830080000">
From: Robert Lipe <robertlipe@us...> - 2005-09-08 16:36:21
> I'm using google maps to build some MapSend routes for me. GPSBabel is
> building the routes for me fine but the generated waypoint name isn't
> much to be desired. Is there a format that will allow me to change to
It's not great, but looking in the XML we get from Google, there isn't
a lot to work with.
I *think* we could decompose the 'segments' tags that look like:
<segment id="seg1" pointIndex="20" meters="1425" seconds="92"
distance="0.9 mi" time="1 min">Bear <b>right</b> at <b>Swenson
St</b> and head toward <b>Airport exit</b></segment>
and use the pointIndex tag to look up the associated waypoint name
(we could be smarter than find_waypt_by_name(), but I'm not sure it's
worth it) and stuff the text ("Bear right at Swenson St and head toward
Airport exit") in that waypoint. Now instead of an nerdy name you have
an obtuse name.
If we took just the last boldfaced thing it might not be too bad.
[ insert sound clip of hammering, sawing, and general noise-making here ]
I think this actually takes advantage of a bug in my XML reader, but
this actually wasn't too bad to sketch up.
$ ./gpsbabel -i google -f foo -x simplify,count=10 -o gpx -F - | grep name
<name>E Tropicana Ave</name>
<name>I-15 N entry ramp</name>
<name>Hurricane/Zion Natl. Park</name>
<name>N State St</name>
<name>W Main St</name>
<name>Zion Park Blvd</name>
Let me float a patch on the -code list and see if Ron's repulsed by it.
Support GPSBabel by helping to improve it or fund those that that have
done so. Visit: