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>98 / 310See AlsoBox2D, Box3D7.4.7 ST_ExteriorRingST_ExteriorRing — Returns a line string representing the exterior ring of the POLYGON geometry. Return NULL if the geometryis not a polygon. Will not work with MULTIPOLYGONSynopsisgeometry ST_ExteriorRing(geometry a_polygon);DescriptionReturns a line string representing the exterior ring of the POLYGON geometry. Return NULL if the geometry is not a polygon.NoteOnly works with POLYGON geometry typesThis method implements the OpenGIS Simple Features Implementation Specification for SQL 1.1. 2.1.5.1This method implements the SQL/MM specification. SQL-MM 3: 8.2.3, 8.3.3This function supports 3d and will not drop the z-index.Examples--If you have a table of polygonsSELECT gid, ST_ExteriorRing(the_geom) AS eringFROM sometable;--If you have a table of MULTIPOLYGONs--and want to return a MULTILINESTRING composed of the exterior rings of each polygonSELECT gid, ST_Collect(ST_ExteriorRing(the_geom)) AS eringsFROM (SELECT gid, (ST_Dump(the_geom)).geom As the_geomFROM sometable) As fooGROUP BY gid;--3d ExampleSELECT ST_AsEWKT(ST_ExteriorRing(ST_GeomFromEWKT(’POLYGON((0 0 1, 1 1 1, 1 2 1, 1 1 1, 0 0 1))’)));st_asewkt---------LINESTRING(0 0 1,1 1 1,1 2 1,1 1 1,0 0 1)

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

Saved successfully!

Ooh no, something went wrong!