Hi list and Martin,<br><br>many thanks :D<br><br>[]'s<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;">
Switch the arguments around. <br>
ST_covers(A, B) = true iff A covers B <br>
In other words, ST_covers(LINE, POLYGON) = false, but ST_covers(POLYGON, LINE) = true.<br>
<br>
In other other words, the order of the arguments for ST_covers should be the same as for ST_within, and opposite to ST_contains<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 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>
Luigi Castro Cardeles<br>
<br>
<br></div>
2009/9/21 Martin Davis <<a href="mailto:mbdavis@refractions.net" target="_blank">mbdavis@refractions.net</a> <mailto:<a href="mailto:mbdavis@refractions.net" target="_blank">mbdavis@refractions.net</a>>><div>
<div></div><div class="h5"><br>
<br>
The OGC definition for Contains and Within have always seemed a<br>
bit non-intuitive to me. They may be theoretically elegant. but<br>
they don't really address the most common use case. (See a blog<br>
post on this as:<br>
<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,<br>
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>
<br>
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<br>
there is some geometry on the boundary (in this case, a point<br>
on the polygon boundary) then the point is within the polygon.<br>
But after your message i read the specs<br>
(<a href="http://portal.opengeospatial.org/files/?artifact_id=18241" target="_blank">http://portal.opengeospatial.org/files/?artifact_id=18241</a>)<br>
about within, i see the relate and now i understand. Thanks<br>
for the hint Chris.<br>
<br>
[]'s<br>
Luigi Castro Cardeles<br>
<br>
<br>
2009/9/18 Chris Hermansen <<a href="mailto:chris.hermansen@timberline.ca" target="_blank">chris.hermansen@timberline.ca</a><br>
<mailto:<a href="mailto:chris.hermansen@timberline.ca" target="_blank">chris.hermansen@timberline.ca</a>><br>
<mailto:<a href="mailto:chris.hermansen@timberline.ca" target="_blank">chris.hermansen@timberline.ca</a><br>
<mailto:<a href="mailto:chris.hermansen@timberline.ca" target="_blank">chris.hermansen@timberline.ca</a>>>><br>
<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>
<mailto:<a href="mailto:chris.hermansen@timberline.ca" target="_blank">chris.hermansen@timberline.ca</a>><br>
<mailto:<a href="mailto:chris.hermansen@timberline.ca" target="_blank">chris.hermansen@timberline.ca</a><br></div></div><div class="im">
<mailto:<a href="mailto:chris.hermansen@timberline.ca" target="_blank">chris.hermansen@timberline.ca</a>>><br>
<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>
<<a href="http://www.timberline.ca" target="_blank">http://www.timberline.ca</a>><br>
<<a href="http://www.timberline.ca" target="_blank">http://www.timberline.ca</a>><br>
<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>
<mailto:<a href="mailto:luigi.cardeles@gmail.com" target="_blank">luigi.cardeles@gmail.com</a>><br>
<mailto:<a href="mailto:luigi.cardeles@gmail.com" target="_blank">luigi.cardeles@gmail.com</a><br>
<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<br>
Discussion<<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br>
<mailto:<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a>><br>
<mailto:<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br>
<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>
<mailto:<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a>><br>
<mailto:<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>
<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>
<mailto:<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></div><div class="im">
<mailto:<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a>>><br>
<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>
<mailto:<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>
<br></div><div class="im">
-- Martin Davis<br>
Senior Technical Architect<br>
Refractions Research, Inc.<br>
(250) 383-3022<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>
<mailto:<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>
<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><div><div></div><div class="h5">
<br>
-- <br>
Martin Davis<br>
Senior Technical Architect<br>
Refractions Research, Inc.<br>
(250) 383-3022<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>