[postgis-commits] svn - r3647 - trunk/doc
postgis-commits at postgis.refractions.net
postgis-commits at postgis.refractions.net
Thu Feb 5 12:01:38 PST 2009
Author: kneufeld
Date: 2009-02-05 12:01:37 -0800 (Thu, 05 Feb 2009)
New Revision: 3647
Modified:
trunk/doc/reference_new.xml
Log:
Updated ST_DumpRings description and example.
Modified: trunk/doc/reference_new.xml
===================================================================
--- trunk/doc/reference_new.xml 2009-02-05 12:45:25 UTC (rev 3646)
+++ trunk/doc/reference_new.xml 2009-02-05 20:01:37 UTC (rev 3647)
@@ -4629,12 +4629,12 @@
<programlisting>-- Extract all POINTs from a LINESTRING
SELECT ST_AsText(
ST_PointN(
- column1,
+ column1,
generate_series(1, ST_NPoints(column1))
))
FROM ( VALUES ('LINESTRING(0 0, 1 1, 2 2)'::geometry) ) AS foo;
- st_astext
+ st_astext
------------
POINT(0 0)
POINT(1 1)
@@ -5300,7 +5300,7 @@
<para>
Version 1: The
call <programlisting>ST_Affine(geom, a, b, c, d, e, f, g, h, i, xoff, yoff, zoff) </programlisting>
- represents the transformation matrix <programlisting>/ a b c xoff \
+ represents the transformation matrix <programlisting>/ a b c xoff \
| d e f yoff |
| g h i zoff |
\ 0 0 0 1 /</programlisting> and the vertices are transformed as
@@ -5311,7 +5311,7 @@
transformation.</para>
<para>Version 2: Applies a 2d affine transformation to the geometry. The
call <programlisting>ST_Affine(geom, a, b, d, e, xoff, yoff)</programlisting>
- represents the transformation matrix <programlisting>/ a b 0 xoff \ / a b xoff \
+ represents the transformation matrix <programlisting>/ a b 0 xoff \ / a b xoff \
| d e 0 yoff | rsp. | d e yoff |
| 0 0 1 0 | \ 0 0 1 /
\ 0 0 0 1 /</programlisting> and the vertices are transformed as
@@ -11393,7 +11393,7 @@
<title>Description</title>
<para>The convex hull of a geometry represents the minimum convex
geometry that encloses all geometries within the set.</para>
-
+
<para>One can think of the convex hull as the geometry you get by wrapping an elastic
band around a set of geometries. This is different from a concave hull (not currently supported)
which is analogous to shrink-wrapping your geometries.</para>
@@ -11731,12 +11731,8 @@
<refnamediv>
<refname>ST_DumpRings</refname>
- <refpurpose>This is a set-returning function (SRF). It returns a set of
- geometry_dump rows, formed by a geometry (geom) and an array of
- integers (path). The 'path' field holds the polygon ring index,
- contains a single element: 0 for the shell, hole number for holes.
- The 'geom' field contains the corresponding ring as a
- polygon.</refpurpose>
+ <refpurpose>Returns a set of <varname>geometry_dump</varname> rows, representing
+ the exterior and interior rings of a polygon.</refpurpose>
</refnamediv>
<refsynopsisdiv>
@@ -11752,11 +11748,10 @@
<title>Description</title>
<para>This is a set-returning function (SRF). It returns a set of
- geometry_dump rows, formed by a geometry (geom) and an array of
- integers (path). The 'path' field holds the polygon ring index,
- contains a single element: 0 for the shell, hole number for holes.
- The 'geom' field contains the corresponding ring as a
- polygon.</para>
+ <varname>geometry_dump</varname> rows, defined as an <varname>integer[]</varname>
+ and a <varname>geometry</varname>, aliased "path" and "geom" respectively.
+ The "path" field holds the polygon ring index containing a single integer: 0 for the shell, >0 for holes.
+ The "geom" field contains the corresponding ring as a polygon.</para>
<para>Availability: PostGIS 1.1.3. Requires PostgreSQL 7.3 or higher.</para>
<note><para>This only works for POLYGON geometries. It will not work for MULTIPOLYGONS</para></note>
@@ -11773,28 +11768,25 @@
<title>Examples</title>
<programlisting>SELECT sometable.field1, sometable.field1,
- (ST_DumpRings(sometable.the_geom)).geom As the_geom
+ (ST_DumpRings(sometable.the_geom)).geom As the_geom
FROM sometableOfpolys;
SELECT ST_AsEWKT(geom) As the_geom, path
- FROM ST_DumpRings(
- ST_GeomFromEWKT('POLYGON((-8149064 5133092 1,-8149064 5132986 1,-8148996 5132839 1,-8148972 5132767 1,-8148958 5132508 1,-8148941 5132466 1,-8148924 5132394 1,
- -8148903 5132210 1,-8148930 5131967 1,-8148992 5131978 1,-8149237 5132093 1,-8149404 5132211 1,-8149647 5132310 1,-8149757 5132394 1,
- -8150305 5132788 1,-8149064 5133092 1),
- (-8149362 5132394 1,-8149446 5132501 1,-8149548 5132597 1,-8149695 5132675 1,-8149362 5132394 1))')
- ) as foo;
- the_geom | path
------------------------------------------------------------------------------------------------------------------------------------------------
- POLYGON((-8149064 5133092 1,-8149064 5132986 1,-8148996 5132839 1,-8148972 5132767 1,-8148958 5132508 1, | {0}
- -8148941 5132466 1,-8148924 5132394 1,
- -8148903 5132210 1,-8148930 5131967 1,
- -8148992 5131978 1,-8149237 5132093 1,
- -8149404 5132211 1,-8149647 5132310 1,-8149757 5132394 1,-8150305 5132788 1,-8149064 5133092 1))
- POLYGON((-8149362 5132394 1,-8149446 5132501 1, | {1}
- -8149548 5132597 1,-8149695 5132675 1,-8149362 5132394 1))
-
-
-</programlisting>
+ FROM ST_DumpRings(
+ ST_GeomFromEWKT('POLYGON((-8149064 5133092 1,-8149064 5132986 1,-8148996 5132839 1,-8148972 5132767 1,-8148958 5132508 1,-8148941 5132466 1,-8148924 5132394 1,
+ -8148903 5132210 1,-8148930 5131967 1,-8148992 5131978 1,-8149237 5132093 1,-8149404 5132211 1,-8149647 5132310 1,-8149757 5132394 1,
+ -8150305 5132788 1,-8149064 5133092 1),
+ (-8149362 5132394 1,-8149446 5132501 1,-8149548 5132597 1,-8149695 5132675 1,-8149362 5132394 1))')
+ ) as foo;
+ path | the_geom
+----------------------------------------------------------------------------------------------------------------
+ {0} | POLYGON((-8149064 5133092 1,-8149064 5132986 1,-8148996 5132839 1,-8148972 5132767 1,-8148958 5132508 1,
+ | -8148941 5132466 1,-8148924 5132394 1,
+ | -8148903 5132210 1,-8148930 5131967 1,
+ | -8148992 5131978 1,-8149237 5132093 1,
+ | -8149404 5132211 1,-8149647 5132310 1,-8149757 5132394 1,-8150305 5132788 1,-8149064 5133092 1))
+ {1} | POLYGON((-8149362 5132394 1,-8149446 5132501 1,
+ | -8149548 5132597 1,-8149695 5132675 1,-8149362 5132394 1))</programlisting>
</refsection>
<!-- Optionally add a "See Also" section -->
@@ -12031,7 +12023,7 @@
<para><xref linkend="ST_Union" /></para>
</refsection>
</refentry>
-
+
<refentry id="ST_MinimumBoundingCircle">
<refnamediv>
<refname>ST_MinimumBoundingCircle</refname>
@@ -12057,7 +12049,7 @@
<title>Description</title>
<para>Returns the smallest circle polygon that can fully contain a geometry. </para>
<note><para>The circle is approximated by a polygon with a default of 48 segments per quarter circle. This number can be increased with little performance penalty to obtain a more accurate result.</para></note>
-
+
<para>It is often used with MULTI and Geometry Collections.
Although it is not an aggregate - you can use it in conjunction
with ST_Collect to get the minimum bounding cirlce of a set of geometries.
More information about the postgis-commits
mailing list