Locus Map - forum

Support => Wishlist => Implemented => Topic started by: endless12 on January 01, 2012, 00:18:48

Title: Import/Export GPX Feature
Post by: endless12 on January 01, 2012, 00:18:48
I'm sure its been tested but every-time I export my Geocache's saved in a category list (which was imported with Geocaching4Locus) it incorrectly saves the file. When I retry to import it with Locus it throws an error. It does this every-time for 3 different locations (downloading 200 caches around 3 different points of interest). I also try to import the file with GSAK which gives a "not well formatted" error.

Not sure why? Its supposed to work right? Ill give more details below assuming its a problem.

When I try to import with GSAK it throws:

[Text is copied from the dialog]
---------------------------
Error
---------------------------
This file does not pass XML validation and will be ignored
C:UsersTysonDesktopMOAB_A~1.GPX:3255:17: not well-formed
---------------------------
OK  
---------------------------

Ok the gpx @ line 3255 is below bolded.

<wpt lat="38.5646" lon="-109.5502">
<time>1970-01-01T00:00:00Z</time>
<name>GC10JMX</name>
<desc><![CDATA[ODS P&G's 50th by Foursis, Traditional Cache (1.5/1.0)]]></desc>
<url>http://www.geocaching.com/seek/cache_details.aspx?wp=GC10JMX</url>
----->[b]<urlname>ODS P&G's 50th</urlname>[/b]<-------
<sym>Geocache</sym>
<type>Geocache|Traditional Cache</type>
<groundspeak:cache id="0" available="True" archived="False" xmlns:groundspeak="http://www.groundspeak.com/cache/1/0/1">
<groundspeak:name><![CDATA[ODS P&G's 50th]]></groundspeak:name>
<groundspeak:placed_by><![CDATA[Foursis]]></groundspeak:placed_by>
<groundspeak:owner><![CDATA[c8ac78c1-bccf-45c4-bcb1-925130173f81]]></groundspeak:owner>
<groundspeak:type>Traditional Cache</groundspeak:type>
<groundspeak:container>Small</groundspeak:container>
<groundspeak:difficulty>1.5</groundspeak:difficulty>
<groundspeak:terrain>1.0</groundspeak:terrain>
<groundspeak:country>United States</groundspeak:country>
<groundspeak:state>Utah</groundspeak:state>
<groundspeak:short_description html="True"><![CDATA[This cache was hidden as part of the One Degree of Separation Geocaching Project. This is a seed that came from: GCWB07 ODS:Zip Code Danny ODS]]></groundspeak:short_description>
<groundspeak:long_description html="True"><![CDATA[A quick park and grab for all traveling cachers. This container (formerly a film canister having been replaced due to muggling) is hidden within walking distance of a main street motel.  This cache contains a log only so bring your own pen.
 
 CONGRATULATIONS FOURCORNERPAIR FOR FIRST TO FIND!!!]]></groundspeak:long_description>
<groundspeak:encoded_hints><![CDATA[]]></groundspeak:encoded_hints>
<groundspeak:logs>
<groundspeak:log id="0">
<groundspeak:date>2011-12-26T13:30:18Z</groundspeak:date>
<groundspeak:type>Found it</groundspeak:type>
<groundspeak:finder><![CDATA[D+M]]></groundspeak:finder>
<groundspeak:text encoded="False"><![CDATA[Found this one on a cold night after eating at Moab Brewery. SL & TFTC]]></groundspeak:text>
</groundspeak:log>
<groundspeak:log id="0">
<groundspeak:date>2011-12-10T07:20:16Z</groundspeak:date>
<groundspeak:type>Found it</groundspeak:type>
<groundspeak:finder><![CDATA[Colorado Williams]]></groundspeak:finder>
<groundspeak:text encoded="False"><![CDATA[An over night get-a-way. We love Moab!]]></groundspeak:text>
</groundspeak:log>
<groundspeak:log id="0">
<groundspeak:date>2011-11-27T01:37:11Z</groundspeak:date>
<groundspeak:type>Found it</groundspeak:type>
<groundspeak:finder><![CDATA[InfamousZ]]></groundspeak:finder>
<groundspeak:text encoded="False"><![CDATA[Quick find on our way back to SLC. We love Moab!!! TFTC]]></groundspeak:text>
</groundspeak:log>
<groundspeak:log id="0">
<groundspeak:date>2011-11-26T07:51:38Z</groundspeak:date>
<groundspeak:type>Found it</groundspeak:type>
<groundspeak:finder><![CDATA[boobug15]]></groundspeak:finder>
<groundspeak:text encoded="False"><![CDATA[Quick find.  TFTC]]></groundspeak:text>
</groundspeak:log>
<groundspeak:log id="0">
<groundspeak:date>2011-12-20T14:03:00Z</groundspeak:date>
<groundspeak:type>Found it</groundspeak:type>
<groundspeak:finder><![CDATA[mtnman4fun]]></groundspeak:finder>
<groundspeak:text encoded="False"><![CDATA[Didn't find it the first time we looked for this one.  Returned and found it.  TFTC.]]></groundspeak:text>
</groundspeak:log>
</groundspeak:logs>
</groundspeak:cache>
</wpt>

If I delete the text inside the description to <urlname>DELETED</urlname> the problem goes away. But now it throws the same dialog error @ line 6863:15 inside the <desc> xml descriptor. I haven't been able to create a valid gpx file...

<wpt lat="38.57865" lon="-109.49055">
<time>1970-01-01T00:00:00Z</time>
<name>GC17CG4</name>
---->[b]<desc><![CDATA[Fun & Things by Big D 24, Traditional Cache (3.5/4.5)]]></desc>[/b]<-----
<url>http://www.geocaching.com/seek/cache_details.aspx?wp=GC17CG4</url>
<urlname>Fun & Things</urlname>
<sym>Geocache</sym>
<type>Geocache|Traditional Cache</type>
<groundspeak:cache id="0" available="True" archived="False" xmlns:groundspeak="http://www.groundspeak.com/cache/1/0/1">
<groundspeak:name><![CDATA[Fun & Things]]></groundspeak:name>
<groundspeak:placed_by><![CDATA[Big D 24]]></groundspeak:placed_by>
<groundspeak:owner><![CDATA[67067c7a-cd1e-4aa6-b328-fa4e8c30e330]]></groundspeak:owner>
<groundspeak:type>Traditional Cache</groundspeak:type>
<groundspeak:container>Regular</groundspeak:container>
<groundspeak:difficulty>3.5</groundspeak:difficulty>
<groundspeak:terrain>4.5</groundspeak:terrain>
<groundspeak:country>United States</groundspeak:country>
<groundspeak:state>Utah</groundspeak:state>
<groundspeak:short_description html="True"><![CDATA[This cache is placed on a ATV,4x4 trail. You can take a short walk from the road to the cache or take a ATV or jeep.On a ATV the terrain can be difficult.]]></groundspeak:short_description>
<groundspeak:long_description html="True"><![CDATA[This cache is a ammo can.]]></groundspeak:long_description>
<groundspeak:encoded_hints><![CDATA[Look in the tree]]></groundspeak:encoded_hints>
<groundspeak:logs>
<groundspeak:log id="0">
<groundspeak:date>2011-11-24T12:57:37Z</groundspeak:date>
<groundspeak:type>Found it</groundspeak:type>
<groundspeak:finder><![CDATA[GeoGhostX]]></groundspeak:finder>
<groundspeak:text encoded="False"><![CDATA[Running this trail today with my son, Alex (aka Zander87) on his first trip to Moab.  Top of The World Trail yesterday, and Fins N Things today, Thanksgiving Day 2011.  Can't think of a better way to spend the holiday, enjoying some pure slickrock trail and red rock views.  TFTC!]]></groundspeak:text>
</groundspeak:log>
<groundspeak:log id="0">
<groundspeak:date>2011-11-24T13:29:43Z</groundspeak:date>
<groundspeak:type>Found it</groundspeak:type>
<groundspeak:finder><![CDATA[Zander87]]></groundspeak:finder>
<groundspeak:text encoded="False"><![CDATA[Cool ammo box! TFTH!]]></groundspeak:text>
</groundspeak:log>
<groundspeak:log id="0">
<groundspeak:date>2011-10-28T05:49:25Z</groundspeak:date>
<groundspeak:type>Found it</groundspeak:type>
<groundspeak:finder><![CDATA[ollielilly]]></groundspeak:finder>
<groundspeak:text encoded="False"><![CDATA[Found it yesterday.  Great day jeeping with friends. Incredible place.  TFTC
]]></groundspeak:text>
</groundspeak:log>
<groundspeak:log id="0">
<groundspeak:date>2011-10-27T08:03:36Z</groundspeak:date>
<groundspeak:type>Found it</groundspeak:type>
<groundspeak:finder><![CDATA[Pathfinder & Snoopy]]></groundspeak:finder>
<groundspeak:text encoded="False"><![CDATA[What a fantastic ride we had.  Thanks for placing this cache in such a great place.
Pathfinder & Snoopy of San Diego, CA]]></groundspeak:text>
</groundspeak:log>
<groundspeak:log id="0">
<groundspeak:date>2011-10-27T12:14:47Z</groundspeak:date>
<groundspeak:type>Found it</groundspeak:type>
<groundspeak:finder><![CDATA[lkings4]]></groundspeak:finder>
<groundspeak:text encoded="False"><![CDATA[Great day jeeping and the cache was just an added bonus! TFTC]]></groundspeak:text>
</groundspeak:log>
</groundspeak:logs>
</groundspeak:cache>
</wpt>

This time if I delete the text it doesn't fix it. Possibly I deleted text the XML reader needs for geocaches. Maybe I'm just doing something wrong? I can give more info if its an actual issue. My other files all have a random spot that throws an error.

Locus Version: 1.14.6 & 1.15.4 (tried both)
Geocaching4Locus: 1.7.3
Phone: Android HTC Eris

Thanks.
Title: Re: Import/Export GPX Feature
Post by: Menion on January 01, 2012, 18:04:08
thanks for perfect report. Issue is thanks to '&' sign. So I fixed it, seems that now works correctly, anyway test next release version and let me know if problem remain ...
Title: Re: Import/Export GPX Feature
Post by: Menion on January 01, 2012, 21:53:19
please try test version viewtopic.php?f=25&t=1404#p8322 (http://forum.asamm.cz/viewtopic.php?f=25&t=1404#p8322)
Title: Re: Import/Export GPX Feature
Post by: endless12 on January 02, 2012, 08:32:39
Yup figured it was a character formatting error.

But its fixed!

Thanks a lot.
Title: Re: Import/Export GPX Feature
Post by: vtgeopirates on January 04, 2012, 03:25:49
Menion,
Are you working on adding logs when you import a GPX or pocket query file to existing geocaches instead of just replacing all of the caches?
Title: Re: Import/Export GPX Feature
Post by: Menion on January 04, 2012, 07:27:19
not yet ...

wait ...

(after an hour later)

done ;)
Title: Re: Import/Export GPX Feature
Post by: vtgeopirates on January 05, 2012, 02:52:42
Great. Can't wait for the next release to try it out. Is there any settings to limit the number of logs that will build up?
Title: Re: Import/Export GPX Feature
Post by: Menion on January 06, 2012, 12:58:50
no, no limit ... do you mean it's necessary? I don't think so ... you may test it here viewtopic.php?f=28&t=400#p9039 (http://forum.asamm.cz/viewtopic.php?f=28&t=400#p9039)
Title: Re: Import/Export GPX Feature
Post by: vtgeopirates on January 07, 2012, 13:55:08
Yes. I think you need a setting to limit the max number of logs otherwise file size may get too big. I would set my personal limit to 20.  I want to import 6000 POIs each week with 5 new logs. Perhaps the file size will grow too large is not limited. Is there a memory limit for loaded POI files that needs to be controlled? I know the GDAK addon limits the total POI import to about 4000.
Title: Re: Import/Export GPX Feature
Post by: Menion on January 07, 2012, 14:57:56
I'm not worried much about some memory limits in this case, anyway I rather set limit to 50 last logs. I don't have home some older PQ files, so please test this feature during your updates and if you discover that I delete or wrongly sort some data, let me know.

addon limit is because we still have problems with sending enormous number of data from addon to locus, so that's why this limit ...
Title: Re: Import/Export GPX Feature
Post by: vtgeopirates on January 07, 2012, 15:15:34
I like your answer. If memory is not a problem, 50 is great. I have Pro version but I think working release is only for free version so I will test in free version. I see no new choice on import, so I will choice Overwrite.
Title: Re: Import/Export GPX Feature
Post by: vtgeopirates on January 07, 2012, 17:22:23
Testing complete of Import GPX files from SD card. I have not tested import of PQ with geocaching live yet. Import - Overwrite, now adds logs. Thank you, but one small problem... Logs are not in date order.

Can you please make log view read BB code?
Title: Re: Import/Export GPX Feature
Post by: Menion on January 08, 2012, 09:14:33
there was only a problem with order of your own find log right? I found one older PQ file so I can finally test it. Seems to be fixed now

about BB codes ... for this, there's need to write own system ... I'm not sure that this worth this. Only usable place for BB codes parser should be here in logs and it really take some time. Anyway I'll look at it a little ... (at least few tags)
Title: Re: Import/Export GPX Feature
Post by: Menion on January 08, 2012, 11:55:58
support for BB codes added. If any code will not be correctly displayed, send me sample GPX file with this log
Title: Re: Import/Export GPX Feature
Post by: vtgeopirates on January 13, 2012, 04:40:45
for bold works fine, but colors for fonts don't.
Like:
Title: Re: Import/Export GPX Feature
Post by: Menion on January 13, 2012, 07:09:42
I have to define them manually :) added was "green" and "brown" .. so now also red. Don't you know list of supported colours?
Title: Re: Import/Export GPX Feature
Post by: stebu on January 13, 2012, 09:21:26
Quote from: "menion"I have to define them manually :) added was "green" and "brown" .. so now also red. Don't you know list of supported colours?
Maybe     colors = ('black', 'blue', 'red', 'purple', 'pink', 'orange', 'yellow', 'green', 'white')
Title: Re: Import/Export GPX Feature
Post by: Menion on January 13, 2012, 09:33:13
oki, thanks ... I updated list of tags. Anyway if there will be still some problems with BB codes, let me know. I'm tagging this topic (and offtopic) as solved
Title: Re: Import/Export GPX Feature
Post by: vtgeopirates on January 13, 2012, 22:46:40
Colors still don't seem to work (ver 1.16.1) at least red and purple.
Here is a more complete known working list of BB code used in geocaching.com logs:

URL Linking:
[url=http://www.cnn.com]Go to CNN[/url]
[url]CNN.com[/url]

Bold:
[b]This should be bold text.[/b]

Italics:
[i]This should be italics text.[/i]

Strike Through:
[s]This text should be striked through.[/s]

Text colors:
Only the following colors work using this format: [blue]text[/blue]
blue
brown
green
gold
maroon
navy
orange
pink
purple
red
white
yellow
black

Line Break:
[br]This is the 1st line[br]This is the 2nd line

Text Size:
[size=1]size=1[/size]
[size=2]size=1[/size]
[size=3]size=1[/size]
[size=4]size=1[/size]

Font Type:
[font=Arial]
[font=Comic Sans MS]
[font=Verdana]
Note that these BBCodes are different in that no closing BBCode is used!
Not all type common type fonts were tested.