CSV to KML only track

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

CSV to KML only track

darkat
Hi,
I would like to convert CSV to KML, but only track. I make this command:

gpsbabel -i csv -o kml -f Route.csv -x transform,trk=wpt,del -F Route.kml

but i want remove all Waypoints:

<Placemark>
    <name>WPT002</name>
    <styleUrl>#waypoint</styleUrl>
    <Point>
          <coordinates>2.719250,39.535190</coordinates>
    </Point>
</Placemark>

And i want only the LineString:

       <Placemark>
          <name>Path</name>
          <styleUrl>#lineStyle</styleUrl>
          <LineString>
            <tessellate>1</tessellate>
            <coordinates>
              2.719350,39.535220
              2.719250,39.535190
              2.719000,39.535040
              2.718750,39.534850....



Reply | Threaded
Open this post in threaded view
|

Re: CSV to KML only track

Robert Lipe-4
The KML writer "helpfully" defaults to adding a point at each trackpoint to provide information about that point.  (This predates ExtendedData and gx:Track, both of which are better ways to do this in modern Earth...)

gpsbabel -i csv -f darkat.csv -x transform,trk=wpt,del -o kml,points=0 -F -

gives you (pretty much) what you want.

        <Placemark>
          <name>Path</name>
          <styleUrl>#lineStyle</styleUrl>
          <LineString>
            <tessellate>1</tessellate>
            <coordinates>
39.535220,2.719350
39.535190,2.719250
39.535040,2.719000
39.534850,2.718750
</coordinates>
          </LineString>
        </Placemark>

Yes, there's some styling stuff above that.

On Mon, Dec 1, 2014 at 8:10 AM, darkat <[hidden email]> wrote:
Hi,
I would like to convert CSV to KML, but only track. I make this command:

/gpsbabel -i csv -o kml -f Route.csv -x transform,trk=wpt,del -F Route.kml/

but i want remove all Waypoints:

<Placemark>
    <name>WPT002</name>
    <styleUrl>#waypoint</styleUrl>
    <Point>
          <coordinates>2.719250,39.535190</coordinates>
    </Point>
</Placemark>

And i want only the LineString:

       <Placemark>
          <name>Path</name>
          <styleUrl>#lineStyle</styleUrl>
          <LineString>
            <tessellate>1</tessellate>
            <coordinates>
              2.719350,39.535220
              2.719250,39.535190
              2.719000,39.535040
              2.718750,39.534850....







--
View this message in context: http://gpsbabel.2324879.n4.nabble.com/CSV-to-KML-only-track-tp11367.html
Sent from the GPSBabel - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
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


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
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