Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
ArcGIS Blueprints

You're reading from   ArcGIS Blueprints Explore the robust features of Python to create real-world ArcGIS applications through exciting, hands-on projects

Arrow left icon
Product type Paperback
Published in Dec 2015
Publisher Packt
ISBN-13 9781785286223
Length 378 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Eric Pimpler Eric Pimpler
Author Profile Icon Eric Pimpler
Eric Pimpler
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Extracting Real-Time Wildfire Data from ArcGIS Server with the ArcGIS REST API FREE CHAPTER 2. Tracking Elk Migration Patterns with GPS and ArcPy 3. Automating the Production of Map Books with Data Driven Pages and ArcPy 4. Analyzing Crime Patterns with ArcGIS Desktop, ArcPy, and Plotly(Part 1) 5. Analyzing Crime Patterns with ArcGIS Desktop, ArcPy, and Plotly(Part 2) 6. Viewing and Querying Parcel Data 7. Using Python with the ArcGIS REST API and the GeoEnrichment Service for Retail Site Selection 8. Supporting Search and Rescue Operations with ArcPy, Python Add-Ins, and simplekml 9. Real-Time Twitter Mapping with Tweepy, ArcPy, and the Twitter API 10. Integrating Smartphone Photos with ArcGIS Desktop and ArcGIS Online A. Overview of Python Libraries for ArcGIS Index

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:

  1. Close ArcMap if required.

  2. 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 the Install folder in your Python development environment.

  3. Find the SearchSector class and remove all the methods with the exception of the __init__ and onLine() methods.

  4. In the __init__ method, set the self.shape property to LINE, as shown here, along with a cursor type:

    self.shape = "LINE"
    self.cursor = 3
  5. In the onLine() method, set the workspace environment variable:

    def onLine(self, line_geometry):
          arcpy.env.workspace = "C:\ArcGIS_Blueprint_Python...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime