Discussion:
Creating a gpx file
TJ Hanson PhD
2017-04-20 16:04:01 UTC
Permalink
I am trying to create a valid gpx file. My program generates the lat/long for a series of data collection plots. Now I need to create a gpx file with those waypoints that can be uploaded to a handheld GPS unit. Creating a file with a .gpx extension does not solve the problem since the file structure is invalid. At least that is what my Garmin GPS unit is telling me when I use the Garmin POI loader to upload the file.

Has anyone done this? And can share the file create code? Thank you, TJ



_______________________________________________

Xojo forum:

https://forum.xojo.com/
V S Cordero
2017-04-20 16:23:22 UTC
Permalink
'Structure invalid' can mean many things:

Sorry if any of this is too basic and you’ve already 'been there and done that’:

Theres a sample gpx listing in the wikipedia article “GPS Exchange Format" you can refer to for any required elements you may have overlooked.

I’m assuming you’re using XMLDocument (CreateElement, AppendChild, etc) to assemble this and not just writing out strings to a file, otherwise you should definitely run your results through any number of XML validators available out there.

Vaughn
Post by TJ Hanson PhD
I am trying to create a valid gpx file. My program generates the lat/long for a series of data collection plots. Now I need to create a gpx file with those waypoints that can be uploaded to a handheld GPS unit. Creating a file with a .gpx extension does not solve the problem since the file structure is invalid. At least that is what my Garmin GPS unit is telling me when I use the Garmin POI loader to upload the file.
Has anyone done this? And can share the file create code? Thank you, TJ
_______________________________________________
https://forum.xojo.com/
______________________________________________
Emile Schwarz
2017-04-20 17:28:08 UTC
Permalink
You may have to use BinaryStream to create and write into the file instead of TextOutputStream / TextInputStream.
?

De : TJ Hanson PhD <***@forestmgt.com>
À : "XOJO, Inc." <***@lists.xojo.com>
Envoyé le : Jeudi 20 avril 2017 18h04
Objet : Creating a gpx file

I am trying to create a valid gpx file. My program generates the lat/long for a series of data collection plots. Now I need to create a gpx file with those waypoints that can be uploaded to a handheld GPS unit. Creating a file with a .gpx extension does not solve the problem since the file structure is invalid. At least that is what my Garmin GPS unit is telling me when I use the Garmin POI loader to upload the file.

Has anyone done this? And can share the file create code?  Thank you,      TJ



_______________________________________________

Xojo forum:

https://forum.xojo.com/



_______________________________________________

Xojo forum:

https://forum.xojo.com

Continue reading on narkive:
Loading...