12.07.2015 Views

PostGIS 1.5.8 Manual - Fedora Project Packages GIT repositories

PostGIS 1.5.8 Manual - Fedora Project Packages GIT repositories

PostGIS 1.5.8 Manual - Fedora Project Packages GIT repositories

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>PostGIS</strong> <strong>1.5.8</strong> <strong>Manual</strong>142 / 310ExamplesSELECT ST_AsBinary(ST_GeomFromText(’POLYGON((0 0,0 1,1 1,1 0,0 0))’,4326));st_asbinary--------------------------------\001\003\000\000\000\001\000\000\000\005\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\360?\000\000\000\000\000\000\360?\000\000\000\000\000\000\360?\000\000\000\000\000\000\360?\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000(1 row)SELECT ST_AsBinary(ST_GeomFromText(’POLYGON((0 0,0 1,1 1,1 0,0 0))’,4326), ’XDR’);st_asbinary--------------------------------\000\000\000\000\003\000\000\000\001\000\000\000\005\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000?\360\000\000\000\000\000\000?\360\000\000\000\000\000\000?\360\000\000\000\000\000\000?\360\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000(1 row)See AlsoST_AsEWKB, ST_AsEWKT, ST_AsText, ST_GeomFromEWKB7.6.2 ST_AsEWKBST_AsEWKB — Return the Well-Known Binary (WKB) representation of the geometry with SRID meta data.Synopsisbytea ST_AsEWKB(geometry g1);bytea ST_AsEWKB(geometry g1, text NDR_or_XDR);DescriptionReturns the Well-Known Binary representation of the geometry with SRID metadata. There are 2 variants of the function.The first variant takes no endian encoding paramater and defaults to little endian. The second variant takes a second argumentdenoting the encoding - using little-endian (’NDR’) or big-endian (’XDR’) encoding.This is useful in binary cursors to pull data out of the database without converting it to a string representation.NoteThe WKB spec does not include the SRID. To get the OGC WKB format use ST_AsBinary

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!