Jump to content

GPSBabel help in converting kml to gpx


rws

Recommended Posts

Is there a way to get the track name (557 in example below) in a kml file to transfer to the gpx file? I'm using GPSBabel 1.3.4 and when I run the conversion the resulting gpx file will show up as Track 001 instead of 557 when opened in Mapsource.

 

<?xml version="1.0" encoding="UTF-8"?>

<kml xmlns="http://earth.google.com/kml/2.0">

<Document>

<Folder>

<name>SENTIERS_l Drawing</name>

<open>1</open>

<Placemark>

<name>557</name>

<Style>

<LineStyle>

<color>ff32cd32</color>

<width>3</width>

</LineStyle>

</Style>

<LineString>

<tessellate>1</tessellate>

<extrude>1</extrude>

<coordinates>-69.721405, 47.447838, 0.000000 -69.721009, 47.446889, 0.000000 -69.718406, 47.445057, 0.000000 -69.717590, 47.443711, 0.000000 -69.713210, 47.440922, 0.000000 -69.712409, 47.439820, 0.000000 -69.709596, 47.438480, 0.000000 -69.708504, 47.437325, 0.000000 -69.707725, 47.436867, 0.000000 -69.707078, 47.436912, 0.000000 -69.703248, 47.434334, 0.000000 -69.700440, 47.431622, 0.000000 -69.695694, 47.428432, 0.000000 -69.692857, 47.426769, 0.000000 -69.690094, 47.425812, 0.000000 -69.684998, 47.422389, 0.000000 -69.685020, 47.421024, 0.000000 -69.683143, 47.421136, 0.000000 -69.675080, 47.415795, 0.000000 -69.673217, 47.416439, 0.000000 -69.671654, 47.416031, 0.000000 -69.668763, 47.415912, 0.000000 -69.667206, 47.415356, 0.000000 -69.665786, 47.413453, 0.000000 -69.659782, 47.413117, 0.000000 -69.658775, 47.412838, 0.000000 -69.657174, 47.410332, 0.000000 -69.654823, 47.410172, 0.000000 -69.653748, 47.411258, 0.000000 -69.653168, 47.410904, 0.000000 </coordinates>

----cut for brevity----

Link to comment

Support for reading KML track names was added after 1.3.4 was released. It's in the development tree now and will thus be in the next version, yet unscheduled.

 

Thanks...

 

By any chance would reading the kml line color be in a future release of GPSBabel?

Link to comment

It's not implemented now and it's not on my short-term list. The reality is that it's hard to do it well given our variety of formats. (It's fairly easy to do special cases.) Is a color associated with a track, a track point, or a line segment? Do you read just the ABGR values from the KML or the styles, too? If you're mapping from a source that does ABGR to one that does RGB or a specific color pallete, how do you get from a numberic value that is approximately "lemon chiffon" to "yellow"? How about line styles like width, transparency, and brush stroke? In fact, you can't represent colors in tracks at all in GPX unless you pick something like Garmin's or Topografix' vendor extensions in GPX 1.1, so which do you pick?

 

Treat all those as rhetorical unless you're submitting a patch to implement it, then be prepared to answer those questions and many more like it in context of 100+ formats. :-)

 

Heck, transferring icons between formats is hard enough.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...