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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>PostGIS</strong> <strong>1.5.8</strong> <strong>Manual</strong>111 / 310Examples--If you have a regular polygonSELECT gid, field1, field2, ST_NumInteriorRings(the_geom) AS numholesFROM sometable;--If you have multipolygons--And you want to know the total number of interior rings in the MULTIPOLYGONSELECT gid, field1, field2, SUM(ST_NumInteriorRings(the_geom)) AS numholesFROM (SELECT gid, field1, field2, (ST_Dump(the_geom)).geom As the_geomFROM sometable) As fooGROUP BY gid, field1,field2;See AlsoST_NumInteriorRing7.4.23 ST_NumInteriorRingST_NumInteriorRing — Return the number of interior rings of the first polygon in the geometry. Synonym to ST_NumInteriorRings.Synopsisinteger ST_NumInteriorRing(geometry a_polygon);DescriptionReturn the number of interior rings of the first polygon in the geometry. Synonym to ST_NumInteriorRings. The OpenGIS specsare ambiguous about the exact function naming, so we provide both spellings.This method implements the SQL/MM specification. SQL-MM 3: 8.2.5See AlsoST_NumInteriorRings7.4.24 ST_NumPointsST_NumPoints — Return the number of points in an ST_LineString or ST_CircularString value.Synopsisinteger ST_NumPoints(geometry g1);DescriptionReturn the number of points in an ST_LineString or ST_CircularString value. Prior to 1.4 only works with Linestrings as thespecs state. From 1.4 forward this is an alias for ST_NPoints which returns number of vertexes for not just line strings. Considerusing ST_NPoints instead which is multi-purpose and works with many geometry types.This method implements the OpenGIS Simple Features Implementation Specification for SQL 1.1.This method implements the SQL/MM specification. SQL-MM 3: 7.2.4

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

Saved successfully!

Ooh no, something went wrong!