]> granicus.if.org Git - postgis/commitdiff
Moved ST_Crosses into new reference_new.xml file, complete with images.
authorKevin Neufeld <kneufeld.ca@gmail.com>
Wed, 16 Jul 2008 05:03:28 +0000 (05:03 +0000)
committerKevin Neufeld <kneufeld.ca@gmail.com>
Wed, 16 Jul 2008 05:03:28 +0000 (05:03 +0000)
Updated css to use fixed-width fonts for programlistings.

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

doc/html/images/st_crosses-math.gif [new file with mode: 0644]
doc/html/images/st_crosses01.gif [new file with mode: 0644]
doc/html/images/st_crosses02.gif [new file with mode: 0644]
doc/html/images/st_crosses03.gif [new file with mode: 0644]
doc/html/images/st_crosses04.gif [new file with mode: 0644]
doc/html/style.css
doc/reference.xml
doc/reference_new.xml

diff --git a/doc/html/images/st_crosses-math.gif b/doc/html/images/st_crosses-math.gif
new file mode 100644 (file)
index 0000000..306d119
Binary files /dev/null and b/doc/html/images/st_crosses-math.gif differ
diff --git a/doc/html/images/st_crosses01.gif b/doc/html/images/st_crosses01.gif
new file mode 100644 (file)
index 0000000..80bec23
Binary files /dev/null and b/doc/html/images/st_crosses01.gif differ
diff --git a/doc/html/images/st_crosses02.gif b/doc/html/images/st_crosses02.gif
new file mode 100644 (file)
index 0000000..dfe03e6
Binary files /dev/null and b/doc/html/images/st_crosses02.gif differ
diff --git a/doc/html/images/st_crosses03.gif b/doc/html/images/st_crosses03.gif
new file mode 100644 (file)
index 0000000..95f0f21
Binary files /dev/null and b/doc/html/images/st_crosses03.gif differ
diff --git a/doc/html/images/st_crosses04.gif b/doc/html/images/st_crosses04.gif
new file mode 100644 (file)
index 0000000..afefdb5
Binary files /dev/null and b/doc/html/images/st_crosses04.gif differ
index 3a688e1e9bf42b7ecc0cc87ab8b73356bfb1ca93..2f04e409fce6ea7e7e40808e7fc7bc4127d4be5d 100644 (file)
@@ -20,6 +20,7 @@ h2 { font-size: 22px; line-height: 22px; margin-bottom: 21px;}
 h3 { font-size: 16px; line-height: 18px; margin-bottom: 16px;}
 h4 { font-size: 14px; line-height: 16px; margin-bottom: 14px;}
 h5 { font-size: 13px; line-height: 10px; margin-bottom: 13px;}
+table, td { border: 0; }
 
 
 /* 3. Block Formatted
@@ -27,7 +28,7 @@ h5 { font-size: 13px; line-height: 10px; margin-bottom: 13px;}
 pre, .literallayout { border-right-width: 0px; border-left-width: 0px; border-bottom-width: 2px; border-top-width: 2px; font-family: "DejaVu Sans", "Lucida Grande", "Verdana", Courier, mono; line-height: 16px; border-color: #f7931e; border-style: solid; font-size: 11px; margin-bottom: 10px; margin-top: 10px; overflow: auto; padding: 10px; background: #f8f8f9; -moz-border-radius: 2px; -webkit-border-radius: 2px;}
 .note { border-left-width: 0px; border-bottom-width: 2px; border-right-width: 0px; border-top-width: 2px; width: 80%; border-color: #a2d545; border-style: solid; font-size: 11px; margin-bottom: 10px; margin-top: 10px; overflow: auto; padding: 10px; background: #e4f7dd; -moz-border-radius: 2px; -webkit-border-radius: 2px;}
 code { border-right-style: solid; border-right-color: #79791a; border-left-color: #79791b; border-left-style: solid; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px; border-top-width: 0px; padding-left: 3px; padding-bottom: 1px; padding-right: 3px; padding-top: 1px; font-family: "Courier New", Courier, Monaco, monospace; color: #fefff7; background: #9b9e96; -moz-border-radius: 2px; -webkit-border-radius: 2px;}
-
+.programlisting {font-family: "Courier New", Courier, Monaco, monospace;}
 
 /* 4. Docbook Specifics
 ----------------------------------------------------- */
