Skip to main content

FromCoordString

Краткая информация

Функция FromCoordString преобразует строку обозначения системы координат в объект PointGeometry в координатах WGS84.

Обсуждение

Чтобы создать строку обозначения системы координат, воспользуйтесь методом PointGeometry объекта toCoordString.

Синтаксис

FromCoordString(string, notation)

Параметр Объяснение Тип данных

string

The input coordinates.

String

notation

Specifies the coordinate system notation of the input string.

  • 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

Объект PointGeometry с системой координат WGS84 (wkid=4326).

Пример кода

Пример FromCoordString

Создайте объект PointGeometry из строки United States National Grid.

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