Bílý vrch
icon TrekBuddy
www.trekbuddy.net
Outdoor companion.
  • internal / bluetooth / simulator GPS
  • offline raster maps
  • smart GPX / raw NMEA logs
  • waypoints and simple navigation
  • custom views
  • MIDP and Symbian phones
  • Blackberry
  • Android
Visit wiki to see all features, guides and howtos. Project tracker.
Trekbuddy is on Github now

Partners:    (Polish/Polski)(Polski) Compass mapy      (Polish/Polski)(Polski) Galileos mapy      (Polish/Polski)(Polski) CartoMedia      (Czech/Èesky)(Èesky) Eaglesoft trasy      (Polish/Polski)(Polski) ExpressMap     

 FAQFAQ   SearchSearch   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
using gpsbabel to convert gpx to kml?

 
Post new topic   Reply to topic    TrekBuddy Forum Index -> Tools
View previous topic :: View next topic  
Author Message
astrograph



Joined: 01 Aug 2007
Posts: 7

PostPosted: Fri Aug 03, 2007 9:00 am    Post subject: using gpsbabel to convert gpx to kml? Reply with quote

Hi, I was not successful in converting this .gpx file to the Google Earth format:
Code:

<?xml version='1.0' encoding='UTF-8' ?>
<gpx version="1.1" creator="TrekBuddy 0.9.57" xmlns="http://www.topografix.com/GPX/1/1" xmlns:rmc="urn:net:trekbuddy:1.0:nmea:rmc">
  <trk>
    <trkseg>
      <trkpt lat="47.469031000" lon="9.744794999">
        <ele>446.0</ele>
        <time>2007-08-03T07:42:47Z</time>
        <fix>3d</fix>
        <extensions>
          <rmc:course>29.9</rmc:course>
          <rmc:speed>3.2</rmc:speed>
        </extensions>
      </trkpt>
      <trkpt lat="47.470351999" lon="9.739409000">
        <ele>450.0</ele>
        <time>2007-08-03T07:43:55Z</time>
        <fix>3d</fix>
        <extensions>
          <rmc:course>292.0</rmc:course>
          <rmc:speed>4.8</rmc:speed>
        </extensions>
      </trkpt>
      <trkpt lat="47.471514999" lon="9.732970000">
        <ele>447.0</ele>
        <time>2007-08-03T07:44:56Z</time>
        <fix>3d</fix>
        <extensions>
          <rmc:course>281.1</rmc:course>
          <rmc:speed>8.0</rmc:speed>
        </extensions>
      </trkpt>
    </trkseg>
  </trk>
</gpx>

I used Gpsbabelgui and tried various options, but didn´t get any trackpoints in the kml file. What am I doing wrong?

    gpsbabel.exe -p "" -w -r -t -i gpx -f "C:\some\path\2007-08-03-07-39-02.gpx" -o kml -F "C:\some\path\2007-08-03-07-40-23.kml"
    gpsbabel.exe -p "" -w -r -t -i gpx -f "C:\some\path\2007-08-03-07-39-02.gpx" -x transform,rte=trk,del=n -x duplicate,shortname -x position,distance=0m -x radius,distance=0K,lat=0,lon=0 -x sort -x track,title="ACTIVE LOG # %Y%m%d",fix=3d,course,speed -o kml -F "C:\some\path\2007-08-03-07-40-23.kml"
    gpsbabel.exe -p "" -t -i gpx -f "C:\some\path\2007-08-03-07-39-02.gpx" -x track,course,speed -o kml -F "C:\some\path\2007-08-03-07-40-23.kml"
    gpsbabel.exe -p "" -t -i gpx,logpoint=1 -f "C:\some\path\2007-08-03-07-39-02.gpx" -x track,course,speed -o kml,deficon=,extrude=1,floating=1,units=s -F "C:\some\path\2007-08-03-07-40-23.kml"
    gpsbabel.exe -p "" -t -i gpx,logpoint=1 -f "C:\some\path\2007-08-03-07-39-02.gpx" -x track,course,speed -o kml,deficon=,extrude=1,floating=1,units=s -F "C:\some\path\2007-08-03-07-40-23.kml"
    gpsbabel.exe -p "" -w -i gpx,logpoint=1 -f "C:\some\path\2007-08-03-07-39-02.gpx" -x track,course,speed -o kml,deficon=,extrude=1,floating=1,units=s -F "C:\some\path\2007-08-03-07-40-23.kml"
    gpsbabel.exe -p "" -w -r -i gpx,logpoint=1 -f "C:\some\path\2007-08-03-07-39-02.gpx" -x track,course,speed -o kml,deficon=,extrude=1,floating=1,units=s -F "C:\some\path\2007-08-03-07-40-23.kml"
    gpsbabel.exe -p "" -t -i gpx,logpoint=1 -f "C:\some\path\2007-08-03-07-39-02.gpx" -x track,course,speed -o kml,deficon=,extrude=1,floating=1,units=s -F "C:\some\path\2007-08-03-07-40-23.kml"
    gpsbabel.exe -p "" -t -i gpx,logpoint=1 -f "C:\some\path\2007-08-03-07-39-02.gpx" -x transform,rte=wpt,del=n -x track,course,speed -o kml,deficon=,units=s -F "C:\some\path\2007-08-03-07-40-23.kml"
    gpsbabel.exe -p "" -w -r -t -i gpx,logpoint=1 -f "C:\some\path\2007-08-03-07-39-02.gpx" -x transform,rte=wpt,del=n -x track,course,speed -o kml,deficon=,units=s -F "C:\some\path\2007-08-03-07-40-23.kml"


