<para>Availability: PostGIS 1.0.0RC1. Requires PostgreSQL 7.3 or higher.</para>
<note><para>Prior to 1.3.4, this function crashes if used with geometries that contain CURVES. This is fixed in 1.3.4+</para></note>
- <para>Z_support;</para>
- <para>curve_support;</para>
+ <para>&Z_support;</para>
+ <para>&curve_support;</para>
</refsection>
<refsection>
<title>Examples</title>
<programlisting>SELECT sometable.field1, sometable.field1,
- (ST_Dump(sometable.the_geom)).geom As the_geom
+ (ST_Dump(sometable.the_geom)).geom AS the_geom
FROM sometable;
--Break a compound curve into its constituent linestrings and circularstrings
SELECT ST_AsEWKT(a.geom), ST_HasArc(a.geom)
- FROM ( SELECT (ST_Dump(p_geom)).geom as geom
- FROM (SELECT ST_GeomFromEWKT('COMPOUNDCURVE(CIRCULARSTRING(0 0, 1 1, 1 0),(1 0, 0 1))') as p_geom) as b
- ) as a;
- st_asewkt | st_hasarc
+ FROM ( SELECT (ST_Dump(p_geom)).geom AS geom
+ FROM (SELECT ST_GeomFromEWKT('COMPOUNDCURVE(CIRCULARSTRING(0 0, 1 1, 1 0),(1 0, 0 1))') AS p_geom) AS b
+ ) AS a;
+ st_asewkt | st_hasarc
-----------------------------+----------
CIRCULARSTRING(0 0,1 1,1 0) | t
LINESTRING(1 0,0 1) | f
-(2 rows)
-
-
-</programlisting>
+(2 rows)</programlisting>
</refsection>
<refsection>
<title>See Also</title>
<para>Converts plain LINESTRING/POLYGONS to CIRCULAR STRINGs and Curved Polygons. Note much fewer points are needed to describe the curved equivalent.</para>
<para>Availability: 1.2.2?</para>
- <para>Z_support;</para>
- <para>curve_support;</para>
+ <para>&Z_support;</para>
+ <para>&curve_support;</para>
</refsection>
-- by returning false if a LinearRing (start and end points are the same)
-- has less than 2 vertices.
gisdb=# SELECT
- st_isvalid('LINESTRING(0 0, 1 1)'),
- st_isvalid('LINESTRING(0 0, 0 0)');
+ ST_IsValid('LINESTRING(0 0, 1 1)'),
+ ST_IsValid('LINESTRING(0 0, 0 0)');
st_isvalid | st_isvalid
-------------+---------
- t | f</programlisting>
+------------+-----------
+ t | f</programlisting>
<para>By default, PostGIS does not apply this validity check on geometry
input, because testing for validity needs lots of CPU time for complex
<programlisting>ALTER TABLE mytable
ADD CONSTRAINT geometry_valid_check
- CHECK (isvalid(the_geom));</programlisting>
+ CHECK (ST_IsValid(the_geom));</programlisting>
<para>If you encounter any strange error messages such as "GEOS
Intersection() threw an error!" or "JTS Intersection() threw an error!"