Extent

Résumé

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.

Discussion

Remarque :

When used as input to Extension ArcGIS 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.

Syntaxe

 Extent  ({XMin}, {YMin}, {XMax}, {YMax}, {ZMin}, {ZMax}, {MMin}, {MMax}, {spatial_reference})
ParamètreExplicationType de données
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
spatial_reference

The spatial reference of the extent.

SpatialReference

Propriétés

PropriétéExplicationType de données
JSON
(Lecture seule)

Returns a JSON representation of the extent as a string.

Astuce :

The returned string can be converted to a dictionary using the Python json.loads function.

String
MMax
(Lecture seule)

The extent MMax value. None if no m-value.

Double
MMin
(Lecture seule)

The extent MMin value. None if no m-value.

Double
XMax
(Lecture seule)

The extent XMax value.

Double
XMin
(Lecture seule)

The extent XMin value.

Double
YMax
(Lecture seule)

The extent YMax value.

Double
YMin
(Lecture seule)

The extent YMin value.

Double
ZMax
(Lecture seule)

The extent ZMax value. None if no z-value.

Double
ZMin
(Lecture seule)

The extent ZMin value. None if no z-value.

Double
depth
(Lecture seule)

The extent depth value. None if no depth.

Double
geohash
(Lecture seule)

A geohash string of the extent is returned.

String
geohashCovers
(Lecture seule)

Returns a list of up to the four longest geohash strings that fit within the extent.

String
geohashNeighbors
(Lecture seule)

A list of the geohash neighbor strings for the extent is returned.

String
height
(Lecture seule)

The extent height value.

Double
lowerLeft
(Lecture seule)

The lower left property: A point object is returned.

Point
lowerRight
(Lecture seule)

The lower right property: A point object is returned.

Point
polygon
(Lecture seule)

Returns the extent as a polygon object.

Polygon
spatialReference
(Lecture seule)

The spatial reference of the extent.

SpatialReference
upperLeft
(Lecture seule)

The upper left property: A point object is returned.

Point
upperRight
(Lecture seule)

The upper right property: A point object is returned.

Point
width
(Lecture seule)

The extent width value.

Double

Vue d’ensemble des méthodes

MéthodeExplication
contains (second_geometry, {relation})

Indicates if the base geometry contains the comparison geometry.

contains is the opposite of within.

Only True relationships are shown in this illustration.

Possible contains relationships
crosses (second_geometry)

Indique si les deux géométries s'intersectent dans une géométrie de type de forme inférieure.

Deux polylignes se croisent si elles partagent uniquement des points, dont au moins un n'est pas une extrémité. Une polyligne et un polygone se croisent s'ils partagent une polyligne ou un point (pour une ligne verticale) à l'intérieur du polygone qui n'est pas équivalent à la polyligne entière.

Only True relationships are shown in this illustration.

Relations crosses possibles
disjoint (second_geometry)

Indique si la géométrie de base et la géométrie de comparaison n'ont aucun point en commun.

Deux géométries s'intersectent si la propriété disjoint renvoie False.

Only True relationships are shown in this illustration.

Relations disjoint possibles
equals (second_geometry)

Indicates if the base and comparison geometries are of the same shape type and define the same set of points in the plane. This is a 2D comparison only; M and Z values are ignored.

Only True relationships are shown in this illustration.

Possible equals relationships
overlaps (second_geometry)

Indique si l'intersection des deux géométries possède le même type de forme que l'une des géométries en entrée et qu'elle n'est pas équivalente à l'une des géométries en entrée.

Only True relationships are shown in this illustration.

Relations overlaps possibles
projectAs (spatial_reference, {transformation_name})

Projects a geometry and optionally applies a geotransformation.

To project, the geometry needs to have a spatial reference, and not have an UnknownCoordinateSystem. The new spatial reference system passed to the method defines the output coordinate system. If either spatial reference is unknown the coordinates will not be changed. The Z- and measure values are not changed by the ProjectAs method.

touches (second_geometry)

