# Import geospatial data

Geospatial data on Redivis behaves quite similarly to [tabular data](/reference/datasets/create-and-edit-datasets/import-tabular-data.md): each feature is ingested as a single row within a table, alongside any metadata for this feature. This approach mirrors tools like PostGIS, R spatial features, and geopandas, allowing you to query and join your geospatial data, at scale.

[Learn more about geospatial tables on Redivis.](/reference/tables/overview.md#geospatial)

## Supported file types

Redivis supports importing geospatial data from several common GIS formats: GeoJSON(Lines), Shapefile, GeoPackage, Geodatabase, Parquet, and KML. Parquet files with geospatial metadata (often referred to as GeoParquet) are the most performant and robust option, though as a newer standard, these files are less common. For other geospatial file types, Redivis first converts the file to a newline-delimited GeoJSON representation (using the relevant [ogr2ogr driver](https://gdal.org/programs/ogr2ogr.html#ogr2ogr)), and then imports the GeoJSON into a Redivis table.

Each feature will be imported as one row, with the `geometry` column containing the WKT representation for that feature. Additional feature properties will be mapped to variables in your table, with any nested properties flattened using the `.` separator. Multi-layer file types, such as Shapefiles and GeoPackages, will also include a `layer` column to map each feature to its corresponding layer.\
\
Note that Redivis only supports 2-dimensional, unprojected ([WGS84](https://en.wikipedia.org/wiki/World_Geodetic_System)) geometries. If your file contains projection information, the coordinates will automatically be reprojected to WGS84. If there is no projection information in the file, and your data is stored in a different coordinate system, the import may fail. Additionally, any extra dimensions will be stripped during ingest.

<table><thead><tr><th width="130.91059373223425">Type</th><th width="186.21840426514808">Description</th><th>Notes</th></tr></thead><tbody><tr><td>.geojson</td><td>GeoJSON</td><td>Assumes an object with a <code>"Features"</code> property, containing an array of valid geojson features. <br><br>Each feature will be imported as one row, with additional properties mapped to columns in the table. Nested properties will be flattened using the <code>.</code> separator.<br><br>Note that Redivis only supports 2-dimensional, unprojected (<a href="https://en.wikipedia.org/wiki/World_Geodetic_System">WGS84</a>) geometries. Other projections might cause the import to fail, and any extra dimensions will be stripped during ingest.</td></tr><tr><td>.geojsonl .ndgeojson .geojsons</td><td><a href="https://stevage.github.io/ndgeojson/">Newline-delimited GeoJSON</a></td><td>Same as the .geojson specification outlined above, except each feature is given its own line.<br><br>Importing .geojsonl (as opposed to .geojson) will be significantly faster.</td></tr><tr><td>.gdb.zip</td><td>Geodatabase (ESRI)</td><td>Zipped ESRI Geodatabase directory. The source geometries will be reprojected into <a href="https://en.wikipedia.org/wiki/World_Geodetic_System">WGS84</a>.<br><br>Multiple layers will automatically be appended together, and a <code>layer</code> variable in the Redivis table will map a given feature to the layer it came from.</td></tr><tr><td>.gpkg</td><td>GeoPackage</td><td>The source geometries will be reprojected into <a href="https://en.wikipedia.org/wiki/World_Geodetic_System">WGS84</a>. <br><br>Multiple layers will automatically be appended together, and a <code>layer</code> variable in the Redivis table will map a given feature to the layer it came from.</td></tr><tr><td>.kml</td><td>Keyhole Markup Language</td><td>Will be internally converted to .geojson, and then imported as specified above.</td></tr><tr><td>.shp.zip<br>.shz</td><td>Zipped ESRI shapefile directory</td><td><p>Many shapefiles will be collocated with additional files containing metadata and projection information. These files are often essential to parsing the shapefile correctly, and should be uploaded together.<br><br>To do so, create a ZIP directory of the folder containing your  shapefile and supplemental files, with the ending <code>.shp.zip</code> (sometimes the ending <code>.shz</code> is also used).</p><p></p><p>If projection information is available, the source geometries will be reprojected into <a href="https://en.wikipedia.org/wiki/World_Geodetic_System">WGS84</a>. If no projection information is available, your data must be projected as WGS84, or the import will fail.<br></p><p>Multiple layers will automatically be appended together, and a <code>layer</code> variable in the Redivis table will map a given feature to the layer it came from.</p></td></tr><tr><td>.shp</td><td>Shapefile</td><td><p>If you have additional files associated with your shapefile (e.g., .shx, .proj, .dbf), create a ZIP of this folder and import according to the <code>.shp.zip</code> specification above. These files contain important metadata, and your import may fail without them.</p><p></p><p>If you are uploading a lone shapefile, it must use the <a href="https://en.wikipedia.org/wiki/World_Geodetic_System">WGS84</a> (aka EPSG:4326) projection. </p></td></tr><tr><td>.parquet</td><td>GeoParquet</td><td>The <a href="https://geoparquet.org/">GeoParquet specification</a> is a modern standard for working with column-oriented geospatial data. If available, this format is the most robust and performant way to ingest geospatial features into Redivis.</td></tr></tbody></table>

### Geography data in text-delimited files

In addition to uploading geospatial data using one of the formats listed above, you can also import geographic data encoded within a text-delimited file (e.g., a `csv`). In this case, the geographic data should be encoded as strings using the [Well-Known Text (WKT) representation](https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry). This is also the same format used when exporting geography variables as a CSV. WKT in CSVs will be auto-detected during data ingest.

## Quotas & limits

Limits for upload file size, max variables, and other parameters are [specified here](/reference/quotas-and-limits.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.redivis.com/reference/datasets/create-and-edit-datasets/import-geospatial-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
