[postgis-users] WKB format

Dave Blasby dblasby at refractions.net
Thu Jul 4 16:53:45 PDT 2002


Dave Blasby wrote:
> If people really want, I can give you a WKB-to-byteA conversion
> function.

People wanted it - commited to CVS. 

postgis=# select asbinary('POINT(11 11)'::geometry)::bytea;
                                
?column?                                 
--------------------------------------------------------------------------

\000\000\000\000\001@&\000\000\000\000\000\000@&\000\000\000\000\000\000
(1 row)


postgis=# select bytea( asbinary('POINT(1 1)'::geometry));
                                    
bytea                                      
--------------------------------------------------------------------------------

\000\000\000\000\001?\360\000\000\000\000\000\000?\360\000\000\000\000\000\000
(1 row)



I dont really have any way to test it, but it looks like its working.  

dave




More information about the postgis-users mailing list