Имя

ST_GeogFromWKB — Creates a geography instance from a Well-Known Binary geometry representation (WKB) or extended Well Known Binary (EWKB).

Синопсис

geography ST_GeogFromWKB(bytea wkb);

Описание

The ST_GeogFromWKB function, takes a well-known binary representation (WKB) of a geometry or PostGIS Extended WKB and creates an instance of the appropriate geography type. This function plays the role of the Geometry Factory in SQL.

If SRID is not specified, it defaults to 4326 (WGS 84 long lat).

This method supports Circular Strings and Curves.

Примеры

Although bytea rep contains single \, these need to be escaped when inserting into a table.

Code
SELECT ST_GeogFromWKB(E'\\001\\002\\000\\000\\000\\002\\000\\000\\000\\037\\205\\353Q\\270~\\\\\\300\\323Mb\\020X\\231C@\\020X9\\264\\310~\\\\\\300)\\\\\\217\\302\\365\\230C@');
Output
LINESTRING(-113.98 39.198,-113.981 39.195)
Figure
Geometry figure for visual-st-geogfromwkb-01