[postgis-commits] svn - r3364 - trunk/doc

postgis-commits at postgis.refractions.net postgis-commits at postgis.refractions.net
Fri Dec 5 11:31:29 PST 2008


Author: robe
Date: 2008-12-05 11:31:28 -0800 (Fri, 05 Dec 2008)
New Revision: 3364

Modified:
   trunk/doc/reference_new.xml
Log:
Clarify use of ST_Relation and include Martin's example of interior intersects

Modified: trunk/doc/reference_new.xml
===================================================================
--- trunk/doc/reference_new.xml	2008-12-05 13:46:50 UTC (rev 3363)
+++ trunk/doc/reference_new.xml	2008-12-05 19:31:28 UTC (rev 3364)
@@ -9003,6 +9003,11 @@
 		<note><para>This is the "allowable" version that returns a
 		boolean, not an integer.  This is defined in OGC spec</para></note>
 		
+		<note><para>This DOES NOT automagically include an index call.  The reason for that
+			is some relationships are anti e.g. Disjoint.  If you are 
+			using a relationship pattern that requires intersection, then include the &amp;&amp; 
+			index call.</para></note>
+		
 		<para>Version 2: Takes geomA and geomB and returns the <ulink url="http://docs.codehaus.org/display/GEOTDOC/Point+Set+Theory+and+the+DE-9IM+Matrix#PointSetTheoryandtheDE-9IMMatrix-9IntersectionMatrix">DE-9IM (dimensionally extended nine-intersection
 		matrix)</ulink></para>
 		
@@ -9034,10 +9039,18 @@
 	
 	  <refsection>
 		<title>Examples</title>
-		<programlisting>SELECT ST_Relate(ST_GeometryFromText('POINT(1 2)'), ST_Buffer(ST_GeometryFromText('POINT(1 2)'),2));
-	 st_relate
-	-----------
-	 0FFFFF212
+		<programlisting>
+--Find all lines that intersect and not touches a poly (interior intersects)
+SELECT l.* , b.name As poly_name
+FROM polys As b 
+	INNER JOIN lines As l 
+	ON (p.the_geom &amp;&amp; b.the_geom 
+	AND ST_Relate(l.the_geom, b.the_geom,'T********'));
+
+SELECT ST_Relate(ST_GeometryFromText('POINT(1 2)'), ST_Buffer(ST_GeometryFromText('POINT(1 2)'),2));
+ st_relate
+-----------
+ 0FFFFF212
 	 
 SELECT ST_Relate(ST_GeometryFromText('LINESTRING(1 2, 3 4)'), ST_GeometryFromText('LINESTRING(5 6, 7 8)'));
  st_relate 
@@ -9046,14 +9059,14 @@
 
 	 
 SELECT ST_Relate(ST_GeometryFromText('POINT(1 2)'), ST_Buffer(ST_GeometryFromText('POINT(1 2)'),2), '0FFFFF212');
-	 st_relate
-	-----------
-	 t
+ st_relate
+-----------
+ t
 	 
 SELECT ST_Relate(ST_GeometryFromText('POINT(1 2)'), ST_Buffer(ST_GeometryFromText('POINT(1 2)'),2), '*FF*FF212');
-	 st_relate
-	-----------
-	 t 
+ st_relate
+-----------
+ t 
 		</programlisting>
 	  </refsection>
 	



More information about the postgis-commits mailing list