Skip to main content
Returns the type of the geometry as a string. Eg: ‘LINESTRING’, ‘POLYGON’, ‘MULTIPOINT’, etc. This function also indicates if the geometry is measured, by returning a string of the form ‘POINTM’. GeometryType

Signatures

GeometryType (A: Geometry)

Parameters

A
Geometry
required
The input geometry.

Return type

A string representation.

Examples

SELECT GeometryType(ST_GeomFromText('LINESTRING(77.29 29.07,77.42 29.26,77.27 29.31,77.29 29.07)'));
 geometrytype
--------------
 LINESTRING
SELECT GeometryType(ST_GeomFromText('POINTM(0 0 1)'));
 geometrytype
--------------
 POINTM