[1.5.1] Small GPX route turned into big KML with waypoints :-/

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[1.5.1] Small GPX route turned into big KML with waypoints :-/

Gilles
Hello

I read the online help file before asking but didn't find what's wrong with the following command to convert a small GPX file from www.cycle.travel to a KML that I can use with a smartphone application:

c:\GPSBabel>gpsbabel.exe -N  -i gpx -f input.gpx -o kml -F output.kml

Here's the input file (1,216 bytes):
============================
<?xml version="1.0"?>
<gpx version="1.0" creator="cycle.travel"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.topografix.com/GPX/1/0"
xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
<trk>
<name>ACTIVE LOG</name>
<trkseg>
<trkpt lat="48.85324" lon="2.35027" />
<trkpt lat="48.85315" lon="2.35056" />
<trkpt lat="48.85363" lon="2.35090" />
<trkpt lat="48.85438" lon="2.34975" />
<trkpt lat="48.85507" lon="2.35025" />
<trkpt lat="48.85582" lon="2.35082" />
<trkpt lat="48.85609" lon="2.35063" />
<trkpt lat="48.85680" lon="2.35107" />
<trkpt lat="48.85747" lon="2.35148" />
<trkpt lat="48.85751" lon="2.35151" />
<trkpt lat="48.85807" lon="2.34969" />
<trkpt lat="48.85854" lon="2.34823" />
<trkpt lat="48.86039" lon="2.34233" />
<trkpt lat="48.86052" lon="2.34195" />
<trkpt lat="48.86321" lon="2.33377" />
<trkpt lat="48.86372" lon="2.33220" />
<trkpt lat="48.86378" lon="2.33199" />
<trkpt lat="48.86636" lon="2.32426" />
<trkpt lat="48.86639" lon="2.32356" />
<trkpt lat="48.86639" lon="2.32344" />
<trkpt lat="48.86639" lon="2.32340" />
<trkpt lat="48.86661" lon="2.32197" />
<trkpt lat="48.86588" lon="2.32090" />
</trkseg></trk></gpx> 
============================

And here's the output file (17,254 bytes):
============================
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2">
  <Document>
    <name>GPS device</name>
    <snippet>Created mer. juil. 15 18:12:19 2015</snippet>
    <LookAt>
      <longitude>2.336205</longitude>
      <latitude>48.859880</latitude>
      <range>3505.359392</range>
    </LookAt>
   
    <Style id="track_n"> <IconStyle> <scale>.5</scale> <Icon> <href>http://earth.google.com/images/kml-icons/track-directional/track-none.png</href> </Icon> </IconStyle> <LabelStyle> <scale>0</scale> </LabelStyle> </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>
   
    <Style id="waypoint_n"> <IconStyle> <Icon> <href>http://maps.google.com/mapfiles/kml/pal4/icon61.png</href> </Icon> </IconStyle> </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>Tracks</name>
      <Folder>
        <name>ACTIVE LOG</name>
        <snippet/>
        <description>
<![CDATA[<table>
<tr><td><b>Distance</b> 1.9 mi </td></tr>
</table>]]>

</description>
        <Folder>
          <name>Points</name>
          <Placemark>
            <name>ACTIVE LOG-0</name>
            <snippet/>
            <description>
<![CDATA[
<table>
<tr><td>Longitude: 2.350270 </td></tr>
<tr><td>Latitude: 48.853240 </td></tr>
<tr><td>Heading: 2.1 </td></tr>
</table>
]]>
</description>
            <LookAt>
              <longitude>2.350270</longitude>
              <latitude>48.853240</latitude>
              <tilt>66</tilt>
            </LookAt>
            <styleUrl>#track</styleUrl>
            <Point>
              <coordinates>2.350270,48.853240</coordinates>
            </Point>
          </Placemark>
          <Placemark>
            <name>ACTIVE LOG-1</name>
            <snippet/>
            <description>
<![CDATA[
<table>
<tr><td>Longitude: 2.350560 </td></tr>
<tr><td>Latitude: 48.853150 </td></tr>
<tr><td>Heading: 115.3 </td></tr>
</table>
]]>
</description>
            <LookAt>
              <longitude>2.350560</longitude>
              <latitude>48.853150</latitude>
              <tilt>66</tilt>
            </LookAt>
            <styleUrl>#track</styleUrl>
            <Point>
              <coordinates>2.350560,48.853150</coordinates>
            </Point>
          </Placemark>
          <Placemark>
            <name>ACTIVE LOG-2</name>
            <snippet/>
            <description>
