This topic describes the ST_AsHEXEWKB function. This function returns the HEXEWKB string that represents a geometry object.
Syntax
text ST_AsHEXEWKB(geometry g1 , text NDRorXDR);
text ST_AsHEXEWKB(geometry g1);
Parameters
Parameter | Description |
---|---|
g1 | The geometry object whose HEXEWKB representation you want to obtain. |
NDRorXDR | The byte order that you want to use. Valid values:
|
Description
- This function supports circular strings and curves.
- This function supports 3D objects and does not discard the z-index of the geometry object that is constructed.
Examples
SELECT ST_AsHEXEWKB(ST_GeomFromText('POLYGON((1 1,1 2,2 2,2 1,1 1))',4326));
st_ashexewkb
---------------------------------------------------------------
0103000020E61000000100000005000000000000000000F03F00000000000.
.0F03F000000000000F03F0000000000000040000000000000004000000000.
.000000400000000000000040000000000000F03F000000000000F03F00000.
.0000000F03F
(1 row)