3

I have been working in ArcGIS to convert shapefiles into kml files using ArcGIS toolbox. The resulted kml/kmz contain some extra set of information in the description field that is used to show a pop-up screen when clicked on a record. This is really unwanted for me and I am required to delete this html links. I open each of the records and remove all html code from their Description field. Does anyone know whether there is an automatic way/tool to do the same, that can remove the code from all the records at a single cycle?

6
  • 1
    Do you wish to remove only some attributes from the popup, or are you trying to remove the popup altogether? Where is the popup occurring when you click on the KMZ - in Google Earth, or Google Maps? Commented Jul 8, 2014 at 23:24
  • That is quick, thnx. I actually want to remove the popup altogether and dont want the records to show a link (as blue underlined text). I am using google earth plus. When any of the record is clicked a popup opens and the tabular data is shown.
    – Mehmud
    Commented Jul 8, 2014 at 23:32
  • And is this in Google Earth and/or Google Maps? It may be unrelated to exporting from ArcGIS - the real question might actually be "how to avoid showing a popup in Google Earth/Maps with KML files"? Commented Jul 8, 2014 at 23:33
  • Thanks for your help have changed it accordingly. its Earth
    – Mehmud
    Commented Jul 8, 2014 at 23:51
  • 1
    @mr.adam a KMZ file is just a zipped KML, so in your script you can rename it from whatever.kmz to whaterver.zip, unzip it, then make the change to the resulting KML Commented Jul 9, 2014 at 23:38

2 Answers 2

3

I found the solution using ArcGIS. In ArcMap before you export the layer, you need to set some specifications rightly for the exported kml file properties. Go to Layer properties, then from the HTML Popup tab uncheck "Show content for this layer using the HTML Popup tool" check-box. Then convert in any means X-tools or ArcToolbox to kml doen't matter.

4
  • Note that this will work within ArcMap - but it won't have any effect on Google Earth or Google Maps, since the ArcMap HTML Popup setting only applies within the current MXD. Commented Jul 9, 2014 at 23:36
  • 1
    Yes but when exporting the data, the exported kml file keep the properties exactly as you saved it in ArcGIS; thus the property applies in google earth/maps also.
    – Mehmud
    Commented Jul 10, 2014 at 0:14
  • 1
    To follow GIS SE protocols I think you should remove the unnecessary thanks from your answer and expand upon it to provide more details about how it answers your own question. At the moment the system is already flagging it up for review due its short length even with the "thanks" and "appreciation" padding it out.
    – PolyGeo
    Commented Jul 10, 2014 at 1:09
  • Changed it PolyGeo; happy to have efforts from all you people at my first question at SE.
    – Mehmud
    Commented Jul 10, 2014 at 7:09
2

You could save out the KML and then use notepad++ to do a search and replace using regular expressions.

So in notepad++ I would use:

Notepad++ regular expression

and in the replace tab just place

<description></description>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.