ST_GeometryTypeID function

The ST_GeometryTypeID function retrieves the numeric type associated with the geometry.

This function can also be used as a method.

Syntax

Read syntax diagramSkip visual syntax diagram db2gse.ST_GeometryTypeID ( geometry )

Parameter

geometry
A value of type ST_Geometry for which the number associated with the geometry type is to be returned.

Return type

Returns an integer for the geometry type of the specified geometry.

Example

create table points (pk integer not null primary key, geo db2gse.ST_Point) organize by row

insert into points values(1, db2gse.st_point(10,10, 1))

select db2gse.st_geometrytypeid(geo) as type from points 

Result
TYPE
-----------          
          4