Geospatial Single-Table Predicate Syntax | Teradata Vantage - Geospatial Single-Table Predicate Syntax - 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ā„¢

Single-Table Predicate

For single-table predicates except distance methods ST_Distance and ST_3DDistance:

SELECT a, b FROM TableName WHERE {
  TableName.GeoCol.SupportedGeoMethod (GeospatialLiteralExpression) = 1 |
  GeospatialLiteralExpression.SupportedGeoMethod (TableName.GeoCol) = 1 |
  TableName.GeoCol IS NULL
}
The expression must be set to evaluate to 1 (true) for the first two forms to qualify as single-table predicates.

Single-Table Distance Predicate

For distance methods ST_Distance and ST_3DDistance:

SELECT a, b FROM TableName WHERE {
  TableName.GeoCol.SupportedGeoDistanceMethod (GeospatialLiteralExpression)
    { < | <= } DistanceLiteral |

  GeospatialLiteralExpression.SupportedGeoDistanceMethod(TableName.GeoCol)
    { < | <= } DistanceLiteral
}

Syntax Elements

TableName
Table containing a geospatial data column.
GeoCol
Geospatial data column defined as one of the ST_GEOMETRY types.
SupportedGeoMethod
One of the specified geospatial methods, excluding ST_Distance and ST_3DDistance.
SupportedGeoDistanceMethod
Either ST_Distance or ST_3DDistance.
GeospatialLiteralExpression
An arbitrary geospatial literal expression that can be folded (simplified) in to a geospatial literal value.
DistanceLiteral
A floating point value representing a distance.