]> granicus.if.org Git - postgis/commitdiff
Minor documentation change regarding && operator and tweaked one
authorBborie Park <bkpark at ucdavis.edu>
Thu, 19 Jul 2012 18:18:00 +0000 (18:18 +0000)
committerBborie Park <bkpark at ucdavis.edu>
Thu, 19 Jul 2012 18:18:00 +0000 (18:18 +0000)
variant of st_intersects

git-svn-id: http://svn.osgeo.org/postgis/trunk@10071 b70326c6-7e19-0410-871a-916f4a2858ee

doc/reference_raster.xml
raster/rt_pg/rtpostgis.sql.in.c

index 49ed902620e957835df9b88f022b829e805e6f01..62477e0d0d53d055c9d3a739021f14228e7ff575 100644 (file)
@@ -8557,11 +8557,11 @@ WHERE rid = 2;
        
        <sect1 id="RT_Operators">
        <title>Raster Operators</title>
-               <refentry id="RT_Raster_Overlap">
+               <refentry id="RT_Raster_Intersect">
                  <refnamediv>
                        <refname>&amp;&amp;</refname>
 
-                       <refpurpose>Returns <varname>TRUE</varname> if A's bounding box overlaps B's.</refpurpose>
+                       <refpurpose>Returns <varname>TRUE</varname> if A's bounding box intersects B's bounding box.</refpurpose>
                  </refnamediv>
 
                  <refsynopsisdiv>
@@ -8587,7 +8587,7 @@ WHERE rid = 2;
                  <refsection>
                        <title>Description</title>
 
-                       <para>The <varname>&amp;&amp;</varname> operator returns <varname>TRUE</varname> if the bounding box of raster A overlaps the bounding box of raster B.</para>
+                       <para>The <varname>&amp;&amp;</varname> operator returns <varname>TRUE</varname> if the bounding box of raster A intersects the bounding box of raster B.</para>
 
                        <note><para>This operand will make use of any indexes that may be available on the
                                rasters.</para></note>
@@ -8597,10 +8597,10 @@ WHERE rid = 2;
                  <refsection>
                        <title>Examples</title>
 
-                       <programlisting>SELECT A.rid As a_rid, B.rid As b_rid, A.rast &amp;&amp; B.rast As overlap
+                       <programlisting>SELECT A.rid As a_rid, B.rid As b_rid, A.rast &amp;&amp; B.rast As intersect
  FROM dummy_rast AS A CROSS JOIN dummy_rast AS B LIMIT 3;
 
- a_rid | b_rid | overlap
+ a_rid | b_rid | intersect
 -------+-------+---------
      2 |     2 | t
      2 |     3 | f
index f6d03882554515e53ec928f11c79628496f07d5e..a2fb3e55c46789f9cc0c8622a39f38c79ce9a659 100644 (file)
@@ -3124,7 +3124,7 @@ CREATE OR REPLACE FUNCTION _st_intersects(rast1 raster, nband1 integer, rast2 ra
 
 CREATE OR REPLACE FUNCTION st_intersects(rast1 raster, nband1 integer, rast2 raster, nband2 integer)
        RETURNS boolean
-       AS $$ SELECT $1 && $3 AND CASE WHEN $2 IS NULL OR $4 IS NULL THEN TRUE ELSE _st_intersects($1, $2, $3, $4) END $$
+       AS $$ SELECT $1 && $3 AND CASE WHEN $2 IS NULL OR $4 IS NULL THEN st_intersects(st_convexhull($1), st_convexhull($3)) ELSE _st_intersects($1, $2, $3, $4) END $$
        LANGUAGE 'sql' IMMUTABLE
        COST 1000;