This object is in archive! 

Extend Garmin GPX compatibilty

Peter Stahl shared this idea 4 years ago
Declined

It is absolutely great, that you have a built in Garmin POI compatibility. When I choose in Locus a Garmin icon for a point, it is visible as such point in Basecamp. Import points from basecamp work great, too! Well done!


Also, when I export tracks from Basecamp, their color is visible in Locus.


Garmin > Locus


Black > 000000

DarkRed > 8b0000

DarkGreen > 006400

DarkYellow > b5b820

DarkBlue > 00008b

DarkMagenta > 8b008b

DarkCyan > 008b8b

LightGray > cccccc

DarkGray > 444444

Red > ff0000

Green > 00ff00

Yellow > ffff00

Blue > 0000ff

Magenta > ff00ff

Cyan > 00ffff

White > ffffff


BUT, when I export tracks from Locus to Basecamp (even in this colors), their color is not visible! All tracks in basecamp are grey. Could you please change the export to GPX routine so, that when you export a track in the colors above, it will generate a gpx like this:

<trk>

<name>dark yellow track</name>

<extensions>

<gpxx:TrackExtension>

<gpxx:DisplayColor>DarkYellow</gpxx:DisplayColor>

</gpxx:TrackExtension>

</extensions>

<trkseg>...


Thanks, Peter

Replies (1)

photo
1

Hello Peter,

thanks for the precise feature requests.

I see here two main problems:

  1. such change will definitely break compatibility with many many services and applications because
  2. even in official GPX scheme (documentation), color for tracks should be as hex RGB value, so exactly what Locus Map do now

Because of 2, we may expect that not many application will understand color in text form. Also, you are the first who wrote about it. So most probably, there is a really low number of users of Basecamp and because of them, I won't break many other apps that probably do not have a problem with it.

Solution? Only I see is an additional option "Optimize for Basecamp". And again, extra settings for very low number of users. So no until more people convince me that it is really needed.

Sorry and thanks for understanding.

photo
1

Thank you for your fast and detailed answer. I totally understand your point of view. I am afraid that there are not many out there that work intensivly with Garmin AND Locus. So the solution for me is that I will run all files through my own converter who converts your way of storing color data into Garmins way.


I digged a bit deeper into the topic and are very much surprised, that the topografix GPX scheme includes support line colors (in hex). But even though they define colorType

NamecolorType
Content
  • Base XSD Type: hexBinary

they do not really provide one single way of storing color data in the GPX. So every piece of software is handling that by their own way. Many go in line with Garmin as they are the biggest player on the market.

I wonder why you are not following the guideline. Your code looks like this:

    <extensions>
		<gpx_style:line>
			<gpx_style:color>0000FF</gpx_style:color>
			<gpx_style:opacity>0.59</gpx_style:opacity>
			<gpx_style:width>6.0</gpx_style:width>
		</gpx_style:line>	
  </extensions>
But in the GPX scheme they define colorType not color.

In the end it seems you are making just use of extensions to define colors - which is totally okay. Same are doing the other players as Garmin...

    <extensions>
		<gpxx:TrackExtension>
			<gpxx:DisplayColor>Red</gpxx:DisplayColor>
		</gpxx:TrackExtension>	
    </extensions>
