</listitem>
</varlistentry>
- <varlistentry id="IsValid">
- <term>ST_isvalid(geometry)</term>
-
- <listitem>
- <para>returns true if this geometry is valid.</para>
- </listitem>
- </varlistentry>
-
<varlistentry>
<term>ST_expand(geometry, float)</term>
</listitem>
</varlistentry>
- <varlistentry>
- <term>ST_IsValid</term>
-
- <listitem>
- <para>Test if an ST_Geometry value is well formed.</para>
-
- <note>
- <para>SQL-MM defines the result of ST_IsValid(NULL) to be 0, while
- PostGIS returns NULL.</para>
- </note>
-
- <para>SQL-MM defines the result of ST_IsValid(NULL) to be 1</para>
-
- <para>SQL-MM 3: 5.1.9</para>
- </listitem>
- </varlistentry>
-
<varlistentry>
<term>ST_LineFromText</term>
<para><xref linkend="GeometryType" /></para>
</refsection>
</refentry>
-
+ <varlistentry>
+ <term>ST_IsValid</term>
+
+ <listitem>
+ <para>Test if an ST_Geometry value is well formed.</para>
+
+ <note>
+ <para>SQL-MM defines the result of ST_IsValid(NULL) to be 0, while
+ PostGIS returns NULL.</para>
+ </note>
+
+ <para>SQL-MM defines the result of ST_IsValid(NULL) to be 1</para>
+
+ <para>SQL-MM 3: 5.1.9</para>
+ </listitem>
+ </varlistentry>
<refentry id="ST_IsClosed">
<refnamediv>
<refname>ST_IsClosed</refname>
<para><xref linkend="ST_IsRing" /></para>
</refsection>
</refentry>
+
+ <refentry id="ST_IsValid">
+ <refnamediv>
+ <refname>ST_IsValid</refname>
+
+ <refpurpose>Returns <varname>true</varname> if the
+ <varname>ST_Geometry</varname> is well formed.
+ </refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>boolean <function>ST_IsValid</function></funcdef>
+
+ <paramdef><type>geometry </type> <parameter>g</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsection>
+ <title>Description</title>
+
+ <para>Test if an ST_Geometry value is well formed. For geometries that are invalid,
+ the PostgreSQL NOTICE will provide details of why it is not valid.</para>
+ <note>
+ <para>SQL-MM defines the result of ST_IsValid(NULL) to be 0, while
+ PostGIS returns NULL.</para>
+ </note>
+
+ <para><inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/check.png" />
+ </imageobject>
+ </inlinemediaobject> This method implements the <ulink
+ url="http://www.opengeospatial.org/standards/sfs">OpenGIS Simple Features
+ Implementation Specification for SQL.</ulink></para>
+
+ <para><inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/check.png" />
+ </imageobject>
+ </inlinemediaobject> This method implements the SQL/MM specification:
+ SQL-MM 3: 5.1.9</para>
+
+ </refsection>
+
+ <refsection>
+ <title>Examples</title>
+
+ <programlisting>SELECT ST_IsValid(ST_GeomFromText('LINESTRING(0 0, 1 1)')) As good_line,
+ ST_IsValid(ST_GeomFromText('POLYGON((0 0, 1 1, 1 2, 1 1, 0 0))')) As bad_poly
+--results
+NOTICE: Self-intersection at or near point 0 0
+ good_line | bad_poly
+-----------+----------
+ t | f
+</programlisting>
+ </refsection>
+
+ <refsection>
+ <title>See Also</title>
+
+ <para><xref linkend="ST_Summary" /></para>
+ </refsection>
+ </refentry>
<refentry id="ST_NDims">
<refnamediv>