ST_PointFromWKB — Makes a geometry from WKB with the given SRID
geometry ST_GeomFromWKB(
bytea geom)
;
geometry ST_GeomFromWKB(
bytea geom, integer srid)
;
The ST_PointFromWKB
function, takes a well-known binary
representation of geometry and a Spatial Reference System ID (SRID
)
and creates an instance of the appropriate geometry type - in this case, a
POINT
geometry. This function plays the role of the Geometry
Factory in SQL.
If an SRID is not specified, it defaults to 0. NULL
is
returned if the input bytea
does not represent a
POINT
geometry.
This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s3.2.7.2
This method implements the SQL/MM specification. SQL-MM 3: 6.1.9
This function supports 3d and will not drop the z-index.
This method supports Circular Strings and Curves.
SELECT ST_AsText( ST_PointFromWKB( ST_AsEWKB('POINT(2 5)'::geometry) ) ); st_astext ------------ POINT(2 5) (1 row) SELECT ST_AsText( ST_PointFromWKB( ST_AsEWKB('LINESTRING(2 5, 2 6)'::geometry) ) ); st_astext ----------- (1 row)