ST_PointFromWKB()

ST_PointFromWKB creates a POINT geometry from WKB.

Syntax

ST_PointFromWKB(wkb)

Aliases: None.

Arguments

Argument

Description

wkb

VARCHAR, BLOB, or VARBINARY WKB.

Return Value

Returns a GEOMETRY value.

Usage Notes

Only POINT input is accepted; a different geometry kind is rejected. Source evidence: test/distributed/cases/geo/geo_constructors.sql.

Examples

DROP DATABASE IF EXISTS geo_io_example;
CREATE DATABASE geo_io_example;
USE geo_io_example;

SELECT ST_AsText(ST_PointFromWKB(ST_AsWKB(ST_GeomFromText('POINT(5 6)')))) AS point;

DROP DATABASE geo_io_example;

See Also

ST_PointFromText(), ST_AsWKB().