16.20 - Example: TO_MGRS - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ Geospatial Data Types

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Release Date
March 2019
Content Type
Programming Reference
Publication ID
B035-1181-162K
Language
English (United States)

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

SELECT TO_MGRS(
  new ST_GEOMETRY('ST_POINT', 30, 45), 
  (select SRTEXT from sysspatial.spatial_ref_sys where srid = 1619), 
  5);

Returns:

TO_MGRS(NEW ST_GEOMETRY('ST_POINT', 30, 45),<Scalar Subquery>,5 )
-----------------------------------------------------------------
36TTQ6355387329