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>108 / 3107.4.18 ST_NDimsST_NDims — Returns coordinate dimension of the geometry as a small int. Values are: 2,3 or 4.Synopsisinteger ST_NDims(geometry g1);DescriptionReturns the coordinate dimension of the geometry. <strong>PostGIS</strong> supports 2 - (x,y) , 3 - (x,y,z) or 2D with measure - x,y,m, and 4 - 3Dwith measure space x,y,z,mThis function supports 3d and will not drop the z-index.ExamplesSELECT ST_NDims(ST_GeomFromText(’POINT(1 1)’)) As d2point,ST_NDims(ST_GeomFromEWKT(’POINT(1 1 2)’)) As d3point,ST_NDims(ST_GeomFromEWKT(’POINTM(1 1 0.5)’)) As d2pointm;d2point | d3point | d2pointm---------+---------+----------2 | 3 | 3See AlsoST_CoordDim, ST_Dimension, ST_GeomFromEWKT7.4.19 ST_NPointsST_NPoints — Return the number of points (vertexes) in a geometry.Synopsisinteger ST_NPoints(geometry g1);DescriptionReturn the number of points in a geometry. Works for all geometries.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 Curves

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

Saved successfully!

Ooh no, something went wrong!