Indicates if the boundaries of the geometries intersect.

Two geometries touch when the intersection of the geometries is not empty, but the intersection of their interiors is empty. For example, a point touches a polyline only if the point is coincident with one of the polyline end points.

Only True relationships are shown in this illustration.

Possible touches relationships
within (second_geometry, {relation})

Indicates if the base geometry is within the comparison geometry.

within is the opposite operator of contains.

Only True relationships are shown in this illustration.

Possible within relationships

The base geometry is within the comparison geometry if the base geometry is the intersection of the geometries and the intersection of their interiors is not empty. within is a Clementini operator, except in the case of an empty base geometry.

Méthodes

contains (second_geometry, {relation})
ParamètreExplicationType de données
second_geometry

A second geometry.

Object
relation

The spatial relationship type.

  • BOUNDARY Relationship has no restrictions for interiors or boundaries.
  • CLEMENTINI Interiors of geometries must intersect. Specifying CLEMENTINI is equivalent to specifying None. This is the default.
  • PROPER Boundaries of geometries must not intersect.

(La valeur par défaut est None)

String
Valeur renvoyée
Type de donnéesExplication
Boolean

A return Boolean value of True indicates this geometry contains the second geometry.

crosses (second_geometry)
ParamètreExplicationType de données
second_geometry

A second geometry.

Object
Valeur renvoyée
Type de donnéesExplication
Boolean

Une valeur booléenne renvoyée True indique que les deux géométries s'intersectent dans une géométrie de type de forme inférieure.

disjoint (second_geometry)
ParamètreExplicationType de données
second_geometry

A second geometry.

Object
Valeur renvoyée
Type de donnéesExplication
Boolean

Une valeur booléenne renvoyée True indique que les deux géométries n'ont aucun point en commun.

equals (second_geometry)
ParamètreExplicationType de données
second_geometry

A second geometry.

Object
Valeur renvoyée
Type de donnéesExplication
Boolean

A return Boolean value of True indicates that the two geometries are of the same shape type and define the same set of points in the plane.

overlaps (second_geometry)
ParamètreExplicationType de données
second_geometry

A second geometry.

Object
Valeur renvoyée
Type de donnéesExplication
Boolean

Une valeur booléenne renvoyée True indique que l'intersection des deux géométries a la même dimension que l'une des géométries en entrée.

projectAs (spatial_reference, {transformation_name})
ParamètreExplicationType de données
spatial_reference

The new spatial reference. This can be a SpatialReference object or the coordinate system name.

SpatialReference
transformation_name

The geotransformation name.

String
Valeur renvoyée
Type de donnéesExplication
Object

The projected geometry.

touches (second_geometry)
ParamètreExplicationType de données
second_geometry

A second geometry.

Object
Valeur renvoyée
Type de donnéesExplication
Boolean

A return Boolean value of True indicates the boundaries of the geometries intersect.

within (second_geometry, {relation})
ParamètreExplicationType de données
second_geometry

A second geometry.

Object
relation

The spatial relationship type.

  • BOUNDARY Relationship has no restrictions for interiors or boundaries.
  • CLEMENTINI Interiors of geometries must intersect. Specifying CLEMENTINI is equivalent to specifying None. This is the default.
  • PROPER Boundaries of geometries must not intersect.

(La valeur par défaut est None)

String
Valeur renvoyée
Type de donnéesExplication
Boolean

A return Boolean value of True indicates this geometry is contained within the second geometry.

Exemple de code

Extent example

Display extent object properties for features.

import arcpy

feature_class = 'c:/Data/Florida.gdb/airports'

# Fetch each feature from the cursor and examine the extent properties
for row in arcpy.da.SearchCursor(feature_class, ['SHAPE@', 'CNTY_NAME']):
    extent = row[0].extent
    print('Extent of county {}:'.format(row[1]))
    print('XMin: {}, YMin: {}'.format(extent.XMin, extent.YMin))
    print('XMax: {}, YMax: {}'.format(extent.XMax, extent.YMax))

Rubriques connexes