...or JSOM (https://josm.openstreetmap.de/ticket/16796)

	<extensions>
	<!-- xmlns:gpxd="http://josm.openstreetmap.de/gpx-drawing-extensions-1.0" -->
		<gpxd:color>#0000FF</gpxd:color>	
	</extensions>
...or GPXEV (https://askz.sakura.ne.jp/gpx_editor_and_viewer/xml_schema/0_3/)

<gpxev:color> xsd:string </gpxev:color>
...or OkMap

    <extensions>
		<line xmlns="http://www.topografix.com/GPX/gpx_style/0/2">
			<color>0000FF</color>
		</line>
    </extensions>
Is that observation correct?


Cheers,

Peter

photo
1

Hello Peter,

even if all these apps use a little different text representation, result should be always same. Extension tag, then "line" tag and then defined "color". And it really is "color". "ColorType" is just a type of variable, see ...

/08440c2da9789e619baea4457a3f51e8


Two from three other apps you mentioned use RGB, one use color as a text. No matter what, I believe we may agree that using RGB is more logical and more expected.

Question from my side: why you use Basecamp app? What benefit does it bring to you? I tried it once or twice, more for testing then a real usage, and can't imagine to use it on a daily basis to be true ...

Menion

photo
2

I also used it earlier. But with the good locus I do not need them anymore.

photo
1

Ah, thanks for the screenshot. Got it now! And yes, I totally agree that using hex color is the better way to go. But companies like Garmin and Apple care a s***t about standards... Both companies have a lot of similarities: Userfriendly interface, easy to use, little features, not flexible, good hardware but with old technology and much overpriced!

Back to the topic... I live in Cambodia and I use navigation almost every day. Inside town with car and motorbike I use Locus, but offroad with my dirtbike I use a Garmin Montana as it is more durable and better to use in the rain and mud with gloves.

Therefore I need to sync my tons of offroad tracks. In the past I converted everything to kml and archived everything in Google Earth. I would like to switch from Google Earth to Basecamp. When it comes to track editing, Basecamp is much more powerful (actually, a couple of years ago I made a plugin for Google Earth to split & join tracks). Another reason why I use Basecamp is, that I create my own Garmin maps with several command line tools. So, yes, I don't like Basecamp either, but I need it as Locus does not support TYP layout files in garmin maps. If Locus would support that and better Garmin GPX compatibility, I think I would run an Android emulator on PC with Locus to archive all tracks and points.

photo
1

Fair arguments. Garmin Montana is definitely an amazing piece of hardware ... not a software :). Very low outdoor Android devices may fight against it, that is correct.

I do not know what Basecamp does more then Locus editor, but with two-mouse buttons, it is possible to do miracles so most probably Locus track editor won't ever be so complex as some desktop editor may be.

Maps: it is probably the only area where I see possible improvement. Expect OruxMaps, on Android probably isn't any app that is able to display Garmin IMG maps in a usable form. And this probably won't change soon (at least not on Locus Map side). An alternative solution is a convert of your maps into MapsForge format that may be handled with custom styles with many many apps, not just Locus Map.

Anyway ... GPX improvements: sorry no. I'm really worried it may break compatibility for existing users and because after many years of this system, you are the first one with this request, I'm convinced that (almost) nobody cares about this use-case.

Thanks for understanding.

Menion

photo
1

Locus export to gpx 1.1

Nor the colour, nor opacity nor width are displayed in GPS Visualizer either.

https://www.gpsvisualizer.com/


Is there other software that does display the Locus exported "style" correctly ?

So back to the list:


..by Gpx Editor https://sourceforge.net/projects/gpxeditor/


<extensions>

<line xmlns="http://www.topografix.com/GPX/gpx_style/0/2">;

<color>FF00FF</color>

<opacity>0.7</opacity>

</line>

</extensions>

Display by Locus + GPS Visualizer @ import 100% ok.


..by Notepad ++ (Added width)


<extensions>

<line xmlns="http://www.topografix.com/GPX/gpx_style/0/2">;

<color>FF00FF</color>

<opacity>0.7</opacity>

<width>14</<width>

</line>

</extensions>

Display by Locus + online GPS Visualizer 100% ok @ import.

photo
1

Yeah, good point. I'd love to know too, which other software does display Locus exported GPX correctly!


At least https://www.gpsvisualizer.com does support (almost) fully all three styles!

First the style as you have described above:

30e15b6a356cfec51abee59ef527996d


Second the Garmin style (though Garmin does not support width and transparency)

d284ed7f24c2434686d11c31edc960a4


And Locus style (Result below after importing & exporting the file in Locus). Colors ARE supported(!) but not line weight - but that seems to be a bug in gpsvisualizer (you should report that to https://www.gpsvisualizer.com/)

3b4914105f2c852749b0a156a3daa179

photo
1

Export both imported (correct display in Locus) by the Locus function 'merge tracks'.

Find the export result in attachment: 2_Tracks.gpx

The Locus extension replaces the original imported style extension.

At import in GPS Visualizer the Locus style extension is NOT supported. So Gps Visualizer automatically adds different track colors when importing multiple tracks. By default the first track = red color. You can test and double check by removing the extension

07553106241cd3c0ade6ddc6f34b2a92


The only app I discovered so far that supports this style extension at import is Locus ;-)

The original file (by Notepad edit) I did attach before is correctly displayed in Gps Visualizer.

74aba06c7b40d062050c7b86094a62e9

photo
1

Guys, you have a longer discussion that needs time-consuming testing you already did ... so, if there is something wrong in GPX export in Locus Map, simply! write to me about what should be changed & improved. Thanks :)

photo
1

No problem Menion.

I never did use (export and check) before , so had to do some tests.

But I think a little change in your Locus export would improve compatibiltiy.

The change is not too difficult I suppose. (As Locus already understands the import)

So like this:

<extensions>

<line xmlns="http://www.topografix.com/GPX/gpx_style/0/2">;

<color>FF00FF</color>

<opacity>0.7</opacity>

<width>14</<width>

</line>

</extensions>

photo
1

Oki, thanks Willy. I think that the current format is valid anyway this looks more "compatible".

So let's try it in the next version.

Replies have been locked on this page!