thx

Philipp
Back to top
View user's profile Send private message
kmlgpx



Joined: 13 Jun 2012
Posts: 2

PostPosted: Tue Aug 28, 2012 8:40 am    Post subject: alternative way to do the conversion from gpx to kml Reply with quote

If you want to convert gpx to kml you can also use this free online converter http://gpx2kml.com/
Back to top
View user's profile Send private message
Šumil



Joined: 01 Oct 2008
Posts: 226
Location: Trencin, SK

PostPosted: Tue Aug 28, 2012 2:17 pm    Post subject: Reply with quote

Your code I copied and saved in GPX format. I used GPSBabel and convert to kml. No problem.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.1"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Document>
    <name>GPS device</name>
    <Snippet>Created 08/28/12 16:15:20</Snippet>
<!-- Normal track style -->
    <Style id="track_n">
      <IconStyle>
        <Icon>
          <href>http://earth.google.com/images/kml-icons/track-directional/track-none.png</href>
        </Icon>
      </IconStyle>
    </Style>
<!-- Highlighted track style -->
    <Style id="track_h">
      <IconStyle>
        <scale>1.2</scale>
        <Icon>
          <href>http://earth.google.com/images/kml-icons/track-directional/track-none.png</href>
        </Icon>
      </IconStyle>
    </Style>
    <StyleMap id="track">
      <Pair>
        <key>normal</key>
        <styleUrl>#track_n</styleUrl>
      </Pair>
      <Pair>
        <key>highlight</key>
        <styleUrl>#track_h</styleUrl>
      </Pair>
    </StyleMap>
<!-- Normal waypoint style -->
    <Style id="waypoint_n">
      <IconStyle>
        <Icon>
          <href>http://maps.google.com/mapfiles/kml/pal4/icon61.png</href>
        </Icon>
      </IconStyle>
    </Style>
<!-- Highlighted waypoint style -->
    <Style id="waypoint_h">
      <IconStyle>
        <scale>1.2</scale>
        <Icon>
          <href>http://maps.google.com/mapfiles/kml/pal4/icon61.png</href>
        </Icon>
      </IconStyle>
    </Style>
    <StyleMap id="waypoint">
      <Pair>
        <key>normal</key>
        <styleUrl>#waypoint_n</styleUrl>
      </Pair>
      <Pair>
        <key>highlight</key>
        <styleUrl>#waypoint_h</styleUrl>
      </Pair>
    </StyleMap>
    <Style id="lineStyle">
      <LineStyle>
        <color>99ffac59</color>
        <width>6</width>
      </LineStyle>
    </Style>
    <Folder>
      <name>Waypoints</name>
    </Folder>
    <Folder>
      <name>Tracks</name>
      <Folder>
        <Snippet/>
        <description>
