I am trying to open a gpx file in Qgis, with works just fine. the problem however is that it contains multply tracks. When I walk my tracks in the app "Galileo", I give the tracks specific colors. Can I somehow open it up Qgis with the color information? Right now Qgis just give the tracks random colors,
-
Does this mysterious "Galileo" app (link please?) have any other export option for its tracks? Or could you point us to one of your GPX files?– SpacedmanCommented Feb 26, 2018 at 15:26
-
galileo-app.com Yes there is KML, I have tried to open that in Qgis to, with same result. But Goggle Pro opens the KML file with the colors– WilliamCommented Feb 26, 2018 at 15:35
-
There's no free version of that app - could you upload a KML and a GPX and anything else it can export for us to try? The information must be in the KML but its a complex format and maybe needs some work for QGIS to work with it...– SpacedmanCommented Feb 26, 2018 at 15:39
-
1QGIS won't style features unless you tell it what columns in your data you want to style the features with. It might be that the colours are sitting there in a data column, but without a sample we can't tell. What's in the attribute table when you load the KML into QGIS?– SpacedmanCommented Feb 26, 2018 at 15:42
-
Okay, thanks for the help. there is a trial, 5 days I think. if you have android. I'm not sure about ios. link "play.google.com/store/apps/details?id=com.bodunov.galileo"– WilliamCommented Feb 26, 2018 at 15:56
1 Answer
It depends on which device/app generated the GPX file. A GPX file is a type of XML file. The X in XML is for "eXtensible", and a GPX file is also extensible. The only data fields that are required by the GPX standard are the X and Y coordinates for the point, but the GPX schema includes available fields for timestamp, track name, and a bunch of other attributes.
Color is not part of the GPX schema, but because it's an XML file format, you can add other data fields, and it looks like Garmin has done that with their GPS Extensions: One of those available attributes is a color for displaying the point/line feature. So if your GPX files were captured with a Garmin, they may include color information, and that may be what your app is reading to display the colors. If that data exists in your file, you can have QGIS (or any other GIS) use that field to assign colors to your tracks, though it won't do it automatically.
GPX/XML files are text files, so to check if yours contain color data, you can open it in Notepad++ or some other editor and search for the word "color". If your file is using the Garmin extensions, you'll find it.
-
Okay, My export options in Galieo is GPX or KML. I opened the GPX file in Notepad++ but did't see color anywere when I searched for it, But in the KML file i found this "color>C8FF963A</color>" can I get Qgis somehow to read it?– WilliamCommented Feb 26, 2018 at 17:26
-
@William I'm pretty sure QGIS can't read attributes from a KML file, because there is no standard format for them. If it could, I don't think it can symbolize features by HTML color code (other than the same way it can symbolize any features that share a common attribute).– Dan CCommented Feb 26, 2018 at 17:30
-
Alright. I have a new idea. If I right click on my gpx layer, and press on open attribute table. I see all my 73 tracks with their names. I haved named them all after color too. Can I somehow mark all tracks named red for exemple, and save them as a new GPX file? BTW thank for quick answers!!– WilliamCommented Feb 26, 2018 at 18:02
-
Use rule-based styling, with a rule for each color, something like "trackname" = 'red'.– cskCommented Feb 26, 2018 at 19:26
-
2This would be so much easier if one of the files could be made available on Dropbox or elsewhere rather than us just guessing. Commented Feb 27, 2018 at 16:51