<![CDATA[
<table>
<tr><td>Longitude: 2.350900 </td></tr>
<tr><td>Latitude: 48.853630 </td></tr>
<tr><td>Heading: 25.0 </td></tr>
</table>
]]>
</description>
            <LookAt>
              <longitude>2.350900</longitude>
              <latitude>48.853630</latitude>
              <tilt>66</tilt>
            </LookAt>
            <styleUrl>#track</styleUrl>
            <Point>
              <coordinates>2.350900,48.853630</coordinates>
            </Point>
          </Placemark>
          <Placemark>
            <name>ACTIVE LOG-3</name>
            <snippet/>
            <description>
<![CDATA[
<table>
<tr><td>Longitude: 2.349750 </td></tr>
<tr><td>Latitude: 48.854380 </td></tr>
<tr><td>Heading: 314.7 </td></tr>
</table>
]]>
</description>
            <LookAt>
              <longitude>2.349750</longitude>
              <latitude>48.854380</latitude>
              <tilt>66</tilt>
            </LookAt>
            <styleUrl>#track</styleUrl>
            <Point>
              <coordinates>2.349750,48.854380</coordinates>
            </Point>
          </Placemark>
          <Placemark>
            <name>ACTIVE LOG-4</name>
            <snippet/>
            <description>
<![CDATA[
<table>
<tr><td>Longitude: 2.350250 </td></tr>
<tr><td>Latitude: 48.855070 </td></tr>
<tr><td>Heading: 25.5 </td></tr>
</table>
]]>
</description>
            <LookAt>
              <longitude>2.350250</longitude>
              <latitude>48.855070</latitude>
              <tilt>66</tilt>
            </LookAt>
            <styleUrl>#track</styleUrl>
            <Point>
              <coordinates>2.350250,48.855070</coordinates>
            </Point>
          </Placemark>
          <Placemark>
            <name>ACTIVE LOG-5</name>
            <snippet/>
            <description>
<![CDATA[
<table>
<tr><td>Longitude: 2.350820 </td></tr>
<tr><td>Latitude: 48.855820 </td></tr>
<tr><td>Heading: 26.6 </td></tr>
</table>
]]>
</description>
            <LookAt>
              <longitude>2.350820</longitude>
              <latitude>48.855820</latitude>
              <tilt>66</tilt>
            </LookAt>
            <styleUrl>#track</styleUrl>
            <Point>
              <coordinates>2.350820,48.855820</coordinates>
            </Point>
          </Placemark>
          <Placemark>
            <name>ACTIVE LOG-6</name>
            <snippet/>
            <description>
<![CDATA[
<table>
<tr><td>Longitude: 2.350630 </td></tr>
<tr><td>Latitude: 48.856090 </td></tr>
<tr><td>Heading: 335.2 </td></tr>
</table>
]]>
</description>
            <LookAt>
              <longitude>2.350630</longitude>
              <latitude>48.856090</latitude>
              <tilt>66</tilt>
            </LookAt>
            <styleUrl>#track</styleUrl>
            <Point>
              <coordinates>2.350630,48.856090</coordinates>
            </Point>
          </Placemark>
          <Placemark>
            <name>ACTIVE LOG-7</name>
            <snippet/>
            <description>
<![CDATA[
<table>
<tr><td>Longitude: 2.351070 </td></tr>
<tr><td>Latitude: 48.856800 </td></tr>
<tr><td>Heading: 22.2 </td></tr>
</table>
]]>
</description>
            <LookAt>
              <longitude>2.351070</longitude>
              <latitude>48.856800</latitude>
              <tilt>66</tilt>
            </LookAt>
            <styleUrl>#track</styleUrl>
            <Point>
              <coordinates>2.351070,48.856800</coordinates>
            </Point>
          </Placemark>
          <Placemark>
            <name>ACTIVE LOG-8</name>
            <snippet/>
            <description>
