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

# Spatial Data Overview

export const InternalLink = ({version, path = "", children, ...props}) => {
  let detectedVersion = version || "stable";
  if (typeof window !== 'undefined' && !version) {
    const match = window.location.pathname.match(/\/docs\/([^/]+)/);
    if (match) {
      detectedVersion = match[1];
    }
  }
  const normalizedPath = path.startsWith("/") ? path.slice(1) : path;
  return <a href={`/docs/${detectedVersion}/${normalizedPath}`} {...props}>
      {children}
    </a>;
};

CockroachDB supports efficiently storing and querying spatial data.

See the links below for more information about how to use CockroachDB for spatial use cases.

## Getting Started

* <InternalLink path="install-cockroachdb">Install CockroachDB</InternalLink>
* <InternalLink path="spatial-tutorial">Spatial tutorial</InternalLink>

## Migrating spatial data into and out of CockroachDB

* <InternalLink path="migrate-from-shapefiles">Migrate from Shapefiles</InternalLink>
* <InternalLink path="migrate-from-geojson">Migrate from GeoJSON</InternalLink>
* <InternalLink path="migrate-from-geopackage">Migrate from GeoPackage</InternalLink>
* <InternalLink path="migrate-from-openstreetmap">Migrate from OpenStreetMap</InternalLink>
* <InternalLink path="export-spatial-data">Export Spatial Data</InternalLink>

## Reference

* <InternalLink path="spatial-indexes">Spatial indexes</InternalLink>
* <InternalLink path="architecture/glossary">Spatial and GIS Glossary of Terms</InternalLink>
* <InternalLink path="known-limitations#spatial-support-limitations">Known Limitations</InternalLink>
* <InternalLink path="functions-and-operators#spatial-functions">Spatial functions</InternalLink>
* <InternalLink path="query-spatial-data#compatibility">Client library compatibility</InternalLink>

### Spatial objects

* <InternalLink path="point">POINT</InternalLink>
* <InternalLink path="linestring">LINESTRING</InternalLink>
* <InternalLink path="polygon">POLYGON</InternalLink>
* <InternalLink path="multipoint">MULTIPOINT</InternalLink>
* <InternalLink path="multilinestring">MULTILINESTRING</InternalLink>
* <InternalLink path="multipolygon">MULTIPOLYGON</InternalLink>
* <InternalLink path="geometrycollection">GEOMETRYCOLLECTION</InternalLink>

### Data representations

* <InternalLink path="well-known-text">Well known text</InternalLink>
* <InternalLink path="well-known-binary">Well known binary</InternalLink>
* <InternalLink path="geojson">GeoJSON</InternalLink>
* <InternalLink path="srid-4326">SRID 4326 - longitude and latitude</InternalLink>

### Spatial functions

In addition to the <InternalLink path="functions-and-operators#spatial-functions">generated reference documentation for spatial functions</InternalLink>, we have written additional documentation for the following functions, including examples:

* <InternalLink path="st_contains">`ST_Contains`</InternalLink>
* <InternalLink path="st_convexhull">`ST_ConvexHull`</InternalLink>
* <InternalLink path="st_coveredby">`ST_CoveredBy`</InternalLink>
* <InternalLink path="st_covers">`ST_Covers`</InternalLink>
* <InternalLink path="st_disjoint">`ST_Disjoint`</InternalLink>
* <InternalLink path="st_equals">`ST_Equals`</InternalLink>
* <InternalLink path="st_intersects">`ST_Intersects`</InternalLink>
* <InternalLink path="st_overlaps">`ST_Overlaps`</InternalLink>
* <InternalLink path="st_touches">`ST_Touches`</InternalLink>
* <InternalLink path="st_union">`ST_Union`</InternalLink>
* <InternalLink path="st_within">`ST_Within`</InternalLink>

## See also

* [Introducing Distributed Spatial Data in CockroachDB](https://www.cockroachlabs.com/blog/spatial-data) (blog post)
* <InternalLink path="geoserver">Using GeoServer with CockroachDB</InternalLink>
