User's Guide and Reference

ST_PointOnSurface

ST_PointOnSurface takes both a polygon or a multipolygon and a returns an ST_Point.

Syntax
db2gse.ST_PointOnSurface(s db2gse.ST_Surface)
db2gse.ST_PointOnSurface(ms db2gse.ST_MultiSurface)

Return type

db2gse.ST_Point

Examples

The city engineer needs to create a label point for each of the building footprints.

The building footprints are stored in the BUILDINGFOOTPRINTS table that was created with the following CREATE TABLE statement.

CREATE TABLE BUILDINGFOOTPRINTS (   building_id integer,
                                    lot_id      integer,
                                    footprint   db2gse.ST_MultiPolygon); 

The ST_PointOnSurface function generates a point that is guaranteed to be on the surface of the building footprints. The ST_PointOnSurface function returns a point that the AsBinaryShape function converts to a shape casted to a 1 megabyte character string for use by the application.

SELECT CAST(db2gse.AsBinaryShape(db2gse.ST_PointOnSurface(footprint)) as blob(1m))
FROM BUILDINGFOOTPRINTS; 


[ Top of Page | Previous Page | Next Page ]