User's Guide and Reference

ST_PolyFromText

ST_PolyFromText takes a well-known text representation of type polygon and a spatial reference system identity and returns a polygon.

Syntax

db2gse.ST_PolyFromText(polygonTaggedText Varchar(4000), cr db2gse.coordref)

Return type

db2gse.ST_Polygon

Examples

The following CREATE TABLE statement creates the POLYGON_TEST table with the single polygon column.

CREATE TABLE POLYGON_TEST (pl1 db2gse.ST_Polygon) 

The following INSERT statement inserts a polygon into the polygon column by using the ST_PolyFromText function.

INSERT INTO POLYGON_TEST VALUES (1,
db2gse.ST_PolyFromText('polygon((10.01 20.03,10.52 40.11,30.29 41.56,31.78 10.74,10.01
20.03))', db2gse.coordref()..srid(0))) 


[ Top of Page | Previous Page | Next Page ]