The ST_PointFromText() function
The ST_PointFromText() function takes a well-known text representation of type point and a spatial reference ID and returns a point.
Syntax
ST_PointFromText(WKT lvarchar, SRID integer)
Return type
ST_Point
Example
The point_test table
is created with the single ST_Point column pt1:
CREATE TABLE point_test (gid smallint,
pt1 ST_Point);
The ST_PointFromText() function
converts the point text coordinates to the ST_Point format before
the INSERT statement inserts the point into the pt1 column:
INSERT INTO point_test VALUES(
1,
ST_PointFromText('point(10.01 20.03)',1000)
);