On this page
Warning:
GA releases for CockroachDB v23.1 are no longer supported. Cockroach Labs will stop providing LTS Assistance Support for v23.1 LTS releases on November 13, 2025. Prior to that date, upgrade to a more recent version to continue receiving support. For more details, refer to the Release Support Policy.
The Well Known Binary format (hereafter WKB) provides a non-textual, binary representation of a geometric shape. It is used to:
- Allow shapes to be transferred between CockroachDB and a SQL client or application.
- Provide a portable binary format that can be read across different platforms.
WKB is obtained by serializing a shape as a sequence of numbers. For more detailed information about the structure of the WKB format, see the diagrams showing WKB integer codes in the OpenGIS Implementation Specification for Geographic information - Simple feature access - Part 1: Common architecture.
The Extended Well Known Binary (EWKB) format is the same as WKB, with an SRID representation prepended to the data structure.
See also
- Spatial Data Overview
- Spatial tutorial
- Spatial indexes
- Spatial and GIS Glossary of Terms
- OpenGIS Implementation Specification for Geographic information - Simple feature access - Part 1: Common architecture
- Well known text
- GeoJSON
- SRID 4326 - longitude and latitude
- Introducing Distributed Spatial Data in Free, Open Source CockroachDB (blog post)
- Using GeoServer with CockroachDB