GPX export to garmin GPS

Started by kbfifi, May 21, 2012, 15:23:49

0 Members and 1 Guest are viewing this topic.

kbfifi

Hi Menion,

Thanks for a great program I'm using for almost a year now. I really like the improved support for geocaching last months. Unfortunately exporting the imported caches (from geocaching4Locus) doesn't work for me. I tried copying directly to my Garmin Dakota 20. Then it only shows the first cache only. Importing it in Garmin basecamp result in an error. I attached the exported gpx. It was exported with 2.3.4 using "compatible with mapsource" option. Hope you can help me.

Regards,
Kurt
  •  

kbfifi

#1
Nobody has these problems as well?
  •  

gynta

#2
btw
open in mapsource also failed.

stebu

#3
I think the error is in the GPX (schema) version (1.1-->1.0 and 1/1 --> 1/0)
I replaced the header of kbfifi's file with:

{?xml version="1.0" encoding="utf-8" standalone="yes"?>
{gpx version="1.0" creator="Locus Android"
 xmlns="http://www.topografix.com/GPX/1/0"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:locus="http://www.locusmap.eu"
 xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">

(change '{' to the correct char)

And then Garmin Basecamp accepted it.
  •  

kbfifi

#4
Thanks Stebu! You're right that made basecamp accept it. I checked with some other caches as well. Would it be possible to export with GPX 1.0 as well? Would be nice

However something else is still wrong. If I copy the gpx  to my Garmin gps the caches are not visible. This is my ultimate goal so I can store caches to my Garmin while I'm on trip.
  •  

stebu

#5
Quote from: "kbfifi"Thanks Stebu! You're right that made basecamp accept it. I checked with some other caches as well. Would it be possible to export with GPX 1.0 as well? Would be nice

However something else is still wrong. If I copy the gpx  to my Garmin gps the caches are not visible. This is my ultimate goal so I can store caches to my Garmin while I'm on trip.
I found it, it's the {![CDATA[...]]> field. I removed all of them:
   {urlname>{![CDATA[Rund um den Almenaer Berg III]]>{/urlname>    ==>
   {urlname>Rund um den Almenaer Berg III{/urlname>

But then you have to take care that there are no illegal characters in the data! So I had to remove two ampersands (&) characters, then my Dakota accepted the caches.

That's a mess!  :cry: It would be much cleaner if the CDATA was accepted.
  •  

kbfifi

#6
Thanks again stebu! What does CDATA add functionally? I guess I have another feature request: create Garmin compatible GPX!

This way you get caches via your mobile phone, put in the gps mem card and write gpx file to it! All that on site! 8-)
  •  

stebu

#7
Quote from: "kbfifi"Thanks again stebu! What does CDATA add functionally? I guess I have another feature request: create Garmin compatible GPX!

This way you get caches via your mobile phone, put in the gps mem card and write gpx file to it! All that on site! 8-)
XML CDATA element.
CDATA - (Unparsed) Character Data
The term CDATA is used about text data that should not be parsed by the XML parser.
Characters like "<" and "&" are illegal in XML elements.
"<" will generate an error because the parser interprets it as the start of a new element.
"&" will generate an error because the parser interprets it as the start of an character entity.
Some text, like JavaScript code, contains a lot of "<" or "&" characters. To avoid errors script code can be defined as CDATA.
Everything inside a CDATA section is ignored by the parser.
A CDATA section starts with "<![CDATA[" and ends with "]]>"

Without CDATA Locus should check every text field and somehow convert illegal characters into safe ones. I'm not sure if it is possible with "&amp;" and "&lt;"? And then this added '&' shall not be re-converted.

Maybe "<" ">" and "&" could be converted into { } and +, and call this conversion GPSr compatible. This would at least ruin any HTML inside the listing.

You should send Garmin a request to support CDATA in the GPSrs!
  •  

Menion

#8
hi guys,
  I'm not absolutely clever from your discussion but if I can improve something in export features that will not break current system, let me know.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

kbfifi

#9
Thanks for the very useful info. I agree this would rather be a Garmin issue. I think the flexible/fast support of Locus is one of your important strengths.  I don't think Garmin is necessarily wanting to support this. So for Locus to support such a (unique?) feature would make sense I think. There must other devices lacking the CDATA support too.
  •  

kbfifi

#10
Hi menion you were just ahead of me ;)  Please consider my proposal.
  •  

Menion

#11
and what's the point? remove all special characters that have to be in CDATA tag and allow export without CDATA?
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

stebu

#12
Quote from: "menion"hi guys,
  I'm not absolutely clever from your discussion but if I can improve something in export features that will not break current system, let me know.

At first, you should change the GPX version from 1/1 to 1/0, otherwise "Compatible with Basecamp" is not true!

Then, if you could add a selection "Compatible with (Garmin) GPSr", and with this selection the GPX file contains no CDATA elements. Instead, all the illegal characters have to be modified in the text fields. This would make kbfifi happy and I might also try to transfer a GPX file from my phone to the SD card of the Dakota 20.
  •  

kbfifi

#13
Exactly!
  •  

Menion

#14
you're not correct stebu. There is "Compatible with MapSource"! and with MapSource, exported data works! hmm hard work with this Garmin software ...
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •