Problem with KML input

View: New views
3 Messages — Rating Filter:   Alert me  

Problem with KML input

by Mike W.-5 :: Rate this Message:

| View Threaded | Show Only this Message

Hi there!

I'm having some trouble converting my KML track to GPX format using Babel beta 1.4.3.  I also tried current, 1.4.2 as of this writing, to no avail. Both for OSX, and I'm using Lion. My problem seems to be that my input KML isn't recognized.  Here's what happens:

I select "Google Earth (Keyhole) Markup Language" as the input format, specify my KML file as the input, and choose "GPX XML" as the output.

I hit Apply, and Babel gives me this as output: 

gpsbabel -w -r -t -i kml,lines=1,points=1,floating=0,extrude=0,track=1,trackdata=1,trackdirection=0,labels=1 -f /Users/gurami/Downloads/history.kml -o gpx,suppresswhite=0,logpoint=0,humminbirdextensions=0,garminextensions=0 -F /Users/gurami/Downloads/history6.gpx
Translation successful

However, the output GPX file is empty, except for the header: 

<?xml version="1.0" encoding="UTF-8"?>
<gpx
  version="1.0"
  creator="GPSBabel - http://www.gpsbabel.org"
  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">
<time>2011-12-05T22:18:55Z</time>
</gpx>
 
Below is a snippet of my KML file, which I generated from google maps. I've also tried to strip out the extra gunk tags between <Document> and the opening <Placemark> tag, but I get the same result.  Is my KML file not supported? What can I do to as a workaround? Thanks for the help!

<?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" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
<name>Location history</name>
<open>1</open>
<description/>
<StyleMap id="multiTrack">
<Pair>
<key>normal</key>
<styleUrl>#multiTrack_n</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#multiTrack_h</styleUrl>
</Pair>
</StyleMap>
<Style id="multiTrack_n">
<IconStyle>
<Icon>
<href>http://earth.google.com/images/kml-icons/track-directional/track-0.png</href>
</Icon>
</IconStyle>
<LineStyle>
<color>99ffac59</color>
<width>6</width>
</LineStyle>
</Style>
<Style id="multiTrack_h">
<IconStyle>
<scale>1.2</scale>
<Icon>
<href>http://earth.google.com/images/kml-icons/track-directional/track-0.png</href>
</Icon>
</IconStyle>
<LineStyle>
<color>99ffac59</color>
<width>8</width>
</LineStyle>
</Style>
<Placemark>
<name>Latitude User</name>
<description>Location history for Latitude User from 12/31/1969 to 11/29/2011</description>
<styleUrl>#multiTrack</styleUrl>
<gx:Track>
<altitudeMode>clampToGround</altitudeMode>
<when>2011-09-28T23:12:44.594-07:00</when>
<gx:coord>-76.7120778 37.2686977 0</gx:coord>
<when>2011-09-29T07:34:48.915-07:00</when>
<gx:coord>-76.7120778 37.2686977 0</gx:coord>
<when>2011-09-29T09:43:59.015-07:00</when>
<gx:coord>-76.715055 37.271584 0</gx:coord>
<when>2011-09-29T09:46:59.455-07:00</when>
<gx:coord>-76.713327 37.274159 0</gx:coord>
...
</gx:Track>
</Placemark>
</Document>
</kml>


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
Gpsbabel-misc@...
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc

Re: Problem with KML input

by tsteven4 :: Rate this Message:

| View Threaded | Show Only this Message

Mike,

Your kml violates the schema, but fixing it doesn't seem to solve your complaint.  The schema dictates that a <gx:Track> element will accept a series of <when> elements followed by a series of <gx:coord> elements.  This is fixed below. 

In any event it looks like the kml writer has some support for multiTrack, but I am not sure there is anything there for the kml reader.


<?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" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
<name>Location history</name>
<open>1</open>
<description/>
<StyleMap id="multiTrack">
<Pair>
<key>normal</key>
<styleUrl>#multiTrack_n</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#multiTrack_h</styleUrl>
</Pair>
</StyleMap>
<Style id="multiTrack_n">
<IconStyle>
<Icon>
<href>http://earth.google.com/images/kml-icons/track-directional/track-0.png</href>
</Icon>
</IconStyle>
<LineStyle>
<color>99ffac59</color>
<width>6</width>
</LineStyle>
</Style>
<Style id="multiTrack_h">
<IconStyle>
<scale>1.2</scale>
<Icon>
<href>http://earth.google.com/images/kml-icons/track-directional/track-0.png</href>
</Icon>
</IconStyle>
<LineStyle>
<color>99ffac59</color>
<width>8</width>
</LineStyle>
</Style>
<Placemark>
<name>Latitude User</name>
<description>Location history for Latitude User from 12/31/1969 to 11/29/2011</description>
<styleUrl>#multiTrack</styleUrl>
<gx:Track>
<altitudeMode>clampToGround</altitudeMode>
<when>2011-09-28T23:12:44.594-07:00</when>
<when>2011-09-29T07:34:48.915-07:00</when>
<when>2011-09-29T09:43:59.015-07:00</when>
<when>2011-09-29T09:46:59.455-07:00</when>
<gx:coord>-76.7120778 37.2686977 0</gx:coord>
<gx:coord>-76.7120778 37.2686977 0</gx:coord>
<gx:coord>-76.715055 37.271584 0</gx:coord>
<gx:coord>-76.713327 37.274159 0</gx:coord>
</gx:Track>
</Placemark>
</Document>
</kml>


