Import KML attributes in ExtendedData nodes

781
3
03-20-2014 08:07 AM
Status: Open
Labels (1)
JesseWickizer
Occasional Contributor

The Kml To Layer tool does not import data attributes contained in a KML file. Handling attributes should be an important function of a file import utility in the leading GIS software.
The KML spec for including attributes in KML GIS data is here: https://developers.google.com/kml/documentation/extendeddata

3 Comments
BruceHarold

Hello Jesse

Data Interoperability extension supports reading typed data from schema and schemadata elements in KML/KMZ files.

More frequently we see untyped data in description objects i.e. HTML, this can be extracted using the approach in this discussion.

JeffBishop

When we import a KML/KMZ using the "KML to Feature" tool, we lose all of the attribution of the features. Only the name of the feature is preserved. I hear Global Mapper can do this and I also hear the Interoperability Extension allows this, but we have no licensing for either and I was hoping such a basic feature would be made available by ESRI. 

jcarlson

It's a nice idea, but part of the problem is that KML/KMZ is a non-tabular format. Some programs may behave otherwise, but an individual feature in a KML/KMZ can have any number of attributes unique to itself within the ExtendedData element.

        <ExtendedData>
          <Data name="Latitude">
            <value>42.6452348</value>
          </Data>
          <Data name="Longitude">
            <value>-87.8540913</value>
          </Data>
          <Data name="Month">
            <value>July</value>
          </Data>
          <Data name="Present">
            <value/>
          </Data>
        </ExtendedData>

I imagine it was a development decision to just keep it simple, rather than potentially have a massive table with mostly null values.

Still, maybe something like "attributes to keep" as an option in the tool would be nice, so the tool could look in the ExtendedData element for "<Data name="your-attribute"> and pull out the value. It would be a good enhancement.