Extent

Resumen

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.

Debate

NotaNota:

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.

Sintaxis

Extent ({XMin}, {YMin}, {XMax}, {YMax}, {ZMin}, {ZMax}, {MMin}, {MMax})
ParámetroExplicaciónTipo de datos
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

Propiedades

PropiedadExplicaciónTipo de datos
MMax
(Sólo lectura)

The extent MMax value. None if no M value.

Double
MMin
(Sólo lectura)

The extent MMin value. None if no M value.

Double
XMax
(Sólo lectura)

The extent XMax value.

Double
XMin
(Sólo lectura)

The extent XMin value.

Double
YMax
(Sólo lectura)

The extent YMax value.

Double
YMin
(Sólo lectura)

The extent YMin value.

Double
ZMax
(Sólo lectura)

The extent ZMax value. None if no Z value.

Double
ZMin
(Sólo lectura)

The extent ZMin value. None if no Z value.

Double
depth
(Sólo lectura)

The extent depth value. None if no depth.

Double
height
(Sólo lectura)

The extent height value.

Double
lowerLeft
(Sólo lectura)

The lower left property: A point object is returned.

Point
lowerRight
(Sólo lectura)

The lower right property: A point object is returned.

Point
upperLeft
(Sólo lectura)

The upper left property: A point object is returned.

Point
upperRight
(Sólo lectura)

The upper right property: A point object is returned

Point
width
(Sólo lectura)

The extent width value.

Double

Ejemplo de código

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) 

Temas relacionados


7/10/2012