On 12/5/2011 3:38 PM, Mike Weissberger wrote:
Hi there!

I'm having some trouble converting my KML track to GPX format using Babel beta 1.4.3.  I also tried current, 1.4.2 as of this writing, to no avail. Both for OSX, and I'm using Lion. My problem seems to be that my input KML isn't recognized.  Here's what happens:

I select "Google Earth (Keyhole) Markup Language" as the input format, specify my KML file as the input, and choose "GPX XML" as the output.

I hit Apply, and Babel gives me this as output: 

gpsbabel -w -r -t -i kml,lines=1,points=1,floating=0,extrude=0,track=1,trackdata=1,trackdirection=0,labels=1 -f /Users/gurami/Downloads/history.kml -o gpx,suppresswhite=0,logpoint=0,humminbirdextensions=0,garminextensions=0 -F /Users/gurami/Downloads/history6.gpx
Translation successful

However, the output GPX file is empty, except for the header: 

<?xml version="1.0" encoding="UTF-8"?>
<gpx
  version="1.0"
  creator="GPSBabel - http://www.gpsbabel.org"
  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">
<time>2011-12-05T22:18:55Z</time>
</gpx>
 
Below is a snippet of my KML file, which I generated from google maps. I've also tried to strip out the extra gunk tags between <Document> and the opening <Placemark> tag, but I get the same result.  Is my KML file not supported? What can I do to as a workaround? Thanks for the help!

<?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" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
<name>Location history</name>
<open>1</open>
<description/>
<StyleMap id="multiTrack">
<Pair>
<key>normal</key>
<styleUrl>#multiTrack_n</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#multiTrack_h</styleUrl>
</Pair>
</StyleMap>
<Style id="multiTrack_n">
<IconStyle>
<Icon>
<href>http://earth.google.com/images/kml-icons/track-directional/track-0.png</href>
</Icon>
</IconStyle>
<LineStyle>
<color>99ffac59</color>
<width>6</width>
</LineStyle>
</Style>
<Style id="multiTrack_h">
<IconStyle>
<scale>1.2</scale>
<Icon>
<href>http://earth.google.com/images/kml-icons/track-directional/track-0.png</href>
</Icon>
</IconStyle>
<LineStyle>
<color>99ffac59</color>
<width>8</width>
</LineStyle>
</Style>
<Placemark>
<name>Latitude User</name>
<description>Location history for Latitude User from 12/31/1969 to 11/29/2011</description>
<styleUrl>#multiTrack</styleUrl>
<gx:Track>
<altitudeMode>clampToGround</altitudeMode>
<when>2011-09-28T23:12:44.594-07:00</when>
<gx:coord>-76.7120778 37.2686977 0</gx:coord>
<when>2011-09-29T07:34:48.915-07:00</when>
<gx:coord>-76.7120778 37.2686977 0</gx:coord>
<when>2011-09-29T09:43:59.015-07:00</when>
<gx:coord>-76.715055 37.271584 0</gx:coord>
<when>2011-09-29T09:46:59.455-07:00</when>
<gx:coord>-76.713327 37.274159 0</gx:coord>
...
</gx:Track>
</Placemark>
</Document>
</kml>



------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d


_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
Gpsbabel-misc@...
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
Gpsbabel-misc@...
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc

Re: Problem with KML input

by Robert Lipe-4 :: Rate this Message:

| View Threaded | Show Only this Message

We don't read gx:track; that's an extension to KML.   

On Mon, Dec 5, 2011 at 3:30 PM, tsteven4 <tsteven4@...> wrote:
Mike,

Your kml violates the schema, but fixing it doesn't seem to solve your complaint.  The schema dictates that a <gx:Track> element will accept a series of <when> elements followed by a series of <gx:coord> elements.  This is fixed below. 

In any event it looks like the kml writer has some support for multiTrack, but I am not sure there is anything there for the kml reader.


