官术网_书友最值得收藏!

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: " + ext.YMax
  print "Spatial Reference: " + ext.spatialReference.name

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

import arcpy

fc = "c:/data/city.gdb/streets"

# For each row print the Object ID field, and use the SHAPE@AREA
# token to access geometry properties

with arcpy.da.SearchCursor(fc, ("OID@", "SHAPE@AREA")) as cursor:
  for row in cursor:
    print("Feature {0} has an area of {1}".format(row[0], row[1]))

Any command-line input or output is written as follows:

[<map layer u'City of Austin Bldg Permits'>, <map layer u'Hospitals'>, <map layer u'Schools'>, <map layer u'Streams'>, <map layer u'Streets'>, <map layer u'Streams_Buff'>, <map layer u'Floodplains'>, <map layer u'2000 Census Tracts'>, <map layer u'City Limits'>, <map layer u'Travis County'>]

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "go to Start | Programs | ArcGIS | Python 2.7 | IDLE".

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

主站蜘蛛池模板: 长汀县| 商都县| 隆德县| 湘潭市| 阿克陶县| 石首市| 贵港市| 神木县| 舟山市| 巧家县| 西和县| 卓尼县| 贡觉县| 武威市| 寻甸| 阿坝县| 揭阳市| 滨州市| 丁青县| 三穗县| 资中县| 连云港市| 临洮县| 静海县| 越西县| 安溪县| 古浪县| 百色市| 兴隆县| 邹平县| 肃南| 龙南县| 松江区| 黔江区| 固安县| 南平市| 酒泉市| 中西区| 林甸县| 资兴市| 娱乐|