Hi list and Martin,<br><br>If i use st_covers, the query 1 and 2 return's false.<br>After read the blog, i am thinking that covers should return true at that cases.<br>query 1:<br>select ST_covers<br> (<br> geomfromtext('LINESTRING(10 18, 30 18)',4326),<br>
geomfromtext('MULTIPOLYGON (((10 18,30 18,30 12,10 12,10 18)))',4326)<br> )<br><br>and<br><br>query 2:<br>select ST_covers<br> (<br> geomfromtext('POINT(10 18)',4326),<br> geomfromtext('MULTIPOLYGON (((10 18,30 18,30 12,10 12,10 18)))',4326)<br>
)<br><br><br>select postgis_full_version();<br>"POSTGIS="1.3.6" GEOS="3.1.0-CAPI-1.5.0" PROJ="Rel. 4.6.1, 21 August 2008" USE_STATS"<br>I am using postgres 8.3.7 version and windows vista os.<br>
<br>I read the release notes and the bug tracker and don't find any bug that fit the problem.<br><br>In the meanwhile, i will download the postgres 8.3.8, 8.4.1 and try with newer versions of postgis 1.4.0 etc.<br><br>
Anyone has any clues?<br><br>very thanks for yout help,<br clear="all">Luigi Castro Cardeles<br>
<br><br><div class="gmail_quote">2009/9/21 Martin Davis <span dir="ltr"><<a href="mailto:mbdavis@refractions.net">mbdavis@refractions.net</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The OGC definition for Contains and Within have always seemed a bit non-intuitive to me. They may be theoretically elegant. but they don't really address the most common use case. (See a blog post on this as: <a href="http://lin-ear-th-inking.blogspot.com/2007/06/subtleties-of-ogc-covers-spatial.html" target="_blank">http://lin-ear-th-inking.blogspot.com/2007/06/subtleties-of-ogc-covers-spatial.html</a>). <br>
<br>
That's why JTS, GEOS and PostGIS define the covers() predicate, which has simpler, more intuitive and more practical semantics.<br>
<br>
<a href="http://postgis.refractions.net/documentation/manual-1.4/ST_Covers.html" target="_blank">http://postgis.refractions.net/documentation/manual-1.4/ST_Covers.html</a><br>
<br>
<br>
Luigi Castro Cardeles wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
Hi list and Chris,<br>
<br>
this is what i was asking :D<br>
<br>
i was thinking that boundary is part of the geometry, so if there is some geometry on the boundary (in this case, a point on the polygon boundary) then the point is within the polygon. But after your message i read the specs (<a href="http://portal.opengeospatial.org/files/?artifact_id=18241" target="_blank">http://portal.opengeospatial.org/files/?artifact_id=18241</a>) about within, i see the relate and now i understand. Thanks for the hint Chris.<br>
<br>
[]'s<br>
Luigi Castro Cardeles<br>
<br>
<br></div>
2009/9/18 Chris Hermansen <<a href="mailto:chris.hermansen@timberline.ca" target="_blank">chris.hermansen@timberline.ca</a> <mailto:<a href="mailto:chris.hermansen@timberline.ca" target="_blank">chris.hermansen@timberline.ca</a>>><div class="im">
<br>
<br>
If it's on the boundary, is it within?<br>
Chris Hermansen <a href="mailto:chris.hermansen@timberline.ca" target="_blank">chris.hermansen@timberline.ca</a><br></div>
<mailto:<a href="mailto:chris.hermansen@timberline.ca" target="_blank">chris.hermansen@timberline.ca</a>><div class="im"><br>
tel+1.604.714.2878 · fax+1.604.733.0631 · mob+1.778.840.4625<br>
Timberline Natural Resource Group · <a href="http://www.timberline.ca" target="_blank">www.timberline.ca</a><br></div>
<<a href="http://www.timberline.ca" target="_blank">http://www.timberline.ca</a>><div class="im"><br>
401 · 958 West 8th Avenue · Vancouver BC · Canada · V5Z 1E5<br>
<br>
<br>
-----Original Message-----<br>
From: Luigi Castro Cardeles <<a href="mailto:luigi.cardeles@gmail.com" target="_blank">luigi.cardeles@gmail.com</a><br></div><div class="im">
<mailto:<a href="mailto:luigi.cardeles@gmail.com" target="_blank">luigi.cardeles@gmail.com</a>>><br>
<br>
Date: Fri, 18 Sep 2009 10:01:32<br>
To: PostGIS Users Discussion<<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br></div><div class="im">
<mailto:<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a>>><br>
Subject: Re: [postgis-users] Problem with ST_WITHIN<br>
<br>
<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br></div>
<mailto:<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a>><div class="im"><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br></div>
<mailto:<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a>><div class="im"><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
<br>
<br>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
<br>
</div></blockquote><font color="#888888">
<br>
-- <br>
Martin Davis<br>
Senior Technical Architect<br>
Refractions Research, Inc.<br>
(250) 383-3022</font><div><div></div><div class="h5"><br>
<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</div></div></blockquote></div><br>