Creating the Search Sector tool
Efficient search and rescue operations will require that groups of personnel be assigned to specific areas. In this section, we'll create a tool that will allow Search and Rescue analysts to sketch polygon features that represent specific areas that will then be assigned to search groups. The following steps will help you to create Search Sector tool:
Close ArcMap if required.
In Windows Explorer, return to the working directory that stores the Python add-in for this project and open the
addin_addin.py
file from theInstall
folder in your Python development environment.Find the
SearchSector
class and remove all the methods with the exception of the__init__
andonLine()
methods.In the
__init__
method, set theself.shape
property toLINE
, as shown here, along with acursor
type:self.shape = "LINE" self.cursor = 3
In the
onLine()
method, set the workspace environment variable:def onLine(self, line_geometry): arcpy.env.workspace = "C:\ArcGIS_Blueprint_Python...