This section describes the functions for examining and manipulating GEOMETRY values.
The spatial extension provides additional functions for working with GEOMETRY values, which are documented in the Spatial Functions section.
The table below lists the operators that can be used with GEOMETRY values.
| Operator |
Description |
Example |
Result |
&& |
Returns true if the geometries bounding boxes intersect. Equivalent to ST_IntersectsExtent. |
'POINT(5 5)'::GEOMETRY && 'LINESTRING(0 0, 10 20)'::GEOMETRY |
true |
| Name |
Description |
ST_GeomFromWKB |
Creates a geometry from Well-Known Binary (WKB) representation |
ST_AsWKB |
Returns the Well-Known Binary (WKB) representation of the geometry |
ST_AsWKT |
Returns the Well-Known Text (WKT) representation of the geometry |
ST_Intersects_Extent |
Returns true if the geometries bounding boxes intersect |
ST_CRS |
Returns the Coordinate Reference System (CRS) identifier of the geometry |
ST_SetCRS |
Sets the Coordinate Reference System (CRS) identifier of the geometry |
| Description |
Creates a geometry from Well-Known Binary (WKB) representation |
| Example |
ST_GeomFromWKB('\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xF0?\x00\x00\x00\x00\x00\x00\x00@') |
| Result |
POINT(1 2) |
| Description |
Returns the Well-Known Binary (WKB) representation of the geometry |
| Example |
ST_AsWKB('POINT(1 2)::GEOMETRY') |
| Result |
\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xF0?\x00\x00\x00\x00\x00\x00\x00@ |
| Alias |
ST_AsBinary |
| Description |
Returns the Well-Known Text (WKT) representation of the geometry |
| Example |
ST_AsText('POINT(1 2)'::GEOMETRY) |
| Result |
POINT (1 2) |
| Alias |
ST_AsText |
| Description |
Returns true if the geometries bounding boxes intersect |
| Example |
'POINT(5 5)'::GEOMETRY && 'LINESTRING(0 0, 10 20)'::GEOMETRY |
| Result |
true |
| Alias |
&& |
| Description |
Returns the Coordinate Reference System (CRS) identifier of the geometry |
| Example |
ST_CRS('POINT(1 2)'::GEOMETRY('OGC:CRS84')) |
| Result |
OGC:CRS84 |
| Description |
Sets the Coordinate Reference System (CRS) identifier of the geometry |
| Example |
typeof(ST_SetCRS('POINT(1 2)'::GEOMETRY, 'OGC:CRS84')) |
| Result |
GEOMETRY('OGC:CRS84') |
© 2026 DuckDB Foundation, Amsterdam NL