<div dir="ltr">I am sorry, I am kind of a newbie here, but what does the <span style="font-family:arial,sans-serif;font-size:13px">~ operator do?<br></span><br>Thanks<br><br>Enrico</div><div class="gmail_extra"><br><div class="gmail_quote">2014-09-27 1:15 GMT+02:00 Paragon Corporation <span dir="ltr"><<a href="mailto:lr@pcorp.us" target="_blank">lr@pcorp.us</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>





<div style="WORD-WRAP:break-word">
<div dir="ltr" align="left"><span><font size="4">Fine by 
me.  I at first thought in my imagination that it was possible for a box to 
not contain another box and for the geometries that have those boxes to contain 
each other.  But after thinking some more I convinced myself it's not 
possible in this world or any we would consider.</font></span></div>
<div dir="ltr" align="left"><span><font size="4"></font></span> </div>
<div dir="ltr" align="left"><span><font size="4">Regina</font></span></div><br>
<div lang="en-us" dir="ltr" align="left">
<hr>
<font face="Tahoma"><b>From:</b> <a href="mailto:postgis-devel-bounces@lists.osgeo.org" target="_blank">postgis-devel-bounces@lists.osgeo.org</a> 
[mailto:<a href="mailto:postgis-devel-bounces@lists.osgeo.org" target="_blank">postgis-devel-bounces@lists.osgeo.org</a>] <b>On Behalf Of </b>Paul 
Ramsey<br><b>Sent:</b> Friday, September 26, 2014 5:51 PM<br><b>To:</b> PostGIS 
Development Discussion<br><b>Subject:</b> [postgis-devel] ST_Contains / 
ST_Within<br></font><br></div><div><div class="h5">
<div></div>
<div>I 
was just working through strategy numbers and thinking about how we only ever 
use RTOverlapStrategyNumber when I realized that we should be using other 
strategies for at least a few of our functions, and yet we have </div>
<div><br></div>
<div style="MARGIN:0px">
<div style="MARGIN:0px">CREATE OR REPLACE FUNCTION 
ST_Contains(geom1 geometry, geom2 geometry)</div>
<div style="MARGIN:0px">        RETURNS 
boolean</div>
<div style="MARGIN:0px">        AS 
'SELECT $1 && $2 AND _ST_Contains($1,$2)'</div>
<div style="MARGIN:0px">        
LANGUAGE 'sql' IMMUTABLE;</div>
<div style="FONT-SIZE:13px;FONT-FAMILY:Helvetica,Arial;COLOR:rgb(0,0,0)"><br></div>
<div style="FONT-SIZE:13px;FONT-FAMILY:Helvetica,Arial;COLOR:rgb(0,0,0)">When 
really it should be</div>
<div style="FONT-SIZE:13px;FONT-FAMILY:Helvetica,Arial;COLOR:rgb(0,0,0)"><br></div>
<div>
<div>CREATE OR REPLACE FUNCTION ST_Contains(geom1 geometry, geom2 
geometry)</div>
<div>        RETURNS boolean</div>
<div>        AS 'SELECT $1 ~ $2 AND 
_ST_Contains($1,$2)'</div>
<div>        LANGUAGE 'sql' IMMUTABLE;</div>
<div style="FONT-SIZE:13px;FONT-FAMILY:Helvetica,Arial;COLOR:rgb(0,0,0)"><br></div></div></div>Probably 
a small efficiency savings to be had in reducing the number of geometries to be 
exact tested. Anyone see a reason we shouldn’t do this?
<div><br></div>
<div>P.<br>
<div>
<div><br></div>-- <br>Paul Ramsey<br><a href="http://cleverelephant.ca" target="_blank">http://cleverelephant.ca</a>
<div><a href="http://postgis.net" target="_blank">http://postgis.net</a> </div>

</div></div></div></div></div>
<br>_______________________________________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org">postgis-devel@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel</a><br></blockquote></div><br></div>