> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cockroachlabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Well Known Binary

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](https://docs.cockroachlabs.com/docs/v24.2/cockroach-sql) or [application](https://docs.cockroachlabs.com/docs/v24.2/build-a-java-app-with-cockroachdb).
* 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](https://portal.opengeospatial.org/files/?artifact_id=25355).

The Extended Well Known Binary (*EWKB*) format is the same as WKB, with an [SRID](https://docs.cockroachlabs.com/docs/v24.2/architecture/glossary#srid) representation prepended to the data structure.

## See also

* [Spatial Data Overview](https://docs.cockroachlabs.com/docs/v24.2/spatial-data-overview)
* [Spatial tutorial](https://docs.cockroachlabs.com/docs/v24.2/spatial-tutorial)
* [Spatial indexes](https://docs.cockroachlabs.com/docs/v24.2/spatial-indexes)
* [Spatial and GIS Glossary of Terms](https://docs.cockroachlabs.com/docs/v24.2/architecture/glossary)
* [OpenGIS Implementation Specification for Geographic information - Simple feature access - Part 1: Common architecture](https://portal.opengeospatial.org/files/?artifact_id=25355)
* [Well known text](https://docs.cockroachlabs.com/docs/v24.2/well-known-text)
* [GeoJSON](https://docs.cockroachlabs.com/docs/v24.2/geojson)
* [SRID 4326 - longitude and latitude](https://docs.cockroachlabs.com/docs/v24.2/srid-4326)
* [Introducing Distributed Spatial Data in CockroachDB](https://www.cockroachlabs.com/blog/spatial-data/) (blog post)
* [Using GeoServer with CockroachDB](https://docs.cockroachlabs.com/docs/v24.2/geoserver)
