ST_Polygon génère un objet de type ST_Polygon à partir d'un objet de type ST_LineString.
Syntaxe
db2gse.ST_Polygon(l db2gse.ST_LineString)
Type de retour
db2gse.ST_Polygon
Exemples
L'instruction CREATE TABLE ci-après crée la table POLYGON_TEST qui comporte une seule colonne, P1.
CREATE TABLE POLYGON_TEST (p1 db2gse.ST_polygon)
L'instruction INSERT ci-après convertit un anneau (ligne fermée et simple) en un polygone et l'insère dans la colonne P1 à l'aide de la fonction ST_LineFromText imbriquée dans la fonction ST_Polygon.
INSERT INTO POLYGON_TEST VALUES ( db2gse.ST_Polygon(db2gse.ST_LineFromText('linestring(10.01 20.03,20.94 21.34,35.93 10.04,10.01 20.03)', db2gse.coordref()..srid(0))) )