<![CDATA[<table>
            <tr><td><b>Distance</b> 3059.9 ft </td></tr>
            <tr><td><b>Min Alt</b> 1463.255 ft </td></tr>
            <tr><td><b>Max Alt</b> 1476.378 ft </td></tr>
            <tr><td><b>Max Speed</b> 18.4 mph </td></tr>
            <tr><td><b>Avg Speed</b> 16.2 mph </td></tr>
            <tr><td><b>Start Time</b> 2007-08-03T07:42:47Z  </td></tr>
            <tr><td><b>End Time</b> 2007-08-03T07:44:56Z  </td></tr>
          </table>]]>
        </description>
        <TimeSpan>
          <begin>2007-08-03T07:42:47Z</begin>
          <end>2007-08-03T07:44:56Z</end>
        </TimeSpan>
        <Folder>
          <name>Points</name>
          <Placemark>
            <name>-0</name>
            <Snippet/>
            <description><![CDATA[
              <table>
                <tr><td>Longitude: 9.744795 </td></tr>
                <tr><td>Latitude: 47.469031 </td></tr>
                <tr><td>Altitude: 1463.255 ft </td></tr>
                <tr><td>Speed: 0.0 mph </td></tr>
                <tr><td>Heading: 8.8 </td></tr>
                <tr><td>Time: 2007-08-03T07:42:47Z </td></tr>
              </table>
            ]]></description>
            <LookAt>
              <longitude>9.744795</longitude>
              <latitude>47.469031</latitude>
              <tilt>66</tilt>
            </LookAt>
            <TimeStamp><when>2007-08-03T07:42:47Z</when></TimeStamp>
            <styleUrl>#track</styleUrl>
            <Point>
              <coordinates>9.744795,47.469031,446.000000</coordinates>
            </Point>
          </Placemark>
          <Placemark>
            <name>-1</name>
            <Snippet/>
            <description><![CDATA[
              <table>
                <tr><td>Longitude: 9.739409 </td></tr>
                <tr><td>Latitude: 47.470352 </td></tr>
                <tr><td>Altitude: 1476.378 ft </td></tr>
                <tr><td>Speed: 14.2 mph </td></tr>
                <tr><td>Heading: 289.9 </td></tr>
                <tr><td>Time: 2007-08-03T07:43:55Z </td></tr>
              </table>
            ]]></description>
            <LookAt>
              <longitude>9.739409</longitude>
              <latitude>47.470352</latitude>
              <tilt>66</tilt>
            </LookAt>
            <TimeStamp><when>2007-08-03T07:43:55Z</when></TimeStamp>
            <styleUrl>#track</styleUrl>
            <Point>
              <coordinates>9.739409,47.470352,450.000000</coordinates>
            </Point>
          </Placemark>
          <Placemark>
            <name>-2</name>
            <Snippet/>
            <description><![CDATA[
              <table>
                <tr><td>Longitude: 9.732970 </td></tr>
                <tr><td>Latitude: 47.471515 </td></tr>
                <tr><td>Altitude: 1466.535 ft </td></tr>
                <tr><td>Speed: 18.4 mph </td></tr>
                <tr><td>Heading: 285.0 </td></tr>
                <tr><td>Time: 2007-08-03T07:44:56Z </td></tr>
              </table>
            ]]></description>
            <LookAt>
              <longitude>9.732970</longitude>
              <latitude>47.471515</latitude>
              <tilt>66</tilt>
            </LookAt>
            <TimeStamp><when>2007-08-03T07:44:56Z</when></TimeStamp>
            <styleUrl>#track</styleUrl>
            <Point>
              <coordinates>9.732970,47.471515,447.000000</coordinates>
            </Point>
          </Placemark>
        </Folder>
        <Placemark>
          <name>Path</name>
          <styleUrl>#lineStyle</styleUrl>
          <LineString>
            <tessellate>1</tessellate>
            <coordinates>
              9.744795,47.469031,446.000000
              9.739409,47.470352,450.000000
              9.732970,47.471515,447.000000
            </coordinates>
          </LineString>
        </Placemark>
      </Folder>
    </Folder>
  </Document>
</kml>

_________________
Nokia 6300, LD-3W, 1.2.5
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    TrekBuddy Forum Index -> Tools All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group