12.07.2015 Views

PostGIS 1.5.8 Manual - Fedora Project Packages GIT repositories

PostGIS 1.5.8 Manual - Fedora Project Packages GIT repositories

PostGIS 1.5.8 Manual - Fedora Project Packages GIT repositories

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>PostGIS</strong> <strong>1.5.8</strong> <strong>Manual</strong>222 / 310DescriptionThis is a set-returning function (SRF). It returns a set of geometry_dump rows, formed by a geometry (geom) and an array ofintegers (path). When the input geometry is a simple type (POINT,LINESTRING,POLYGON) a single record will be returnedwith an empty path array and the input geometry as geom. When the input geometry is a collection or multi it will return a recordfor each of the collection components, and the path will express the position of the component inside the collection.ST_Dump is useful for expanding geometries. It is the reverse of a GROUP BY in that it creates new rows. For example it canbe use to expand MULTIPOLYGONS into POLYGONS.Availability: <strong>PostGIS</strong> 1.0.0RC1. Requires PostgreSQL 7.3 or higher.NotePrior to 1.3.4, this function crashes if used with geometries that contain CURVES. This is fixed in 1.3.4+This function supports 3d and will not drop the z-index.This method supports Circular Strings and CurvesExamplesSELECT sometable.field1, sometable.field1,(ST_Dump(sometable.the_geom)).geom AS the_geomFROM sometable;--Break a compound curve into its constituent linestrings and circularstringsSELECT ST_AsEWKT(a.geom), ST_HasArc(a.geom)FROM ( SELECT (ST_Dump(p_geom)).geom AS geomFROM (SELECT ST_GeomFromEWKT(’COMPOUNDCURVE(CIRCULARSTRING(0 0, 1 1, 1 0),(1 0, 01))’) AS p_geom) AS b) AS a;st_asewkt| st_hasarc-----------------------------+----------CIRCULARSTRING(0 0,1 1,1 0) | tLINESTRING(1 0,0 1)| f(2 rows)←↪See Alsogeometry_dump, Section 8.4, ST_Collect, ST_Collect, ST_GeometryN7.9.8 ST_DumpPointsST_DumpPoints — Returns a set of geometry_dump (geom,path) rows of all points that make up a geometry.Synopsisgeometry_dump[]ST_DumpPoints(geometry geom);

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!