<?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" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
<name>Location history</name>
<open>1</open>
<description/>
<StyleMap id="multiTrack">
<Pair>
<key>normal</key>
<styleUrl>#multiTrack_n</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#multiTrack_h</styleUrl>
</Pair>
</StyleMap>
<Style id="multiTrack_n">
<IconStyle>
<Icon>
<href>http://earth.google.com/images/kml-icons/track-directional/track-0.png</href>
</Icon>
</IconStyle>
<LineStyle>
<color>99ffac59</color>
<width>6</width>
</LineStyle>
</Style>
<Style id="multiTrack_h">
<IconStyle>
<scale>1.2</scale>
<Icon>
<href>http://earth.google.com/images/kml-icons/track-directional/track-0.png</href>
</Icon>
</IconStyle>
<LineStyle>
<color>99ffac59</color>
<width>8</width>
</LineStyle>
</Style>
<Placemark>
<name>Latitude User</name>
<description>Location history for Latitude User from 12/31/1969 to 11/29/2011</description>
<styleUrl>#multiTrack</styleUrl>
<gx:Track>
<altitudeMode>clampToGround</altitudeMode>
<when>2011-09-28T23:12:44.594-07:00</when>
<when>2011-09-29T07:34:48.915-07:00</when>
<when>2011-09-29T09:43:59.015-07:00</when>
<when>2011-09-29T09:46:59.455-07:00</when>
<gx:coord>-76.7120778 37.2686977 0</gx:coord>
<gx:coord>-76.7120778 37.2686977 0</gx:coord>
<gx:coord>-76.715055 37.271584 0</gx:coord>
<gx:coord>-76.713327 37.274159 0</gx:coord>
</gx:Track>
</Placemark>
</Document>
</kml>


On 12/5/2011 3:38 PM, Mike Weissberger wrote:
Hi there!

I'm having some trouble converting my KML track to GPX format using Babel beta 1.4.3.  I also tried current, 1.4.2 as of this writing, to no avail. Both for OSX, and I'm using Lion. My problem seems to be that my input KML isn't recognized.  Here's what happens:

I select "Google Earth (Keyhole) Markup Language" as the input format, specify my KML file as the input, and choose "GPX XML" as the output.

I hit Apply, and Babel gives me this as output: 

gpsbabel -w -r -t -i kml,lines=1,points=1,floating=0,extrude=0,track=1,trackdata=1,trackdirection=0,labels=1 -f /Users/gurami/Downloads/history.kml -o gpx,suppresswhite=0,logpoint=0,humminbirdextensions=0,garminextensions=0 -F /Users/gurami/Downloads/history6.gpx
Translation successful

However, the output GPX file is empty, except for the header: 

<?xml version="1.0" encoding="UTF-8"?>
<gpx
  version="1.0"
  creator="GPSBabel - http://www.gpsbabel.org"
  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">
<time>2011-12-05T22:18:55Z</time>
</gpx>
 
Below is a snippet of my KML file, which I generated from google maps. I've also tried to strip out the extra gunk tags between <Document> and the opening <Placemark> tag, but I get the same result.  Is my KML file not supported? What can I do to as a workaround? Thanks for the help!

<?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" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
<name>Location history</name>
<open>1</open>
<description/>
<StyleMap id="multiTrack">
<Pair>
<key>normal</key>
<styleUrl>#multiTrack_n</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#multiTrack_h</styleUrl>
</Pair>
</StyleMap>
<Style id="multiTrack_n">
<IconStyle>
<Icon>
<href>http://earth.google.com/images/kml-icons/track-directional/track-0.png</href>
</Icon>
</IconStyle>
<LineStyle>
<color>99ffac59</color>
<width>6</width>
</LineStyle>
</Style>
<Style id="multiTrack_h">
<IconStyle>
<scale>1.2</scale>
<Icon>
<href>http://earth.google.com/images/kml-icons/track-directional/track-0.png</href>
</Icon>
</IconStyle>
<LineStyle>
<color>99ffac59</color>
<width>8</width>
</LineStyle>
</Style>
<Placemark>
<name>Latitude User</name>
<description>Location history for Latitude User from 12/31/1969 to 11/29/2011</description>
<styleUrl>#multiTrack</styleUrl>
<gx:Track>
<altitudeMode>clampToGround</altitudeMode>
<when>2011-09-28T23:12:44.594-07:00</when>
<gx:coord>-76.7120778 37.2686977 0</gx:coord>
<when>2011-09-29T07:34:48.915-07:00</when>
<gx:coord>-76.7120778 37.2686977 0</gx:coord>
<when>2011-09-29T09:43:59.015-07:00</when>
<gx:coord>-76.715055 37.271584 0</gx:coord>
<when>2011-09-29T09:46:59.455-07:00</when>
<gx:coord>-76.713327 37.274159 0</gx:coord>
...
</gx:Track>
</Placemark>
</Document>
</kml>



------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d


_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
Gpsbabel-misc@...
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
Gpsbabel-misc@...
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc



------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
Gpsbabel-misc@...
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc