From: Regina Obe Date: Tue, 25 Oct 2016 18:38:56 +0000 (+0000) Subject: get rid of invalid link and obsolete statements about ST_Collect X-Git-Tag: 2.4.0alpha~223 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c326eea22f710d27ecdc091c831e0e81b1421505;p=postgis get rid of invalid link and obsolete statements about ST_Collect git-svn-id: http://svn.osgeo.org/postgis/trunk@15214 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/reference_processing.xml b/doc/reference_processing.xml index 2b27710f0..84e3ffd21 100644 --- a/doc/reference_processing.xml +++ b/doc/reference_processing.xml @@ -472,13 +472,10 @@ SELECT ST_ClipByBox2D(the_geom, ST_MakeEnvelope(0,0,10,10)) FROM mytab; input geometries. Output type can be a MULTI* or a GEOMETRYCOLLECTION. - ST_Collect and ST_Union are often interchangeable. - ST_Collect is in general orders of magnitude faster than ST_Union - because it does not try to dissolve boundaries or validate that a constructed MultiPolgon doesn't - have overlapping regions. It merely rolls up - single geometries into MULTI and MULTI or mixed geometry types - into Geometry Collections. Unfortunately geometry collections are - not well-supported by GIS tools. To prevent ST_Collect from + ST_Collect and ST_Union are often interchangeable except that ST_Collect will always return a GeometryCollection or MULTI geometry + and ST_Union may return single geometries when it dissolves boundaries. ST_Union will also split linestrings at node intersections, whereas ST_Collect + will never split linestrings and in turn just return as MULTILINESTRING. + To prevent ST_Collect from returning a Geometry Collection when collecting MULTI geometries, one can use the below trick that utilizes to expand the MULTIs out to singles and then regroup them. @@ -492,9 +489,8 @@ SELECT ST_ClipByBox2D(the_geom, ST_MakeEnvelope(0,0,10,10)) FROM mytab; Examples - Aggregate example (http://postgis.refractions.net/pipermail/postgis-users/2008-June/020331.html) - SELECT stusps, - ST_Multi(ST_Collect(f.the_geom)) as singlegeom + Aggregate example + SELECT stusps, ST_Collect(f.the_geom) as singlegeom FROM (SELECT stusps, (ST_Dump(the_geom)).geom As the_geom FROM somestatetable ) As f