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
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
----------------------------------------------------- */
.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
</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>
</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>
<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>