KML to Layer without PopupInfo html tags?

2919
5
08-15-2013 02:51 PM
MichaelAugust
Occasional Contributor III
Is there a way to import a KML(KMZ) without having any popups bring in their associated tags <td/>, etc.?  Or does anyone have a simple solution (field calculator, python, etc.) to strip these tags out in the attribute table? 

We have people taking notes in an iOS app, which exports as a KMZ but the imported KMZ keeps the tags and the text in the resultant layer file.

Thanks!
0 Kudos
5 Replies
samcousins
New Contributor
Did you ever find a solution for this?
I have been unsuccessful at finding a way thats time efficient. The only way i have found to do it so far is by opening the KML into excel and doing a series of rename, replace, searches and replacing it with a symbol like # and then splitting it up by symbol.

Any help would be great.
0 Kudos
MichaelAugust
Occasional Contributor III

Hi Sam - no I haven't found a more elegant solution to searching/replacing...I would think there's a programmatic solution, but I don't have that much experience - anyone?

0 Kudos
CollinJohnston
Occasional Contributor III

Any news on this front?

We have this great KML file with all sorts of very useful data in the HTML popup. However it's all stored in the popup field in the converted point file and can not be read unless copied and pasted into a text editor of some kind.

Looking for a python script or something to get this info out of the single field the proper attribute table format using multiple columns. I believe it's currently stored as HTML-formatted code stored in a text field.

How do you parse through this stuff!?!?! How have people been accomplishing this task?

0 Kudos
BruceHarold
Esri Regular Contributor

Hi

If the KML/Z file has a schema object then the Data Interoperability extension will create a feature class with a properly typed schema with attributes.  If you have to resort to Python then you'll need to parse the HTML with something like BeautifulSoup.

CollinJohnston
Occasional Contributor III

Hey Bruce,

That is great insight. Thanks for helping me solve this once and for all.

I know this is all in the help docs, but sometimes they get too convoluted and this is a much easier forum to get right to the solution.

Happy mapping, Cheers!

0 Kudos