Skip To Content

esri_coordsys_DatumTransformations_remove (AutoLISP)

此函数用于从当前工程图中移除基准面变换。 工程图中起始坐标系和目标坐标系之间的基准面变换唯一。 这些唯一基准面变换定义可以在设置和移除时使用 FromCSToCS 坐标系来识别。 可以使用 (esri_coordsys_DatumTransformations) 函数以获取工程图中存储的基准面变换列表。

语法

(esri_coordsys_DatumTransformations_remove FromCS ToCS)

参数

  • FromCS | 字符串 | 必填 | 字符串形式的 Esri 坐标系的有效 WKID(熟知坐标系 ID)或 WKT。
  • ToCS | 字符串 | 必填 | 字符串形式的 Esri 坐标系的有效 WKID(熟知坐标系 ID)或 WKT。

注:

创建熟知文本 (WKT) 作为 AutoLISP 字符串参数时,该字符串必须包含相应转义字符,以在文本字符串内包含必要的引号。 以下为示例:

坐标系:

"PROJCS[\"NAD_1983_HARN_StatePlane_Florida_West_FIPS_0902_Feet\",GEOGCS[\"GCS_North_American_1983_HARN\",DATUM[\"D_North_American_1983_HARN\",SPHEROID[\"GRS_1980\",6378137.0,298.257222101]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"False_Easting\",656166.6666666665],PARAMETER[\"False_Northing\",0.0],PARAMETER[\"Central_Meridian\",-82.0],PARAMETER[\"Scale_Factor\",0.9999411764705882],PARAMETER[\"Latitude_Of_Origin\",24.33333333333333],UNIT[\"Foot_US\",0.3048006096012192],AUTHORITY[\"EPSG\",2882]]"

示例用法 1

尝试移除当前工程图中指定的起始坐标系和目标坐标系之间的现有基准面变换。

(esri_coordsys_datumtransformations_remove "2882" "3857")

结果示例用法 1

将移除现有基准面变换定义,并且该函数将返回包含 true (T) 的列表。

(T)

示例用法 2

尝试移除当前工程图中的现有基准面变换。

(esri_coordsys_datumtransformations_remove "6543" "3857")

结果示例用法 2

由于当前工程图中存在 web 要素图层,因此不会移除现有基准面变换定义。 将返回一条错误消息。

(nil ("Error" . "This document contains existing web feature layers. Datum transformations cannot be modified when web feature layers present."))

返回值

  • 将移除现有基准面变换定义,并且该函数将返回包含 true (T) 的列表。

  • 如果该函数失败,则该函数将返回一个列表,其中第一个值为 nil,然后是一个包含键值 "Error" 的关联列表以及字符串形式的关联错误消息:(nil ("Error" . "<message>"))

失败的返回值

出于以下任一原因,可能出现失败的返回值:

  • (nil ("Error" . "Failed"))

    提供的 WKID 或 WKT 无效。

  • (nil ("Error" . "Missing required argument."))

    未提供一个或多个必填参数。

  • (nil ("Error" . "This document contains existing web feature layers. Datum transformations cannot be modified when web feature layers present."))

    该文档包含现有 web 要素图层。