Creating the Convert to Google Earth tool
Because visualization is very important to Search and Rescue personnel, the ability to see these datasets in a 3D environment is helpful. In this section, we'll create a custom tool that can be used to export these datasets to Google Earth's Keyhole Markup Language (KML) format.
To complete this section, you will need to install the simplekml
Python module. You can use pip
to install this module by using the following command from the command prompt:
pip install simplekml
The following steps will help you to create Convert to Google Earth tool:
In ArcMap, open Catalog view, right-click on the
SAR.pyt
custom toolbox, and select Edit to open the code in the Python development environment.Copy and paste the existing
AssignLKPAttributes
class inside theSAR.pyt
file.Rename the newly pasted
AssignLKPAttributes
class toConvertToGoogleEarth
class.Import the
simplekml
module:import arcpy import simplekml
Update the
self.label
andself.description
properties...