ST_GeometryTypeID

Determine the ID of the type of the geometry according to the OGC standard.

Syntax

ST_GeometryTypeID(geo);
geo
The input geometry.

Type: ST_GEOMETRY(ANY)

Returns

A value of type INT that indicates the type of the geometry.

Examples

SELECT inza..ST_GeometryTypeID(inza..ST_WKTToSQL('POLYGON ((10 10, 10 20, 20 20, 20 15, 10 10))'));

ST_GEOMETRYTYPEID
-----------------
3
(1 row)