<![CDATA[
<table>
<tr><td>Longitude: 2.351480 </td></tr>
<tr><td>Latitude: 48.857470 </td></tr>
<tr><td>Heading: 21.9 </td></tr>
</table>
]]>
</description>
            <LookAt>
              <longitude>2.351480</longitude>
              <latitude>48.857470</latitude>
              <tilt>66</tilt>
            </LookAt>
            <styleUrl>#track</styleUrl>
            <Point>
              <coordinates>2.351480,48.857470</coordinates>
            </Point>
          </Placemark>
          <Placemark>
            <name>ACTIVE LOG-9</name>
            <snippet/>
            <description>
<![CDATA[
<table>
<tr><td>Longitude: 2.351510 </td></tr>
<tr><td>Latitude: 48.857510 </td></tr>
<tr><td>Heading: 26.3 </td></tr>
</table>
]]>
</description>
            <LookAt>
              <longitude>2.351510</longitude>
              <latitude>48.857510</latitude>
              <tilt>66</tilt>
            </LookAt>
            <styleUrl>#track</styleUrl>
            <Point>
              <coordinates>2.351510,48.857510</coordinates>
            </Point>
          </Placemark>
          <Placemark>
            <name>ACTIVE LOG-10</name>
            <snippet/>
            <description>
<![CDATA[
<table>
<tr><td>Longitude: 2.349690 </td></tr>
<tr><td>Latitude: 48.858070 </td></tr>
<tr><td>Heading: 295.1 </td></tr>
</table>
]]>
</description>
            <LookAt>
              <longitude>2.349690</longitude>
              <latitude>48.858070</latitude>
              <tilt>66</tilt>
            </LookAt>
            <styleUrl>#track</styleUrl>
            <Point>
              <coordinates>2.349690,48.858070</coordinates>
            </Point>
          </Placemark>
          <Placemark>
            <name>ACTIVE LOG-11</name>
            <snippet/>
            <description>
<![CDATA[
<table>
<tr><td>Longitude: 2.348230 </td></tr>
<tr><td>Latitude: 48.858540 </td></tr>
<tr><td>Heading: 296.1 </td></tr>
</table>
]]>
</description>
            <LookAt>
              <longitude>2.348230</longitude>
              <latitude>48.858540</latitude>
              <tilt>66</tilt>
            </LookAt>
            <styleUrl>#track</styleUrl>
            <Point>
              <coordinates>2.348230,48.858540</coordinates>
            </Point>
          </Placemark>
          <Placemark>
            <name>ACTIVE LOG-12</name>
            <snippet/>
            <description>
<![CDATA[
<table>
<tr><td>Longitude: 2.342330 </td></tr>
<tr><td>Latitude: 48.860390 </td></tr>
<tr><td>Heading: 295.5 </td></tr>
</table>
]]>
</description>
            <LookAt>
              <longitude>2.342330</longitude>
              <latitude>48.860390</latitude>
              <tilt>66</tilt>
            </LookAt>
            <styleUrl>#track</styleUrl>
            <Point>
              <coordinates>2.342330,48.860390</coordinates>
            </Point>
          </Placemark>
          <Placemark>
            <name>ACTIVE LOG-13</name>
            <snippet/>
            <description>
<![CDATA[
<table>
<tr><td>Longitude: 2.341950 </td></tr>
<tr><td>Latitude: 48.860520 </td></tr>
<tr><td>Heading: 297.5 </td></tr>
</table>
]]>
</description>
            <LookAt>
              <longitude>2.341950</longitude>
              <latitude>48.860520</latitude>
              <tilt>66</tilt>
            </LookAt>
            <styleUrl>#track</styleUrl>
            <Point>
              <coordinates>2.341950,48.860520</coordinates>
            </Point>
          </Placemark>
          <Placemark>
            <name>ACTIVE LOG-14</name>
            <snippet/>
            <description>
<![CDATA[
<table>
<tr><td>Longitude: 2.333770 </td></tr>
<tr><td>Latitude: 48.863210 </td></tr>
<tr><td>Heading: 296.6 </td></tr>
</table>
]]>
</description>
            <LookAt>
              <longitude>2.333770</longitude>
              <latitude>48.863210</latitude>
              <tilt>66</tilt>
            </LookAt>
            <styleUrl>#track</styleUrl>
            <Point>
              <coordinates>2.333770,48.863210</coordinates>
            </Point>
          </Placemark>
          <Placemark>
            <name>ACTIVE LOG-15</name>
            <snippet/>
            <description>
