当前位置: 首页>>代码示例 >>用法及示例精选 >>正文


Python ArcGIS Geometry.project_as用法及代码示例


本文简要介绍 python 语言中 arcgis.geometry.Geometry.project_as 的用法。

用法:

project_as(spatial_reference, transformation_name=None)

返回:

Geometry 对象

投影 Geometry 对象并可选择应用 geotransformation

注意:

project_as 方法需要 ArcPy 或 pyproj>=1.9 和 PROJ.4

Parameter

Description

spatial_reference

所需的空间参考。新的空间参考。这可以是 SpatialReference 对象或坐标系名称。

transformation_name

必需的字符串。 geotransformation 名称。

>>> geom = Geometry({
>>>   "rings" : [[[-97.06138,32.837],[-97.06133,32.836],[-97.06124,32.834],[-97.06127,32.832],
>>>               [-97.06138,32.837]],[[-97.06326,32.759],[-97.06298,32.755],[-97.06153,32.749],
>>>               [-97.06326,32.759]]],
>>>   "spatialReference" : {"wkid" : 4326}
>>>                 })
>>> geom2 = geom.project_as(spatial_reference="GCS",
                            transformation_name = "transformation")
>>> geom2.type
    arcgis.geometry.Geometry

相关用法


注:本文由纯净天空筛选整理自arcgis.com大神的英文原创作品 arcgis.geometry.Geometry.project_as。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。