15.10 - FROM_MGRS - Teradata Database

Teradata Database SQL Geospatial Types

prodname
Teradata Database
vrm_release
15.10
category
Programming Reference
featnum
B035-1181-151K

DR 137991

Converts a coordinate in the Military Grid Reference System (MGRS) to an ST_GEOMETRY point object.

Note: This function was developed using GEOTRANS, a product of the National Geospatial-Intelligence Agency (NGA) and U.S. Army Engineering Research and Development Center.

 

Argument …

Specifies …

MGRS_coord

a string describing a coordinate in MGRS.

toWktSRS

the well known text (WKT) representation of the target spatial reference system. The supported coordinate systems are UTM, UPS, and Geodetic.

SRID

the ID used for the spatial reference system specified by toWktSRS. It is used to set the ID inside the resulting ST_Geometry type.

For details on the rules for argument data types, see the introduction to this chapter.

Returns an ST_POINT type object in the desired spatial reference system.

Inset owner: Gary Zimmerman
Inset SME: William Brode
11/14/12: initial draft
Changes:

MGRS coordinates employ one of two lettering schemes to denote row identifiers in the grid system: MGRS-Old or MGRS-New. During conversions to and from MGRS, the MGRS lettering scheme in the returned coordinates (for the TO_MGRS function) or expected as input (to the FROM_MGRS function) depends on the spatial reference system from or to which the coordinates are being converted. If the spatial reference system is based on the Bessel, Clarke 1866, or Clarke 1880 reference ellipsoid, the MGRS coordinates use the MGRS-Old lettering scheme. Conversion to or from all other spatial reference systems use the MGRS-New scheme.

This example converts coordinates in the MGRS system to Geodetic coordinates in the “WGS 84” spatial reference system.

SELECT FROM_MGRS(
  '36TTQ6355387329',
  (SELECT SRTEXT FROM SYSSPATIAL.SPATIAL_REF_SYS WHERE SRID = 1619),
  1619);

Returns:

FROM_MGRS('36TTQ6355387329',<Scalar Subquery>,1619)
--------------------------------------------------------------------
POINT (29.999987897221764 44.999995138532547)