<![CDATA[
<table>
<tr><td>Longitude: 2.332200 </td></tr>
<tr><td>Latitude: 48.863720 </td></tr>
<tr><td>Heading: 296.3 </td></tr>
</table>
]]>
</description>
            <LookAt>
              <longitude>2.332200</longitude>
              <latitude>48.863720</latitude>
              <tilt>66</tilt>
            </LookAt>
            <styleUrl>#track</styleUrl>
            <Point>
              <coordinates>2.332200,48.863720</coordinates>
            </Point>
          </Placemark>
          <Placemark>
            <name>ACTIVE LOG-16</name>
            <snippet/>
            <description>
<![CDATA[
<table>
<tr><td>Longitude: 2.331990 </td></tr>
<tr><td>Latitude: 48.863780 </td></tr>
<tr><td>Heading: 293.5 </td></tr>
</table>
]]>
</description>
            <LookAt>
              <longitude>2.331990</longitude>
              <latitude>48.863780</latitude>
              <tilt>66</tilt>
            </LookAt>
            <styleUrl>#track</styleUrl>
            <Point>
              <coordinates>2.331990,48.863780</coordinates>
            </Point>
          </Placemark>
          <Placemark>
            <name>ACTIVE LOG-17</name>
            <snippet/>
            <description>
<![CDATA[
<table>
<tr><td>Longitude: 2.324260 </td></tr>
<tr><td>Latitude: 48.866360 </td></tr>
<tr><td>Heading: 296.9 </td></tr>
</table>
]]>
</description>
            <LookAt>
              <longitude>2.324260</longitude>
              <latitude>48.866360</latitude>
              <tilt>66</tilt>
            </LookAt>
            <styleUrl>#track</styleUrl>
            <Point>
              <coordinates>2.324260,48.866360</coordinates>
            </Point>
          </Placemark>
          <Placemark>
            <name>ACTIVE LOG-18</name>
            <snippet/>
            <description>
<![CDATA[
<table>
<tr><td>Longitude: 2.323560 </td></tr>
<tr><td>Latitude: 48.866390 </td></tr>
<tr><td>Heading: 273.7 </td></tr>
</table>
]]>
</description>
            <LookAt>
              <longitude>2.323560</longitude>
              <latitude>48.866390</latitude>
              <tilt>66</tilt>
            </LookAt>
            <styleUrl>#track</styleUrl>
            <Point>
              <coordinates>2.323560,48.866390</coordinates>
            </Point>
          </Placemark>
          <Placemark>
            <name>ACTIVE LOG-19</name>
            <snippet/>
            <description>
<![CDATA[
<table>
<tr><td>Longitude: 2.323440 </td></tr>
<tr><td>Latitude: 48.866390 </td></tr>
<tr><td>Heading: 270.0 </td></tr>
</table>
]]>
</description>
            <LookAt>
              <longitude>2.323440</longitude>
              <latitude>48.866390</latitude>
              <tilt>66</tilt>
            </LookAt>
            <styleUrl>#track</styleUrl>
            <Point>
              <coordinates>2.323440,48.866390</coordinates>
            </Point>
          </Placemark>
          <Placemark>
            <name>ACTIVE LOG-20</name>
            <snippet/>
            <description>
<![CDATA[
<table>
<tr><td>Longitude: 2.323400 </td></tr>
<tr><td>Latitude: 48.866390 </td></tr>
<tr><td>Heading: 270.0 </td></tr>
</table>
]]>
</description>
            <LookAt>
              <longitude>2.323400</longitude>
              <latitude>48.866390</latitude>
              <tilt>66</tilt>
            </LookAt>
            <styleUrl>#track</styleUrl>
            <Point>
              <coordinates>2.323400,48.866390</coordinates>
            </Point>
          </Placemark>
          <Placemark>
            <name>ACTIVE LOG-21</name>
            <snippet/>
            <description>
