[postgis-users] ST_IsClosed

Komяpa me at komzpa.net
Sun Sep 14 13:33:17 PDT 2014


You don't need to create additional columns to check exising ones in
WHERE-clause, so your query is simlply:

SELECT * FROM public.lines WHERE ST_IsClosed(lines.linestring);

2014-09-14 23:21 GMT+03:00 Christopher Braune <chbraune at uni-potsdam.de>:

> Hello PostGIS-Users,
>
> I want to select all closed lines in my dataset. I think the function
> ST_IsClosed is usefull for this task.
>
> I tried the following SQL-Sentence:
> >>
> SELECT *, (SELECT ST_IsClosed(lines.linestring) AS tof) FROM public.lines
> WHERE tof='TRUE';
> <<
>
> I get this error-message:
>
> >>
> ERROR:  column "tof" does not exist
> LINE 3: ...s.linestring) AS tof) FROM public.lines WHERE tof='TRUE'...
>                                                         ^
> ********** Fehler **********
>
> ERROR: column "tof" does not exist
> SQL Status:42703
> Zeichen:131
> <<
>
> Can anybody help me? In general I want to know how I use the
> boolean-results (like ST_IsClosed) in nested queries.
>
> Best regards,
> Christopher
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>



-- 
Darafei "Komяpa" Praliaskouski
OSM BY Team - http://openstreetmap.by/
xmpp:me at komzpa.net mailto:me at komzpa.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20140914/38084c3e/attachment.html>


More information about the postgis-users mailing list