[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    Re: [postgis-users] ST_IsClosed
From:       Komяpa <me () komzpa ! net>
Date:       2014-09-14 20:33:17
Message-ID: CAC8Q8tJb+36CLqU4c0n+x0R=j8HLcZzuadkxUyGnJsb5yFydLQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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@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@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@komzpa.net mailto:me@komzpa.net

[Attachment #5 (text/html)]

<div dir="ltr"><div><br></div><div>You don&#39;t need to create additional columns to \
check exising ones in WHERE-clause, so your query is \
simlply:</div><div><br></div>SELECT * FROM public.lines WHERE  \
ST_IsClosed(lines.linestring);<br></div><div class="gmail_extra"><br><div \
class="gmail_quote">2014-09-14 23:21 GMT+03:00 Christopher Braune <span \
dir="ltr">&lt;<a href="mailto:chbraune@uni-potsdam.de" \
target="_blank">chbraune@uni-potsdam.de</a>&gt;</span>:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Hello PostGIS-Users,<br> <br>
I want to select all closed lines in my dataset. I think the function ST_IsClosed is \
usefull for this task.<br> <br>
I tried the following SQL-Sentence:<br>
&gt;&gt;<br>
SELECT *, (SELECT ST_IsClosed(lines.linestring) AS tof) FROM public.lines WHERE \
tof=&#39;TRUE&#39;;<br> &lt;&lt;<br>
<br>
I get this error-message:<br>
<br>
&gt;&gt;<br>
ERROR:   column &quot;tof&quot; does not exist<br>
LINE 3: ...s.linestring) AS tof) FROM public.lines WHERE tof=&#39;TRUE&#39;...<br>
                                                                                    \
                ^<br>
********** Fehler **********<br>
<br>
ERROR: column &quot;tof&quot; does not exist<br>
SQL Status:42703<br>
Zeichen:131<br>
&lt;&lt;<br>
<br>
Can anybody help me? In general I want to know how I use the boolean-results (like \
ST_IsClosed) in nested queries.<br> <br>
Best regards,<br>
Christopher<br>
______________________________<u></u>_________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" \
target="_blank">postgis-users@lists.osgeo.org</a><br> <a \
href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" \
target="_blank">http://lists.osgeo.org/cgi-<u></u>bin/mailman/listinfo/postgis-<u></u>users</a><br>
 </blockquote></div><br><br clear="all"><div><br></div>-- <br>Darafei \
&quot;Komяpa&quot; Praliaskouski<br>OSM BY Team - <a href="http://openstreetmap.by/" \
target="_blank">http://openstreetmap.by/</a><br><a href="mailto:xmpp%3Ame@komzpa.net" \
target="_blank">xmpp:me@komzpa.net</a> mailto:<a href="mailto:me@komzpa.net" \
target="_blank">me@komzpa.net</a><br> </div>



_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic