15.10 - ST_3DIsClosed - Teradata Database

Teradata Database SQL Geospatial Types

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

Tests whether a 3D LineString or 3D MultiLineString is closed, taking into account the z coordinates in the calculation.

Returns an INTEGER value:

  • 1 if the 3D LineString or 3D MultiLineString is closed.
  • 0 if the 3D LineString or 3D MultiLineString is not closed or is empty.
  • If the input geometry is not a 3D LineString or 3D MultiLineString, ST_3DIsClosed returns an error.

    LineString and MultiLineString types that include z coordinates

       CREATE TABLE sample_shapes(skey INTEGER, shape ST_Geometry);
       INSERT sample_shapes(9901,
                        'Linestring(0 0 0, 0 5 5, 5 5 5, 5 0 5, 0 0 0)');
       INSERT sample_shapes(9902,
                        'Linestring(0 0 0, 1 1 1, 2 2 2, 3 3 3, 4 4 4)');
       SELECT Shape.ST_3DIsClosed()
       FROM sample_shapes;