15.10 - Intersects_MBB - 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 geometry spatially intersects a specified MBB.

 

Argument …

Specifies …

aMBB

a minimum bounding box.

Returns an INTEGER value:

  • 1, if the input 3D geometry intersects the MBB argument.
  • 0, if the input 3D geometry does not intersect the MBB argument.
  • Returns an error if the input geometry is not 3D (does not have a z coordinate).

    3D Point, 3D MultiPoint, 3D LineString, 3D MultiLineString

    CREATE TABLE sample_shapes(skey INTEGER, shape ST_Geometry);
    INSERT sample_shapes VALUES(1001, 'Point(10 20 30)');
    INSERT sample_shapes VALUES(1002, 
     'Linestring(0 0 0, 1 1 1, 2 2 2, 3 3 3, 4 4 4)');
    INSERT sample_shapes VALUES(1003, 
     'MultiPoint((10 20 30), (40 50 60), (70 80 90))');
    INSERT sample_shapes VALUES(1004, 
     'MultiLinestring((0 0 0, 1 1 1, 2 2 2, 3 3 3, 4 4 4), (30 30 30, 30 30 50, 30 30 70, 30 30 90))');
     
    SELECT shape.Intersects_MBB(new MBB(0,0,0,20,20,20))
    FROM sample_shapes;