Skip to main content

I use the SQL executor to join a lot of PostGreSQL and PostGis tabels.

One of these tables contain a "geom" column with points and line objects. At the end of the SQL statement i want to select only the lines. Can anyone specify which statement to use to select only linestrings?

 

I don't have access to PostGIS to test but something along the lines of ?

where ST_GeometryType(geom) = 'ST_LineString'

 


Yes, this ^^^.   Also alternative PostGIS function supported is:

WHERE GeometryType(geom)='LINESTRING'

See PostGIS Documentation

https://postgis.net/docs/ST_GeometryType.html

https://postgis.net/docs/GeometryType.html


Thanks! Both options are useable!


Reply