MBR Casts | Geospatial Data Types | Teradata Vantage - Casts - Analytics Database - Teradata Vantage

Geospatial Data Types

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2023-08-30
dita:mapPath
qgk1628112272483.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
ghz1472251264557
lifecycle
latest
Product Category
Teradata Vantageā„¢

Vantage implements cast functionality that allows data type conversions between VARCHAR and MBR types. To convert a VARCHAR type to an MBR type, the VARCHAR must use the following format:

(xmin, ymin, xmax, ymax)

where white space can appear anywhere.

Consider the following table definitions.

CREATE TABLE sample_MBRs (skey INTEGER, shape_mbr MBR);
CREATE TABLE sample_data (mbr_data VARCHAR(256));

This example performs MBR to VARCHAR data type conversion:

INSERT INTO sample_data
SELECT CAST(shape_mbr as VARCHAR(256))
FROM sample_MBRs;