FromCoordString

摘要

将坐标系记法字符串转换为 WGS84 坐标中的 PointGeometry 对象。

说明

要创建坐标系记法字符串,请使用 PointGeometry 对象的 toCoordString 方法。

语法

FromCoordString (string, notation)
参数说明数据类型
string

输入坐标。

String
notation

输入字符串的坐标系记法。

  • DD Decimal degrees is used, for example, 34.05719570N 117.19647020W.
  • DDM Degrees decimal minutes is used, for example, 34 03.43174200N 117 11.78821200W.
  • DMS Degree Minute Seconds, is used, for example, 34 03 25.90452000N 117 11 47.29272000W.
  • GARS Global Area Reference System is used, for example, 126LJ47. It is based on latitude and longitude, and it divides and subdivides the world into cells.
  • GEOREF World Geographic Reference System is used, for example, EJCE4821203432.
  • MGRS Military Grid Reference System is used, for example, 11SMT8186968515.
  • USNG United States National Grid is used, for example, 11S MT 81869 68515.
  • UTM Universal Transverse Mercator is used, for example, 11S 481868 3768515. It is based on zone number, MGRS latitude band, and the easting and northing planar coordinate pair in that zone.
  • UTMNS Universal Transverse Mercator (no spaces) is used, for example, 11N4818683768515. It is based on zone number, hemisphere designator, and the easting and northing planar coordinate pair in that zone.
String
返回值
数据类型说明
PointGeometry

坐标系为 WGS84 (wkid=4326) 的 PointGeometry 对象。

代码示例

FromCoordString 示例

根据美国国家格网字符串创建 PointGeometry 对象。

import arcpy
coord_string = '14S PB 59361 43195'
point_geometry = arcpy.FromCoordString(coord_string, 'USNG')

相关主题