Name

ST_PointFromWKB — Returns a Point object given its Well-known text Representation.

Synopsis

geometry ST_PointFromWKB(varchar WKB);

geometry ST_PointFromWKB(varchar WKB, integer SRID);

Alias

PointFromWKB

Description

Creates a Point from well-known binary representation of a Point and a Spatial Reference System ID (SRID). If the SRID is not provides it defaults to -1. If WKB passed in is not a POINT, then null is returned.

Coordinate Dimensions
2D3DM
Spatial Standards Support
OGC SFS for SQL. 1.1 (1999)OGC SFS for SQL. 1.1.0 (2005)OGC SFS for SQL. 1.2.0 (2006)SQL-MM Part 3
3.2.7.27.2.7.1-6.1.9

Examples

SELECT ST_AsEWKT(ST_PointFromWKB(ST_GeomFromText('POINT (0 0 2 8)')));
--Result
POINT (0 0 2 8)

SELECT ST_AsEWKT(ST_PointFromWKB(ST_GeomFromText('POINT (0 0 2 8)'),25830)) As mypoint;
--Result
MYPOINT  
SRID=25830;POINT (0 0 2 8)

Related functions

ST_GeomFromText