Example: TO_MGRS - Advanced SQL Engine - Teradata Database

Geospatial Data Types

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
vci1556127188517.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1181
lifecycle
previous
Product Category
Teradata Vantage™

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