User's Guide and Reference

ST_PointFromText

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

Syntax

db2gse.ST_PointFromText(pointTaggedText Varchar(4000), cr db2gse.coordref)

Return type

db2gse.ST_Point

Examples

The following CREATE TABLE statement creates the POINT_TEST table, which has a single point column, PT1.

CREATE TABLE POINT_TEST (pt1 db2gse.ST_Point)

Before the INSERT statement inserts the point into the PT1 column, the ST_PointFromText function converts the point text coordinates to the point format.

INSERT INTO POINT_TEST VALUES (
       db2gse.ST_PointFromText ('point(10.01 20.03)', db2gse.coordref()..srid(0))) 


[ Top of Page | Previous Page | Next Page ]