Extent

摘要

An extent is a rectangle specified by providing the coordinate of the lower left corner and the coordinate of the upper right corner in map units.

讨论

注注:

When used as input to the Spatial Analyst tools, Create Constant Raster, Create Normal Raster, Create Random Raster, Extract By Rectangle and Topo To Raster only the XMin, YMin, XMax and YMax values are used by these tools.

语法

Extent ({XMin}, {YMin}, {XMax}, {YMax}, {ZMin}, {ZMax}, {MMin}, {MMax})
参数说明数据类型
XMin

The extent XMin value.

Double
YMin

The extent YMin value.

Double
XMax

The extent XMax value.

Double
YMax

The extent YMax value.

Double
ZMin

The extent ZMin value. None if no Z value.

Double
ZMax

The extent ZMax value. None if no Z value.

Double
MMin

The extent MMin value. None if no M value.

Double
MMax

The extent MMax value. None if no M value.

Double

属性

属性说明数据类型
MMax
(只读)

The extent MMax value. None if no M value.

Double
MMin
(只读)

The extent MMin value. None if no M value.

Double
XMax
(只读)

The extent XMax value.

Double
XMin
(只读)

The extent XMin value.

Double
YMax
(只读)

The extent YMax value.

Double
YMin
(只读)

The extent YMin value.

Double
ZMax
(只读)

The extent ZMax value. None if no Z value.

Double
ZMin
(只读)

The extent ZMin value. None if no Z value.

Double
depth
(只读)

The extent depth value. None if no depth.

Double
height
(只读)

The extent height value.

Double
lowerLeft
(只读)

The lower left property: A point object is returned.

Point
lowerRight
(只读)

The lower right property: A point object is returned.

Point
upperLeft
(只读)

The upper left property: A point object is returned.

Point
upperRight
(只读)

The upper right property: A point object is returned

Point
width
(只读)

The extent width value.

Double

代码示例

Extent example

Display extent object properties for features.

import arcpy
from arcpy import env

# Set the workspace
#
env.workspace = "C:/Data/Florida.gdb"

# Create a search cursor from the airports featureclass
#
sCur = arcpy.SearchCursor("airports", '"CNTY_NAME" = \'Orange\'')

# Fetch each feature from the cursor and examine the extent properties
#
for row in sCur:
    geom = row.shape
    ext = geom.extent  # or row.Shape.extent
    print "Extent of feature:\nXMin: %f, YMin: %f, \nXMax: %f, YMax: %f" % \
          (ext.XMin,ext.YMin,ext.XMax,ext.YMax) 

相关主题


7/10/2012