ST_GeometryType¶
Returns the type of a geometry.
Usage¶
string ST_GeometryType(geom: geometry)
Arguments¶
- geom (geometry): Input geometry
Description¶
Returns the OGC geometry type name prefixed with ST_. Possible return
values include: 'ST_Point', 'ST_LineString', 'ST_Polygon',
'ST_MultiPoint', 'ST_MultiLineString', 'ST_MultiPolygon', and
'ST_GeometryCollection'.
Examples¶
SELECT ST_GeometryType(ST_GeomFromWKT('POLYGON ((0 0, 1 0, 0 1, 0 0))'));
┌─────────────────────────────────────────────────────────────────────────┐
│ st_geometrytype(st_geomfromwkt(Utf8("POLYGON ((0 0, 1 0, 0 1, 0 0))"))) │
│ utf8 │
╞═════════════════════════════════════════════════════════════════════════╡
│ ST_Polygon │
└─────────────────────────────────────────────────────────────────────────┘
SELECT ST_GeometryType(ST_Point(1.0, 2.0));
┌──────────────────────────────────────────────────┐
│ st_geometrytype(st_point(Float64(1),Float64(2))) │
│ utf8 │
╞══════════════════════════════════════════════════╡
│ ST_Point │
└──────────────────────────────────────────────────┘