<![CDATA[
<table>
<tr><td>Longitude: 2.321970 </td></tr>
<tr><td>Latitude: 48.866610 </td></tr>
<tr><td>Heading: 283.2 </td></tr>
</table>
]]>
</description>
            <LookAt>
              <longitude>2.321970</longitude>
              <latitude>48.866610</latitude>
              <tilt>66</tilt>
            </LookAt>
            <styleUrl>#track</styleUrl>
            <Point>
              <coordinates>2.321970,48.866610</coordinates>
            </Point>
          </Placemark>
          <Placemark>
            <name>ACTIVE LOG-22</name>
            <snippet/>
            <description>
<![CDATA[
<table>
<tr><td>Longitude: 2.320900 </td></tr>
<tr><td>Latitude: 48.865880 </td></tr>
<tr><td>Heading: 224.0 </td></tr>
</table>
]]>
</description>
            <LookAt>
              <longitude>2.320900</longitude>
              <latitude>48.865880</latitude>
              <tilt>66</tilt>
            </LookAt>
            <styleUrl>#track</styleUrl>
            <Point>
              <coordinates>2.320900,48.865880</coordinates>
            </Point>
          </Placemark>
        </Folder>
        <Placemark>
          <name>Path</name>
          <styleUrl>#lineStyle</styleUrl>
          <LineString>
            <tessellate>1</tessellate>
            <coordinates>
2.350270,48.853240
2.350560,48.853150
2.350900,48.853630
2.349750,48.854380
2.350250,48.855070
2.350820,48.855820
2.350630,48.856090
2.351070,48.856800
2.351480,48.857470
2.351510,48.857510
2.349690,48.858070
2.348230,48.858540
2.342330,48.860390
2.341950,48.860520
2.333770,48.863210
2.332200,48.863720
2.331990,48.863780
2.324260,48.866360
2.323560,48.866390
2.323440,48.866390
2.323400,48.866390
2.321970,48.866610
2.320900,48.865880
</coordinates>
          </LineString>
        </Placemark>
      </Folder>
    </Folder>
  </Document>
</kml>
============================

The output is much bigger and, when imported in the smartphone, the route is displayed a line + waypoints instead of a simple line.

Why is it? What should I do?

Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: [1.5.1] Small GPX route turned into big KML with waypoints :-/

tsteven4-2
perhaps you want the points=0 option:

gpsbabel -i gpx -f junk.gpx -o kml,points=0 -F x.kml

On 7/15/2015 11:19 AM, Gilles wrote:

> <?xml version="1.0"?>
> <gpx version="1.0" creator="cycle.travel"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns="http://www.topografix.com/GPX/1/0"
> xsi:schemaLocation="http://www.topografix.com/GPX/1/0
> http://www.topografix.com/GPX/1/0/gpx.xsd">
> <trk>
> <name>ACTIVE LOG</name>
> <trkseg>
> <trkpt lat="48.85324" lon="2.35027" />
> <trkpt lat="48.85315" lon="2.35056" />
> <trkpt lat="48.85363" lon="2.35090" />
> <trkpt lat="48.85438" lon="2.34975" />
> <trkpt lat="48.85507" lon="2.35025" />
> <trkpt lat="48.85582" lon="2.35082" />
> <trkpt lat="48.85609" lon="2.35063" />
> <trkpt lat="48.85680" lon="2.35107" />
> <trkpt lat="48.85747" lon="2.35148" />
> <trkpt lat="48.85751" lon="2.35151" />
> <trkpt lat="48.85807" lon="2.34969" />
> <trkpt lat="48.85854" lon="2.34823" />
> <trkpt lat="48.86039" lon="2.34233" />
> <trkpt lat="48.86052" lon="2.34195" />
> <trkpt lat="48.86321" lon="2.33377" />
> <trkpt lat="48.86372" lon="2.33220" />
> <trkpt lat="48.86378" lon="2.33199" />
> <trkpt lat="48.86636" lon="2.32426" />
> <trkpt lat="48.86639" lon="2.32356" />
> <trkpt lat="48.86639" lon="2.32344" />
> <trkpt lat="48.86639" lon="2.32340" />
> <trkpt lat="48.86661" lon="2.32197" />
> <trkpt lat="48.86588" lon="2.32090" />
> </trkseg></trk></gpx>


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
Reply | Threaded
Open this post in threaded view
|

Re: [1.5.1] Small GPX route turned into big KML with waypoints :-/

Gilles
Problem solved. Thank you.