From fbc70a89b4f6af0fc395409e9f73a7e3f4cf8bb5 Mon Sep 17 00:00:00 2001 From: Kevin Lewis Date: Fri, 6 Dec 2024 09:06:16 +0100 Subject: [PATCH] Adding geospatial datatypes --- content/2.data-modeling/3.fields.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/content/2.data-modeling/3.fields.md b/content/2.data-modeling/3.fields.md index 595ea224..cd97b8fd 100644 --- a/content/2.data-modeling/3.fields.md +++ b/content/2.data-modeling/3.fields.md @@ -10,17 +10,20 @@ Fields are database columns with additional metadata and configuration used by D Directus supports various databases, though each vendor has their own simple data types. To standardize these differences, Directus has a single set of types that are mapped to the vendor-specific ones. -| Group | Types | -| ------------- | -------------------------------------------- | -| Text | `String`, `Text`, `UUID`, `Hash`, `Alias` | -| Numeric | `Integer`, `Big Integer`, `Float`, `Decimal` | -| Boolean | `Boolean` | -| Date and Time | `Timestamp`, `DateTime`, `Date`, `Time` | -| Binary | `Binary` | -| Structured | `JSON`, `CSV` | +| Group | Types | +| ------------- | --------------------------------------------------------------------------------- | +| Text | `String`, `Text`, `UUID`, `Hash`, `Alias` | +| Numeric | `Integer`, `Big Integer`, `Float`, `Decimal` | +| Boolean | `Boolean` | +| Date and Time | `Timestamp`, `DateTime`, `Date`, `Time` | +| Binary | `Binary` | +| Structured | `JSON`, `CSV` | +| Geospatial | `Point`, `LineString`, `Polygon`, `MultiPoint`, `MultiLineString`, `MultiPolygon` | Fields that do not map directly to an actual database column are called "alias" fields, and include presentational fields and certain relational fields. +Geospatial fields are used to store data in [GeoJSON](https://geojson.org/) format. These types are only supported if your database supports spatial extensions. + ## Creating Fields When creating a new field, you must first select an [interface](/data-modeling/interfaces) and provide some basic configuration. Basic configuration will depend on the interface selected, but all fields have some common characteristics.