Extent (arcpy)

摘要

范围是在地图单位下提供左下角和右上角坐标指定的一个矩形。

讨论

注注:

当为 ArcGIS Spatial Analyst 扩展模块工具(创建常量栅格创建正态栅格创建随机栅格矩形提取地形转栅格)提供输入时,这些工具仅使用 X 最小值、Y 最小值、X 最大值和 Y 最大值。

语法

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
spatialReference
(只读)

The spatial reference of the extent.

SpatialReference
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

方法概述

方法说明
contains (second_geometry)

Indicates if the base geometry contains the comparison geometry.

contains is the opposite of within.

本图仅显示 True 关系。

Possible contains relationships
crosses (second_geometry)

Indicates if the two geometries intersect in a geometry of a lesser shape type.

Two polylines cross if they share only points in common, at least one of which is not an endpoint. A polyline and an polygon cross if they share a polyline or a point (for vertical line) in common on the interior of the polygon which is not equivalent to the entire polyline.

本图仅显示 True 关系。

Possible crosses relationships
disjoint (second_geometry)

Indicates if the base and comparison geometries share no points in common.

Two geometries intersect if disjoint returns False.

本图仅显示 True 关系。

Possible disjoint relationships
equals (second_geometry)

指示原几何和参照几何的 shape 类型是否相同并在平面中定义相同点集。这仅是 2D 的比较;已忽略 M 值和 Z 值。

本图仅显示 True 关系。

可能的相等关系
overlaps (second_geometry)

Indicates if the intersection of the two geometries has the same shape type as one of the input geometries and is not equivalent to either of the input geometries.

本图仅显示 True 关系。

Possible overlaps relationships
projectAs (spatial_reference, {transformation_name})

定义几何投影,并应用相应的地理变换。

要进行投影,几何体需要具有一个空间参考且不具有 UnknownCoordinateSystem。传递到该方法的新空间参考系统参数定义了一个输出坐标系。如果任一空间参考未知,坐标将不会发生更改。ProjectAs 方法并不更改 Z 值和测量值。

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.

本图仅显示 True 关系。

Possible touches relationships
within (second_geometry)

Indicates if the base geometry is within the comparison geometry.

within is the opposite operator of contains.

本图仅显示 True 关系。

Possible within relationships

方法

contains (second_geometry)
参数说明数据类型
second_geometry

A second geometry.

Object
返回值
数据类型说明
Boolean

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

crosses (second_geometry)
参数说明数据类型
second_geometry

A second geometry.

Object
返回值
数据类型说明
Boolean

A return Boolean value of True indicates the two geometries intersect in a geometry of a lesser shape type.

disjoint (second_geometry)
参数说明数据类型
second_geometry

A second geometry.

Object
返回值
数据类型说明
Boolean

A return Boolean value of True indicates that the two geometries share no points in common.

equals (second_geometry)
参数说明数据类型
second_geometry

A second geometry.

Object
返回值
数据类型说明
Boolean

返回布尔值为 True 表示两个几何的 shape 类型相同并在平面中定义了相同点集。

overlaps (second_geometry)
参数说明数据类型
second_geometry

A second geometry.

Object
返回值
数据类型说明
Boolean

A return Boolean value of True indicates the intersection of the two geometries has the same dimension as one of the input geometries.

projectAs (spatial_reference, {transformation_name})
参数说明数据类型
spatial_reference

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

SpatialReference
transformation_name

The geotransformation name.

String
返回值
数据类型说明
Object

经投影的几何。

touches (second_geometry)
参数说明数据类型
second_geometry

A second geometry.

Object
返回值
数据类型说明
Boolean

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

within (second_geometry)
参数说明数据类型
second_geometry

A second geometry.

Object
返回值
数据类型说明
Boolean

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

代码实例

范围示例

显示要素的范围对象属性。

import arcpy
fc = "c:/Data/Florida.gdb/airports"

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

相关主题

9/15/2013