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>225 / 310This function supports 3d and will not drop the z-index.ExamplesSELECT sometable.field1, sometable.field1,(ST_DumpRings(sometable.the_geom)).geom As the_geomFROM sometableOfpolys;SELECT ST_AsEWKT(geom) As the_geom, pathFROM 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))See Alsogeometry_dump, Section 8.4, ST_Dump, ST_ExteriorRing, ST_InteriorRingN7.9.10 ST_IntersectionST_Intersection — (T) Returns a geometry that represents the shared portion of geomA and geomB. The geography implementationdoes a transform to geometry to do the intersection and then transform back to WGS84.Synopsisgeometry ST_Intersection( geometry geomA , geometry geomB );geography ST_Intersection( geography geogA , geography geogB );DescriptionReturns a geometry that represents the point set intersection of the Geometries.In other words - that portion of geometry A and geometry B that is shared between the two geometries.If the geometries do not share any space (are disjoint), then an empty geometry collection is returned.ST_Intersection in conjunction with ST_Intersects is very useful for clipping geometries such as in bounding box, buffer, regionqueries where you only want to return that portion of a geometry that sits in a country or region of interest.

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

Saved successfully!

Ooh no, something went wrong!