15.10 - ST_Distance - Teradata Database

Teradata Database SQL Geospatial Types

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

Returns the minimum shortest difference between two ST_Geometry values.

 

Argument …

Specifies …

ageometry

the other ST_Geometry value.

Returns a FLOAT value.

All ST_Geometry types.

  • ST_Distance returns NULL if the geometry value passed to it is the empty set.
  • If a geospatial index is defined on the geospatial data column to which this method is applied, the index will only be used if method appears in the WHERE clause of a query such that the distance between the geometries is less than or equal to a constant. For example:
  • ... WHERE geom.ST_Distance(otherGeom) < 10
    ... WHERE 10 >= geom.ST_Distance(otherGeom)
       SELECT skey
       FROM sample_shapes
       WHERE shape.ST_Distance('LINESTRING(2 2, 3 2, 4 1)')
          < 1E0;