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>202 / 310See AlsoST_GeomFromEWKT, ST_Perimeter, ST_Perimeter2D7.8.34 ST_PointOnSurfaceST_PointOnSurface — Returns a POINT guaranteed to lie on the surface.Synopsisgeometry ST_PointOnSurface(geometry g1);DescriptionReturns a POINT guaranteed to intersect a surface.This method implements the OpenGIS Simple Features Implementation Specification for SQL 1.1. s3.2.14.2 // s3.2.18.2This method implements the SQL/MM specification. SQL-MM 3: 8.1.5, 9.5.6. According to the specs, ST_PointOnSurfaceworks for surface geometries (POLYGONs, MULTIPOLYGONS, CURVED POLYGONS). So <strong>PostGIS</strong> seems to be extendingwhat the spec allows here. Most databases Oracle,DB II, ESRI SDE seem to only support this function for surfaces. SQL Server2008 like <strong>PostGIS</strong> supports for all common geometries.This function supports 3d and will not drop the z-index.ExamplesSELECT ST_AsText(ST_PointOnSurface(’POINT(0 5)’::geometry));st_astext------------POINT(0 5)(1 row)SELECT ST_AsText(ST_PointOnSurface(’LINESTRING(0 5, 0 10)’::geometry));st_astext------------POINT(0 5)(1 row)SELECT ST_AsText(ST_PointOnSurface(’POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))’::geometry));st_astext----------------POINT(2.5 2.5)(1 row)SELECT ST_AsEWKT(ST_PointOnSurface(ST_GeomFromEWKT(’LINESTRING(0 5 1, 0 0 1, 0 10 2)’)));st_asewkt----------------POINT(0 0 1)(1 row)See AlsoST_Centroid, ST_Point_Inside_Circle

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

Saved successfully!

Ooh no, something went wrong!