@@ -37,4 +38,6 @@ code { border-right-style: solid; border-right-color: #79791a; border-left-color
 .chapter { margin-top: 60px; }
 .sect1 { margin-top: 50px; }
 .sect2 { margin-top: 40px; }
-.sect3 { margin-top: 30px; }
\ No newline at end of file
+.sect3 { margin-top: 30px; }
+.caption p {font-style: italic; font-size: 90%;}
+.remark { background: #ffff00; }
\ No newline at end of file
index 87afac4e27cd018cbfa493d4db1414f430d30caa..1952d58d75aae6c341377ecfcb6f4a5ea8c53ecf 100644 (file)
           </listitem>
         </varlistentry>
 
-        <varlistentry>
-          <term>ST_Crosses(A geometry, B geometry)</term>
-
-          <listitem>
-            <para>Returns TRUE if the Geometries "spatially cross".</para>
-
-            <para>Performed by the GEOS module</para>
-
-            <para>Do not call with a GeometryCollection as an argument</para>
-
-            <para>This function call will automatically include a bounding box
-            comparison that will make use of any indexes that are available on
-            the geometries. To avoid index use, use the function
-            _ST_Crosses.</para>
-
-            <para>NOTE: this is the "allowable" version that returns a
-            boolean, not an integer.</para>
-
-            <para>OGC SPEC s2.1.1.2 // s2.1.13.3 - a.Relate(b,
-            'T*T******')</para>
-          </listitem>
-        </varlistentry>
-
         <varlistentry>
           <term>ST_Within(A geometry, B geometry)</term>
 
@@ -2792,17 +2769,6 @@ WHERE n*100.00/length &lt; 1;
         </listitem>
       </varlistentry>
 
-      <varlistentry>
-        <term>ST_Crosses</term>
-
-        <listitem>
-          <para>Test if an ST_Geometry value spatially crosses another
-          ST_Geometry value.</para>
-
-          <para>SQL-MM 3: 5.1.29</para>
-        </listitem>
-      </varlistentry>
-
       <varlistentry>
         <term>ST_Difference</term>
 
index 3281d7084ea26f5e8b826f3b70b9c5779e617896..358b4e1c37ceaffe4517fa3afe944503874a1f65 100644 (file)
@@ -481,6 +481,194 @@ FROM userpoints ;
   <sect1>
     <title>Spatial Relationships and Measurements</title>
 
+    
+  <refentry id="ST_Crosses">
+    <refnamediv>
+      <refname>ST_Crosses</refname>
+
+      <refpurpose>Returns <varname>TRUE</varname> if the Geometries have some, but not all,
+      interior points in common.</refpurpose>
+    </refnamediv>
+
+    <refsynopsisdiv>
+      <funcsynopsis>
+        <funcprototype>
+          <funcdef>boolean <function>ST_Crosses</function></funcdef>
+
+          <paramdef><type>Geometry </type><parameter>g1</parameter></paramdef>
+
+          <paramdef><type>Geometry </type><parameter>g2</parameter></paramdef>
+        </funcprototype>
+      </funcsynopsis>
+    </refsynopsisdiv>
+
+    <refsection>
+      <title>Description</title>
+
+      <para><function>ST_Crosses</function> takes two geometry objects and
+      returns <varname>TRUE</varname> if their intersection "spatially cross", that is, the
+      geometries have some, but not all interior points in common. The
+      intersection of the interiors of the geometries must not be the empty
+      set and must have a dimensionality less than the the maximum dimension
+      of the two input geometries. Additionally, the intersection of the two
+      geometries must not equal either of the source geometries. Otherwise, it
+      returns <varname>FALSE</varname>.</para>
+
+      <para>In mathematical terms, this is expressed as :</para>
+
+      <remark>TODO: replace this with a MathML equivalent</remark>
+      
+      <informalfigure>
+        <mediaobject>
+          <imageobject>
+            <imagedata fileref="images/st_crosses-math.gif" />
+          </imageobject>
+        </mediaobject>
+      </informalfigure>
+
+      <para>The DE-9IM Intersection Matrix for the two geometries is:</para>
+
+      <itemizedlist>
+        <listitem>
+          <para><markup>T*T******</markup> (for Point/Line, Point/Area, and
+          Line/Area situations)</para>
+        </listitem>
+
+        <listitem>
+          <para><markup>T*****T**</markup> (for Line/Point, Area/Point, and
+          Area/Line situations)</para>
+        </listitem>
+
+        <listitem>
+          <para><markup>0********</markup> (for Line/Line situations)</para>
+        </listitem>
+      </itemizedlist>
+
+      <para>For any other combination of dimensions this predicate returns
+      false.</para>
+
+      <para>The OpenGIS Simple Features Specification defines this predicate
+        only for Point/Line, Point/Area, Line/Line, and Line/Area situations.
+        JTS / GEOS extends the definition to apply to Line/Point, Area/Point and
+        Area/Line situations as well. This makes the relation
+        symmetric.</para>
+
+    <important>
+        <para>Do not call with a GeometryCollection as an argument</para>
+      </important>
+    </refsection>
+    
+    <note>
+      <para>This function call will automatically include a bounding box
+      comparison that will make use of any indexes that are available on the
+      geometries.</para>
+    </note>
+
+    <para>
+      <inlinegraphic class="sfs_compliant" fileref="images/check.png" />
+      This method implements the
+      <ulink url="http://www.opengeospatial.org/standards/sfs">OpenGIS Simple
+      Features Implementation Specification for SQL: 1.1: s2.1.13.3</ulink>
+    </para>
+    
+    <para>
+      <inlinegraphic class="sql_mm_compliant" fileref="images/check.png" />
+      This method implements the SQL/MM specification: SQL-MM 3: 5.1.29
+    </para> 
+    
+    <refsection>
+      <title>Examples</title>
+
+      <para>The following illustrations all return <varname>TRUE</varname>.</para>
+
+      <informaltable>
+        <tgroup cols="2">
+          <tbody>
+            <row>
+              <entry><para><informalfigure>
+                  <mediaobject>
+                    <imageobject>
+                      <imagedata fileref="images/st_crosses01.gif" />
+                    </imageobject>
+
+                    <caption><para>MultiPoint / LineString</para></caption>
+                  </mediaobject>
+                </informalfigure></para></entry>
+
+              <entry><para><informalfigure>
+                  <mediaobject>
+                    <imageobject>
+                      <imagedata fileref="images/st_crosses02.gif" />
+                    </imageobject>
+
+                    <caption><para>MultiPoint / Polygon</para></caption>
+                  </mediaobject>
+                </informalfigure></para></entry>
+            </row>
+
+            <row>
+              <entry><para><informalfigure>
+                  <mediaobject>
+                    <imageobject>
+                      <imagedata fileref="images/st_crosses03.gif" />
+                    </imageobject>
+
+                    <caption><para>LineString / Polygon</para></caption>
+                  </mediaobject>
+                </informalfigure></para></entry>
+
+              <entry><para><informalfigure>
+                  <mediaobject>
+                    <imageobject>
+                      <imagedata fileref="images/st_crosses04.gif" />
+                    </imageobject>
+
+                    <caption><para>LineString / LineString</para></caption>
+                  </mediaobject>
+                </informalfigure></para></entry>
+            </row>
+          </tbody>
+        </tgroup>
+      </informaltable>
+      
+      <para>Consider a situation where a user has two tables: a table of roads
+      and a table of highways.</para>
+
+      <informaltable>
+        <tgroup cols="2">
+          <tbody>
+            <row>
+              <entry><para> <informalexample>
+                  <programlisting>CREATE TABLE roads (
+  id serial NOT NULL,
+  the_geom geometry,
+  CONSTRAINT roads_pkey PRIMARY KEY (road_id)
+);</programlisting>
+                </informalexample> </para></entry>
+
+              <entry><para> <informalexample>
+                  <programlisting>CREATE TABLE highways (
+  id serial NOT NULL,
+  the_gem geometry,
+  CONSTRAINT roads_pkey PRIMARY KEY (road_id)
+);</programlisting>
+                </informalexample> </para></entry>
+            </row>
+          </tbody>
+        </tgroup>
+      </informaltable>
+
+      <para>To determine a list of roads that cross a highway, use a query
+      similiar to:</para>
+
+      <para><informalexample>
+          <programlisting>SELECT roads.id
+FROM roads, highways
+WHERE ST_Crosses(roads.the_geom, highways.the_geom);</programlisting>
+        </informalexample></para>
+    </refsection>
+  </refentry>
+
        <refentry id="ST_Disjoint">
                <refnamediv>
                        <refname>ST_Disjoint</refname>