返回几何特定部分的点对象数组,或包含多个数组(每个数组对应一个部分)的数组。
intersect (other, dimension)构造作为两个输入几何交集的几何体。不同的维数可用于创建不同的 shape 类型。
对于同一 shape 类型的两个几何体,其交集为仅包含原始几何重叠区域的几何。
为了更快地获取结果,请在调用 intersect 类之前先测试两个几何体是否不相交。measureOnLine (in_point, {as_percentage})
从此条线的起点向 in_point 返回一个测量值。
overlaps (second_geometry)指示两个几何的交集是否具有与其中一个输入几何相同的形状类型,并且不等于任一输入几何。
本图仅显示 True 关系。
pointFromAngleAndDistance (angle, distance, {method})使用指定的测量类型按给定的角度(以度为单位)和距离(以米为单位)返回点。
positionAlongLine (value, {use_percentage})返回线上距线起点指定距离处的点。
projectAs (spatial_reference, {transformation_name})定义几何投影,并应用相应的地理变换。
要进行投影,几何体需要具有一个空间参考且不具有 UnknownCoordinateSystem。传递到该方法的新空间参考系统参数定义了一个输出坐标系。如果任一空间参考未知,坐标将不会发生更改。ProjectAs 方法并不更改 Z 值和测量值。
queryPointAndDistance (in_point, {as_percentage})在折线上找到离 in_point 最近的点,并确定这两点间的距离。同时返回关于 in_point 位于线的哪一侧以及最近点沿线的距离。
segmentAlongLine (start_measure, end_measure, {use_percentage})在起始测量值和结束测量值之间返回 Polyline。虽然与 Polyline.positionAlongLine 相似,但是会在折线的两点之间(而不是在单点)返回折线段。
snapToLine (in_point)基于以该几何作为捕捉目标的 in_point 返回一个新点。symmetricDifference (other)
构造一个几何体,该几何体由两个几何的并集减去其交集所形成。
两个输入几何必须为同一 shape 类型。
touches (second_geometry)指示几何的边界是否相交。
当两个几何的交集不为空,但它们内部的交集为空时,说明两个几何接触。例如,仅当点与折线的一个终点重合时,才表示点与折线接触。
本图仅显示 True 关系。
union (other)构造一个几何体,该几何体是输入几何的并集。
要合并的两个几何必须为同一 shape 类型。
within (second_geometry)指明基础几何是否位于比较几何之内。
被包含是与包含相反的运算符。
本图仅显示 True 关系。
方法angleAndDistanceTo (other, {method})参数说明数据类型other
The second geometry.
PointGeometrymethodPLANAR measurements reflect the projection of geographic data onto the 2D surface (in other words, they will not take into account the curvature of the earth). GEODESIC, GREAT_ELLIPTIC, LOXODROME, and PRESERVE_SHAPE measurement types may be chosen as an alternative, if desired.
GEODESIC —The shortest line between any two points on the earth\'s surface on a spheroid (ellipsoid). One use for a geodesic line is when you want to determine the shortest distance between two cities for an airplane\'s flight path. This is also known as a great circle line if based on a sphere rather than an ellipsoid.GREAT_ELLIPTIC —The line on a spheroid (ellipsoid) defined by the intersection at the surface by a plane that passes through the center of the spheroid and the start and endpoints of a segment. This is also known as a great circle when a sphere is used.LOXODROME —A loxodrome is not the shortest distance between two points but instead defines the line of constant bearing, or azimuth. Great circle routes are often broken into a series of loxodromes, which simplifies navigation. This is also known as a rhumb line.PLANAR —Planar measurements use 2D Cartesian mathematics to calculate lengths and areas. This option is only available when measuring in a projected coordinate system and the 2D plane of that coordinate system will be used as the basis for the measurements.PRESERVE_SHAPE —This type calculates the area or length of the geometry on the surface of the earth ellipsoid, for geometry defined in a projected or geographic coordinate system. This option preserves the shape of the geometry in its coordinate system.(默认值为 GEODESIC)
String返回值数据类型说明tuple将一组角(以度为单位)和距离(以米为单位)返回到另一个点。
boundary ()返回值数据类型说明Object
面的边界为折线。折线的边界为多点,与线的端点相对应。点或多点的边界为空点或多点。
buffer (distance)参数说明数据类型distance
The buffer distance.
The buffer distance is in the same units as the geometry thatis being buffered.
A negative distance can only be specified against a polygon geometry.
Double返回值数据类型说明Polygon缓冲的面几何。
clip (envelope)参数说明数据类型envelope
An extent object used to define the clip extent.
Extent返回值数据类型说明Object将输出几何体按指定范围进行裁剪。
contains (second_geometry)参数说明数据类型second_geometry
A second geometry.
Object返回值数据类型说明Boolean返回布尔值 True 表示该几何包含第二个几何。
convexHull ()返回值数据类型说明Object
生成的几何。单个点的凸包为该点本身。
crosses (second_geometry)参数说明数据类型second_geometry
A second geometry.
Object返回值数据类型说明Boolean返回布尔值为 True 指明两个几何相交于较小形状类型的几何。
cut (cutter)参数说明数据类型cutter
The cutting polyline geometry.
PolyLine返回值数据类型说明Geometry包含两个几何的列表。
densify (type, distance, deviation)参数说明数据类型type
The type of densification, DISTANCE, ANGLE, or GEODESIC.
DISTANCE —Creates a new feature that is a piecewise linear approximation of the input.ANGLE —Creates a new feature that is a piecewise linear approximation of the input. Vertices are introduced at points where the angle between tangents at those points is the provided angle.GEODESIC —Densifies and reshapes segments between input vertices so that the output segments follow the shortest ground path connecting input vertices. StringdistanceThe maximum distance between vertices. The actual distance between vertices will usually be less than the maximum distance as new vertices will be evenly distributed along the original segment.
If using a type of DISTANCE or ANGLE, the distance is measured in the units of the geometry\'s spatial reference. If using a type of GEODESIC, the distance is measured in meters.
DoubledeviationDensify uses straight lines to approximate curves. You use deviation to control the accuracy of this approximation. The deviation is the maximum distance between the new segment and the original curve. The smaller its value, the more segments will be required to approximate the curve.
If using a type of DISTANCE, the deviation is measured in the units of the geometry\'s spatial reference. If using a type of ANGLE, the deviation is measured in radians. If using a type of GEODESIC, the deviation is not used.
Double返回值数据类型说明Geometry增密几何。
difference (other)参数说明数据类型other
A second geometry.
Object返回值数据类型说明Object生成的几何。
disjoint (second_geometry)参数说明数据类型second_geometry
A second geometry.
Object返回值数据类型说明Boolean返回布尔值 True 表示两个几何未共用任何点。
distanceTo (other)参数说明数据类型other
A second geometry.
Object返回值数据类型说明Double两个几何之间的距离。
equals (second_geometry)参数说明数据类型second_geometry
A second geometry.
Object返回值数据类型说明Boolean返回布尔值为 True 表示两个几何的 shape 类型相同并在平面中定义了相同点集。
generalize (max_offset)参数说明数据类型max_offset
The maximum offset tolerance.
Double返回值数据类型说明Geometry概化的几何。
getArea ({type}, {units})参数说明数据类型type
PLANAR measurements reflect the projection of geographic data onto the 2D surface (in other words, they will not take into account the curvature of the earth). GEODESIC, GREAT_ELLIPTIC, LOXODROME, and PRESERVE_SHAPE measurement types may be chosen as an alternative, if desired.
GEODESIC —The shortest line between any two points on the earth\'s surface on a spheroid (ellipsoid). One use for a geodesic line is when you want to determine the shortest distance between two cities for an airplane\'s flight path. This is also known as a great circle line if based on a sphere rather than an ellipsoid.GREAT_ELLIPTIC —The line on a spheroid (ellipsoid) defined by the intersection at the surface by a plane that passes through the center of the spheroid and the start and endpoints of a segment. This is also known as a great circle when a sphere is used.LOXODROME —A loxodrome is not the shortest distance between two points but instead defines the line of constant bearing, or azimuth. Great circle routes are often broken into a series of loxodromes, which simplifies navigation. This is also known as a rhumb line.PLANAR —Planar measurements use 2D Cartesian mathematics to calculate lengths and areas. This option is only available when measuring in a projected coordinate system and the 2D plane of that coordinate system will be used as the basis for the measurements.PRESERVE_SHAPE —This type calculates the area or length of the geometry on the surface of the earth ellipsoid, for geometry defined in a projected or geographic coordinate system. This option preserves the shape of the geometry in its coordinate system.(默认值为 GEODESIC)
StringunitsThe units in which the area will be calculated.
Areal unit of measure keywords: ACRES | ARES | HECTARES | SQUARECENTIMETERS | SQUAREDECIMETERS | SQUAREINCHES | SQUAREFEET | SQUAREKILOMETERS | SQUAREMETERS | SQUAREMILES | SQUAREMILLIMETERS | SQUAREYARDS
String返回值数据类型说明Double要素的面积。
默认情况下,在投影坐标系中,将采用坐标系的单位返回面积,在地理坐标系中,将以平方米为单位返回面积。
getLength ({measurement_type}, {units})参数说明数据类型measurement_type
PLANAR measurements reflect the projection of geographic data onto the 2D surface (in other words, they will not take into account the curvature of the earth). GEODESIC, GREAT_ELLIPTIC, LOXODROME, and PRESERVE_SHAPE measurement types may be chosen as an alternative, if desired.
GEODESIC —The shortest line between any two points on the earth\'s surface on a spheroid (ellipsoid). One use for a geodesic line is when you want to determine the shortest distance between two cities for an airplane\'s flight path. This is also known as a great circle line if based on a sphere rather than an ellipsoid.GREAT_ELLIPTIC —The line on a spheroid (ellipsoid) defined by the intersection at the surface by a plane that passes through the center of the spheroid and the start and endpoints of a segment. This is also known as a great circle when a sphere is used.LOXODROME —A loxodrome is not the shortest distance between two points but instead defines the line of constant bearing, or azimuth. Great circle routes are often broken into a series of loxodromes, which simplifies navigation. This is also known as a rhumb line.PLANAR —Planar measurements use 2D Cartesian mathematics to calculate lengths and areas. This option is only available when measuring in a projected coordinate system and the 2D plane of that coordinate system will be used as the basis for the measurements.PRESERVE_SHAPE —This type calculates the area or length of the geometry on the surface of the earth ellipsoid, for geometry defined in a projected or geographic coordinate system. This option preserves the shape of the geometry in its coordinate system.(默认值为 GEODESIC)
StringunitsThe units in which the length will be calculated.
Linear unit of measure keywords: CENTIMETERS | DECIMETERS | FEET | INCHES | KILOMETERS | METERS | MILES | MILLIMETERS | NAUTICALMILES | YARDS
String返回值数据类型说明Double要素的长度。
默认情况下,在投影坐标系中,将采用坐标系的单位返回长度,在地理坐标系中,将以米为单位返回长度。
getPart ({index})参数说明数据类型index
几何的索引位置。
Integer返回值数据类型说明Array如果指定了索引,则 getPart 将返回几何特定部分的点对象数组。如果未指定索引,则返回的数组将包含每个几何部分的点对象数组。
intersect (other, dimension)参数说明数据类型other
The second geometry.
ObjectdimensionThe topological dimension (shape type) of the resulting geometry.
1 —A zero-dimensional geometry (point or multipoint).2 —A one-dimensional geometry (polyline).4 —A two-dimensional geometry (polygon).Integer返回值数据类型说明Object作为两个输入几何体的交集的新几何体(点、多点、折线或面)。
measureOnLine (in_point, {as_percentage})参数说明数据类型in_point
A point (PointGeometry or Point) that is used to measure from the start point of the polyline.
PointGeometryas_percentageIf False, the measure will be returned as a distance; if True, the measure will be returned as a percentage.
(默认值为 False)
Boolean返回值数据类型说明Double一个距离或百分比。
overlaps (second_geometry)参数说明数据类型second_geometry
A second geometry.
Object返回值数据类型说明Boolean返回布尔值为 True 表示两个几何的交集具有与其中一个输入几何相同的尺寸。
pointFromAngleAndDistance (angle, distance, {method})参数说明数据类型angle
The angle in degrees to the returned point.
DoubledistanceThe distance in meters to the returned point.
DoublemethodPLANAR measurements reflect the projection of geographic data onto the 2D surface (in other words, they will not take into account the curvature of the earth). GEODESIC, GREAT_ELLIPTIC, LOXODROME, and PRESERVE_SHAPE measurement types may be chosen as an alternative, if desired.
GEODESIC —The shortest line between any two points on the earth\'s surface on a spheroid (ellipsoid). One use for a geodesic line is when you want to determine the shortest distance between two cities for an airplane\'s flight path. This is also known as a great circle line if based on a sphere rather than an ellipsoid.GREAT_ELLIPTIC —The line on a spheroid (ellipsoid) defined by the intersection at the surface by a plane that passes through the center of the spheroid and the start and endpoints of a segment. This is also known as a great circle when a sphere is used.LOXODROME —A loxodrome is not the shortest distance between two points but instead defines the line of constant bearing, or azimuth. Great circle routes are often broken into a series of loxodromes, which simplifies navigation. This is also known as a rhumb line.PLANAR —Planar measurements use 2D Cartesian mathematics to calculate lengths and areas. This option is only available when measuring in a projected coordinate system and the 2D plane of that coordinate system will be used as the basis for the measurements.PRESERVE_SHAPE —This type calculates the area or length of the geometry on the surface of the earth ellipsoid, for geometry defined in a projected or geographic coordinate system. This option preserves the shape of the geometry in its coordinate system.(默认值为 GEODESIC)
String返回值数据类型说明PointGeometry按给定的角度(以度为单位)和距离(以米为单位)返回点。
positionAlongLine (value, {use_percentage})参数说明数据类型value
The distance along the line.
If the distance is less than zero, then the starting point of the line will be returned; if the distance is greater than the length of the line, then the end point of the line will be returned.
Doubleuse_percentageThe distance may be specified as a fixed unit of measure or a ratioof the length of the line.
If True, value is used as a percentage; if False, value is used as a distance. For percentages, the value should be expressed as a double from 0.0 (0%) to 1.0 (100%).
(默认值为 False)
Boolean返回值数据类型说明PointGeometry线上距线起点指定距离的点。
projectAs (spatial_reference, {transformation_name})参数说明数据类型spatial_reference
The new spatial reference.This can be a SpatialReference object or the coordinate system name.
SpatialReferencetransformation_nameThe geotransformation name.
String返回值数据类型说明Object经投影的几何。
queryPointAndDistance (in_point, {as_percentage})参数说明数据类型in_point
The input point (PointGeometry or Point).
PointGeometryas_percentageIf False, the measure will be returned as a distance; if True, the measure will be returned as a percentage.
(默认值为 False)
Boolean返回值数据类型说明tuple返回包含以下信息的一个元组:
用来表示折线上距 in_point 最近的点的 PointGeometry。线的起点与线上所返回的点之间的距离。线和 in_point 之间的最小距离。用来表示 in_point 是否位于线的右侧的布尔值。线的方向决定左右两侧。segmentAlongLine (start_measure, end_measure, {use_percentage})参数说明数据类型start_measure
The starting distance from the beginning of the line.
Doubleend_measureThe ending distance from the beginning of the line.
Doubleuse_percentageThe start and end measures may be specified as fixed units or as a ratio.
If True, start_measure and end_measure are used as a percentage; if False, start_measure and end_measure are used as a distance. For percentages, the measures should be expressed as a double from 0.0 (0 percent) to 1.0 (100 percent).
(默认值为 False)
Boolean返回值数据类型说明PolyLine两点之间的线段。
snapToLine (in_point)参数说明数据类型in_point
A point (PointGeometry or Point) to be snapped to the line.
PointGeometry返回值数据类型说明PointGeometry捕捉到的点。
symmetricDifference (other)参数说明数据类型other
A second geometry.
Object返回值数据类型说明Object生成的几何。
touches (second_geometry)参数说明数据类型second_geometry
A second geometry.
Object返回值数据类型说明Boolean返回布尔值为 True,表示几何的边界相交。
union (other)参数说明数据类型other
A second geometry.
Object返回值数据类型说明Object生成的几何。
within (second_geometry)参数说明数据类型second_geometry
A second geometry.
Object返回值数据类型说明Boolean返回布尔值 True 表示该几何被包含在另一个几何之内。
代码实例面示例从头开始创建面要素类。
import arcpy# A list of features and coordinate pairsfeature_info = [[[1, 2], [2, 4], [3, 7]], [[6, 8], [5, 7], [7, 2], [9, 5]]]# A list that will hold each of the Polygon objectsfeatures = []for feature in feature_info: # Create a Polygon object based on the array of points # Append to the list of Polygon objects features.append( arcpy.Polygon( arcpy.Array([arcpy.Point(*coords) for coords in feature])))# Persist a copy of the Polyline objects using CopyFeaturesarcpy.CopyFeatures_management(features, c:/geometry/polygons.shp )相关主题PointPointGeometryPolylineMultipointGeometryArray读取几何写入几何将几何对象与地理处理工具配合使用 有关此主题的反馈?
本文链接: http://polygon.immuno-online.com/view-773484.html