ST_Polygon generates an ST_Polygon from an ST_LineString and a spatial reference system identifier.
Syntax
db2gse.ST_Polygon(l db2gse.ST_LineString, cr db2gse.coordref)
Return type
db2gse.ST_Polygon
Examples
The following CREATE TABLE statement creates the POLYGON_TEST table, which has a single column, P1.
CREATE TABLE POLYGON_TEST (p1 db2gse.ST_polygon)
The following INSERT statement converts a ring (a linestring that is both closed and simple) into a polygon and inserts it into the P1 column using the ST_LineFromText function within the ST_Polygon function.
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))), db2gse.coordref()..srid(0))) )