15.10 - ST_Within - Teradata Database

Teradata Database SQL Geospatial Types

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

Tests if an ST_Geometry value is spatially within another ST_Geometry value.

 

Argument …

Specifies …

ageometry

the other ST_Geometry value.

Returns an INTEGER value:

  • 1, if the geometry is within ageometry
  • 0, if the geometry is not within ageometry
  • All ST_Geometry types except geometry collections.

    Note: This method can be called on 3D geometries (those that include z coordinates). However, the z coordinate is ignored in method calculations.

    Use of a geospatial index can greatly improve the performance of queries that use this method.

       SELECT streetName, cityName
       FROM sample_cities, sample_streets
       WHERE streetShape.ST_Within(cityShape) = 1
       ORDER BY cityName;