Getting Started
Migrating spatial data into and out of CockroachDB
Reference
- Refer to
Spatial objects
Data representations
Spatial functions
In addition to the , we have written additional documentation for the following functions, including examples:Known limitations
- Not all PostGIS spatial functions are supported.
- The
AddGeometryColumnonly allows constant arguments. - The
AddGeometryColumnspatial function only allows thetruevalue for itsuse_typmodparameter. - CockroachDB does not support the
@operator. Instead of using@in spatial expressions, we recommend using the inverse, with~. For example, instead ofa @ b, useb ~ a. - CockroachDB does not yet support s into the . This limitation also blocks the
ogr2ogr -f PostgreSQLfile conversion command. - CockroachDB does not yet support k-nearest neighbors.
- CockroachDB does not support using to refer to with type modifiers (e.g.,
public.geometry(linestring, 4326)). Instead, use fully-unqualified names to refer to data types with type modifiers (e.g.,geometry(linestring,4326)). - Defining a custom SRID by inserting rows into is not currently supported.
- Clusters that mix
s390xwith other CPU architectures are unsupported for geospatial workloads. Due to differences in how trigonometric functions are computed ons390xsystems, geospatial queries in heterogeneous clusters withs390xare likely to get incorrect results. This can include taking a backup on one architecture and restoring it on another. - are disabled on ARM Macs due to an issue with macOS code signing for the GEOS libraries. Users needing spatial features on an ARM Mac may instead use Rosetta to or use the distribution.

