Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: " we have loaded the ListFeatureClasses.py script with IDLE."

A block of code is set as follows:

import arcpy fc = "c:/ArcpyBook/data/TravisCounty/TravisCounty.shp" # Fetch each feature from the cursor and examine the extent properties and spatial reference for row in arcpy.da.SearchCursor(fc, ["SHAPE@"]): # get the extent of the county boundary ext = row[0].extent # print out the bounding coordinates and spatial reference print "XMin: " + ext.XMin print "XMax: " + ext.XMax print "YMin: " + ext.YMin print "YMax: ...

Get Programming ArcGIS 10.1 with Python Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.