= PostGIS FAQ = Frequently Asked Questions about PostGIS extension. [[TOC(depth=2, noheading, inline)]] == How to create geometry from hex-encoded WKB using SQL? == This is two-steps operation which can be executed in single SQL statement. The steps include: 1. Convert WKB data in hexadecimal form to raw binary using PostgreSQL function [http://www.postgresql.org/docs/8.3/static/functions-binarystring.html decode]. 2. Construct geometry object from WKB in raw binary form. Example: {{{ #!sql =# SELECT ST_AsText(ST_GeomFromWKB(decode('0101000000e5d022dbf93e2e40dbf97e6abc743540', 'hex'), 4326)); st_astext ---------------------- POINT(15.123 21.456) }}}