GPXX v3 files & Address based waypoints

 

I am trying to understand what the correct format of a GPXX v3 file would be if I want to use it to transfer a street address to a nuvi device via an SD card using the POI Loader.

Following is a GPXX v3 file to my local grocery store. It passes when I run it through an XML validator, and the POI Loader successfully converts it to a GPI file.

First I tried it without the <wpt> tag. Because the GPX 1.1 documentation indicates that it is legal to have an <extensions> tag outside of the <wpt> tag:
<gpx
version="1.1 [1] ?"
creator="xsd:string [1] ?">
<metadata> metadataType </metadata> [0..1] ?
<wpt> wptType </wpt> [0..*] ?
<rte> rteType </rte> [0..*] ?
<trk> trkType </trk> [0..*] ?
<extensions> extensionsType </extensions> [0..1] ?
</gpx>

However, the POI Loader failed without the <wpt> tag.

Then I added the <wpt> tag as shown in the example below. However, the 'lat' and 'lon' attributes are required when using this tag. I don't know the coordinates, and do not want to. I am just trying to download an address via an SD card so that I do not have to type it in via the touch screen.

For now I just set 'lon' and 'lat' to zero; however, I am wondering what is the 'correct' way to do this? I have also not tried to actually download the GPI file to see if the nuvi device would make sense of it.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<gpx
xmlns="http://www.topografix.com/GPX/1/1"
xmlns:gpxx = "http://www.garmin.com/xmlschemas/GpxExtensions/v3"
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
http://www.garmin.com/xmlschemas/GpxExtensions/v3
http://www8.garmin.com/xmlschemas/GpxExtensions/v3/GpxExtensionsv3.xsd"
version="1.1"
creator="me">

<metadata>
<name>HEB</name>
<keywords>grocery store</keywords>
</metadata>

<wpt lat="0" lon="0">
<extensions>
<gpxx:WaypointExtension>
<gpxx:Categories>
<gpxx:Category>grocery store</gpxx:Category>
</gpxx:Categories>
<gpxx:Address>
<gpxx:StreetAddress>16900 North RR 620</gpxx:StreetAddress>
<gpxx:City>Round Rock</gpxx:City>
<gpxx:State>TX</gpxx:State>
<gpxx:Country>USA</gpxx:Country>
<gpxx:PostalCode>78681-3922</gpxx:PostalCode>
</gpxx:Address>
</gpxx:WaypointExtension>
</extensions>
</wpt>
</gpx>

Longitude, Latitude are required.

otto wrote:

I am trying to understand what the correct format of a GPXX v3 file would be if I want to use it to transfer a street address to a nuvi device via an SD card using the POI Loader.

It's documented in the POI Loader help file. I also added a section to the wikipedia gpx article.

See section marked:
"Example of Garmin Waypoint extensions"

arrow http://en.wikipedia.org/wiki/GPX_%28Data_transfer%29

and he wrote:

Because the GPX 1.1 documentation indicates that it is legal to have
...However, the POI Loader failed without the <wpt> tag.

The gpx specification is huge! - There's a world of difference between what's legal and what gives the desired results.

I think you have (so far), just done a test for 'well-formed' xml. The official test for a 'valid' gpx file is documented here:

arrow http://www.topografix.com/gpx_validation.asp

It strikes me, that this is actually checking the file against its schema.

For me the acid test is: Can POI Loader read them? ... Can mapsource read them?

In the 'Garmin' world, <wpt>'s are the basis of each Waypoint/POI/Favourite and thus must exist. They must have a longitude and latitude, even if they're wrong. With care, you can 'sequence' them, so they appear in the order you want - though if you travel over a wide area, this will require some thought. In any case, they should not be more than about 5000 miles away, or they won't show up at all.

You don't say which unit you have, but you will notice that the address fields display in the wrong order. (You may not notice, if you don't use all the fields). Each unit has two orders (based on a flag in the map) in which the address fields are displayed. By and large, this is different from one range of units to the next. They are all wrong - but maybe I'm just fussy!

--
------------------------ Phil Hornby, Stockport, England ----------------------               http://GeePeeEx.com - Garmin POI Creation made easy           »