# Data ingest
URL: https://docs.datarobot.com/en/docs/classic-ui/modeling/special-workflows/location-ai/lai-ingest.html

> DataRobot Location AI enables tapping into existing geospatial data sources through a variety of pathways.

# Data ingest

DataRobot Location AI enables tapping into existing geospatial data sources through a variety of pathways, including:

- Native geospatial files
- Spatially-enabled database table
- Auto-recognized spatial coordinates
- User transformations to location variable type

Connecting directly to geospatial data saves the time and resources required for exporting from native geospatial data formats in a Geographic Information System (GIS) or a data preparation tool. DataRobot Location AI’s ability to automatically recognize geospatial data in non-native formats also allows non-traditional Geospatial Analysts to work explicitly with spatial data.

## Native geospatial data

DataRobot Location AI supports ingest of these native geospatial data formats:

- ESRI Shapefiles
- GeoJSON
- ESRI File Geodatabase
- Well Known Text (embedded in table column)
- PostGIS Databases

Native geospatial file formats are uploaded to DataRobot in [the same way](https://docs.datarobot.com/en/docs/classic-ui/data/import-data/import-to-dr.html) as non-geospatial formats—such as drag-and-drop, URL upload, and using the AI Catalog.

### ESRI Shapefiles

[ESRI Shapefiles](https://en.wikipedia.org/wiki/Shapefile) are a common native geospatial format, created in the late-1990s and still in wide use today. Shapefiles are a multifile format that require, at a minimum, the `.shp`, `.shx`, and `.dbf` extensions for completion. Because of the multifile nature of the format, DataRobot Location AI accepts ZIP archived files that include these extensions and the additional `.prj` extension describing the [Coordinate Reference System (CRS)](https://en.wikipedia.org/wiki/Spatial_reference_system) for the data.

### GeoJSON

[GeoJSON](https://en.wikipedia.org/wiki/GeoJSON) is a more recent geospatial file format, often used in web mapping applications, and was submitted as a specification by the Internet Engineering Task Force (IETF). Unlike ESRI Shapefiles, GeoJSON is a single file format that describes the [Coordinate Reference System (CRS)](https://en.wikipedia.org/wiki/Spatial_reference_system) within the file itself.

### ESRI File Geodatabase

[ESRI File Geodatabase](https://www.loc.gov/preservation/digital/formats/fdd/fdd000294.shtml) is a proprietary format that approximates a database through a nested folder structure. Location AI can read a File Geodatabase directory (with extension `.gdb`) in a ZIP archive with extension `.gdb.zip`. Location AI reads the first layer in a Geodatabase file.

### Well Known Text

[Well Known Text (WKT)](https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry) is a markup language described in the Open Geospatial Consortium’s (OGC) [Simple Feature Access specification](https://www.ogc.org/standards/sfa). WKT is a versatile representation of vector geospatial geometries and can be utilized in any of DataRobot AutoML’s existing file types as a feature describing the geometry associated with a row. See the “WKT” column in the figure below.

### PostGIS Databases

Configuring PostGIS ingest follows the same workflow as non-geospatial databases.

## Auto-recognition of location data

In addition to native geospatial data ingest, DataRobot Location AI can automatically detect location data within non-geospatial formats. DataRobot Location AI will automatically recognize location variables when the columns contain the name latitude and longitude and contain values in these formats:

- Decimal degrees
- Degrees minutes seconds

DataRobot marks geometry features created as the result of auto-recognized spatial coordinates with an icon in the Data page.

## User transformation to location data

When spatial coordinates embedded in non-geospatial file formats are not recognized, you can still use DataRobot [variable type transform](https://docs.datarobot.com/en/docs/classic-ui/data/transform-data/feature-transforms.html#variable-type-transformations) functionality to create a location feature. To transform data into a location feature:

1. Navigate to one of the parent coordinate features and expand the feature listing; selectVar Type Transformfrom the feature menu.
2. In the Numeric/Categorical Transformation dialog, selectLocationfrom theTransform Numeric/Categoricalto dropdown.
3. Two additional dropdown menus appear—LatitudeandLongitude. Select from the existing feature set to specify the parent coordinates.
4. ClickCreate feature.

The new feature appears after its parent feature as a new row in the Data table, noted with an icon indicating it is user-created.

## Location variable type

In addition to the traditional variable types of numeric, categorical, and date, Location AI adds a location variable type to provide explicit treatment of spatial data in DataRobot models.

The location variable type supports the 2d geometric primitives as specified in the OGC Simple Feature Access specification and some multipart geometries. These include support for:

- Point/MultiPoint
- LineString/MultiLineString
- Polygon/MultiPolygon

Location variables improve DataRobot’s ability to handle location data throughout the AutoML workflow, including model blueprints, feature importance calculations, and visualizations.

---
