Spatial data types

HCL® OneDB® spatial data types are divided into two categories: the base geometry subclasses and the homogeneous collection subclasses.

  • The base geometries are:
    • ST_Point
    • ST_LineString
    • ST_Polygon
  • The homogeneous collections are:
    • ST_MultiPoint
    • ST_MultiLineString
    • ST_MultiPolygon

Homogeneous collections are collections of base geometries; in addition to sharing base geometry properties, homogeneous collections also have some properties of their own.

The ST_GeometryType() function takes an ST_Geometry and returns the instantiable subclass in the form of a character string. The ST_NumGeometries() function takes a homogeneous collection and returns the number of base geometry elements it contains. The ST_GeometryN() function takes a homogeneous collection and an index and returns the nth base geometry.