ST_PointOnSurface utilise en entrée un polygone ou un multipolygone, et renvoie un point.
Syntaxe
db2gse.ST_PointOnSurface(s db2gse.ST_Surface)
db2gse.ST_PointOnSurface(ms db2gse.ST_MultiSurface)
Type de retour
db2gse.ST_Point
Exemples
Le directeur des services techniques de la ville doit créer un point doté d'un label pour chaque bâti.
Les bâtis sont enregistrés dans la table BUILDINGFOOTPRINTS créée avec l'instruction CREATE TABLE ci-après.
CREATE TABLE BUILDINGFOOTPRINTS ( building_id integer, lot_id integer, footprint db2gse.ST_MultiPolygon);
La fonction ST_PointOnSurface génère un point qui se trouve avec certitude sur le bâti.
SELECT db2gse.ST_PointOnSurface(footprint) FROM BUILDINGFOOTPRINTS;