ST_ISLINE()
All functions > GEOSPATIAL > ST_ISLINE()
Returns TRUE if the geometry or geography is a LineString.
Signatures
Is line
Returns: TRUE if the sub kind is LineString
ST_ISLINE(geo: T) → BOOLEAN sql
| Parameter | Type | Required | Description |
|---|---|---|---|
geo | T | Yes | Geometry or geography value |
With:
T: Custom types: GEOM_POINT | GEOM_LINESTRING | GEOM_POLYGON | GEOM_MULTIPOINT | GEOM_MULTILINESTRING | GEOM_MULTIPOLYGON | GEOM_MULTIANY | GEOG_POINT | GEOG_LINESTRING | GEOG_POLYGON | GEOG_MULTIPOINT | GEOG_MULTILINESTRING | GEOG_MULTIPOLYGON | GEOG_MULTIANY
Signature notes:
- Transpiled as a ST_GEOMETRYTYPE comparison; the type label varies by engine
- Returns FALSE for MultiLineString; use ST_ISCOLLECTION for that
- Returns NULL if the input is NULL
Examples
FeatureQL
SELECT
f1 := ST_ISLINE(ST_GEOMFROMTEXT('LINESTRING (0 0, 1 1)')), -- A line is a line
f2 := ST_ISLINE(ST_GEOMPOINT(1.0, 2.0)) -- A point is not a line
;Result
| f1 BOOLEAN | f2 BOOLEAN |
|---|---|
| true | false |
On this page