FromCoordString

Summary

Converts a coordinate system notation string to a PointGeometry object in WGS84 coordinates.

Discussion

To create a coordinate system notation string, use the PointGeometry object's toCoordString method.

Syntax

FromCoordString (string, notation)
ParameterExplanationData Type
string

The input coordinates.

String
notation

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
Return Value
Data TypeExplanation
PointGeometry

A PointGeometry object with a coordinate system of WGS84 (wkid=4326).

Code sample

FromCoordString example

Create a PointGeometry object from a United States National Grid string.

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

Related topics