5. Geospatial Functions : GeometryType
 
Share this page                  
GeometryType
GEOMETRYTYPE(g Geometry)
Alias: ST_GEOMETRYTYPE
Returns the type of g.
Result type: string
Example:
Query the type of a shape:
SELECT GEOMETRYTYPE(POLYFROMTEXT('POLYGON((0 0, 0 20, 15 20, 15 0, 0 0))'));
------------------------------
col1                          
------------------------------
POLYGON                       
------------------------------