Converting a KML to a Layer, how to convert popupinfo data to fields?

7673
4
05-16-2018 08:34 AM
MarcusVowell
New Contributor II

Often I am given a KMZ with features that have a lot of information that shows up in the pop-up, but when it is converted to an Esri feature layer, all of that info resides in a single "popupinfo" field as a block of HTML.  Is there a function or process that can easily take that block of text and, using the HTML tags, convert it into fields and data?

4 Replies
BruceHarold
Esri Regular Contributor

Hi Marcus

This can be a bit of an adventure depending on how the table holding the description HTML is structured but here is one example.  If you need help with this ask your local Esri office.

https://community.esri.com/thread/191262-extracting-attributes-from-kml-descriptions 

MarcusVowell
New Contributor II

Thanks, Bruce!  I was afraid it would be a complicated process.  I guess I was hoping there was a magic Esri tool that parsed the HTML into an attribute table automatically, but this will at least give me a starting point from which to work.  Thanks again!  Much appreciated!

0 Kudos
Zachary-Smith
New Contributor

You could try the KML-to-Layer-Post-Process tool on GitHub. It is meant to use the popup HTML information and convert it to fields. I've had a hard time making it work, but maybe it could for others.

https://github.com/cam-mcevenue/KML-to-Layer-Post-Process

0 Kudos
DavidBranca
New Contributor II

I posted a simple solution on another thread linked below. a small python script that can be loaded into a tool and run on a layer converted from a KML file (using AGP's kml to layer tool). the scritp scrapes the html table and converts it to feature attributes. 

https://community.esri.com/t5/data-management-questions/extracting-attributes-from-kml-descriptions/...

0 Kudos