Skip to main content
Version: v3.2 print this page

Spatial datasets in Amorphic enable users to store, manage, and analyze geospatial data with built-in support for various spatial data formats and coordinate reference systems. These datasets provide specialized functionality for handling geographic information, including support for Well-Known Text (WKT), Well-Known Binary (WKB), GeoJSON, and coordinate-based data.

Spatial datasets support multiple target locations including Redshift, S3-Athena, and Lake Formation, with specialized data types and spatial functions optimized for each targets.

Key Features

  • Multiple Spatial Formats: Support for WKT, EWKT, WKB, EWKB, GeoJSON, and coordinate-based data
  • Coordinate Reference Systems: Default CRS support with EPSG:4326 (WGS 84)
  • Interactive Map Visualization: Built-in map preview for spatial data exploration
  • ArcGIS Integration: Direct ingestion from ArcGIS Online through REST APIs with external navigation links
  • SQL Server Integration: Spatial data ingestion from SQL Server with custom ETL for WKB to WKT conversion

Supported Target Locations

Spatial datasets support the following target locations with specialized data types:

  • Redshift: Native geometry and geography data types with spatial functions
  • S3-Athena: binary data type for WKB storage
  • Lake Formation: binary data type with enhanced security and access controls
Note
  • All file types supported by each target location are also supported for spatial datasets.

Creating Spatial Datasets

Set Spatial Dataset Configuration

When creating a new dataset, enable the "Is spatial dataset" toggle to access spatial-specific configuration options.

Once the spatial dataset toggle is enabled, configure the following spatial metadata:

Default CRS/SRID

  • Field Name: SpatialCRS
  • Default Value: 4326 (WGS 84)
  • Description: Sets the default Coordinate Reference System for records without individual CRS specification

External GIS Platform URL

  • Field Name: SourceURL
  • Type: Optional text field
  • Description: Links the dataset to external platforms like ArcGIS Online or other GIS tools
  • Purpose: Provides context and identification for the spatial data source Spatial Configuration

Schema Registration and Spatial Column Mapping

Enhanced Data Types

The schema editor includes target-specific data types optimized for spatial data:

  • Redshift: geometry and geography data types with spatial functions
  • S3-Athena/Lake Formation: binary data type for WKB storage

Spatial Type Assignment

Assign specific spatial purposes to columns using the "Spatial Type" dropdown:

Supported Spatial Types:

  • Well-Known Text (wkt): Geometry as text
    POINT(-111.940008 33.424922)
    POLYGON((-111.94 33.42, -111.93 33.42, -111.93 33.43, -111.94 33.43, -111.94 33.42))
  • Well-Known Binary (wkb): Geometry as binary
    01010000000000000000003E40000000000000002440
    Byte-by-byte breakdown:
    01 — little endian
    01000000Type = POINT
    0000000000003E40 — X = 30
    0000000000002440 — Y = 10
    So this WKB corresponds to POINT(30 10).
  • Extended Well-Known Text (ewkt): Geometry as text with CRS
    SRID=4326;POINT(-111.940008 33.424922)
    SRID=4326;POLYGON((-111.94 33.42, -111.93 33.42, -111.93 33.43, -111.94 33.43, -111.94 33.42))
  • Extended Well-Known Binary (ewkb): Geometry as binary with CRS
    0101000020E61000000000000000003E400000000000002440
    Byte-by-byte breakdown:
    01 → Little endian
    01000020E6100000 → Type = POINT, has SRID flag set, SRID = 4326 (0x10E6)
    0000000000003E40 → X = 30
    0000000000002440 → Y = 10
    So this EWKB corresponds to SRID=4326;POINT(30 10).
  • GeoJSON: Geometry as GeoJSON format
    {
    "type": "Point",
    "coordinates": [-111.940008, 33.424922]
    }
    {
    "type": "Polygon",
    "coordinates": [[[-111.94, 33.42], [-111.93, 33.42], [-111.93, 33.43], [-111.94, 33.43], [-111.94, 33.42]]]
    }
  • Geometry: For Geometry data type only supported for Redshift target
  • Geography: For Geography data type only supported for Redshift target
  • Longitude: X-coordinate values (e.g., -111.940008)
  • Latitude: Y-coordinate values (e.g., 33.424922)
  • Shape: Shape information (e.g., Point, Polygon)
Note

Combined Point Geometry for Map Preview: When longitude, latitude, and shape columns are all present, they will be automatically combined to create a point geometry specifically for map preview functionality. The system uses the longitude and latitude values along with the shape information to generate a complete spatial geometry representation for visualization purposes.

  • Area: Area measurements
  • Length: Length measurements
Important

At least one column must have a spatial type assigned to create a spatial dataset. Multiple columns can have spatial type properties.

Spatial Column Mapping

Schema Editing for Spatial Types

Users can modify spatial column configurations after dataset creation through the schema editor:

Adding New Spatial Columns:

  • Create new columns and assign appropriate spatial types
  • Choose from available spatial types based on your data format
  • Ensure proper data type mapping (e.g., varchar for WKT, binary for WKB)

Editing Existing Spatial Types:

  • Modify spatial type assignments for existing columns
  • Change from one spatial type to another (e.g., WKT to GeoJSON)
  • Update data types to match new spatial type requirements

Removing Spatial Types:

  • Remove spatial type assignments from columns
  • Convert spatial columns to regular data columns
  • Delete spatial columns entirely
Important

Spatial Type Validation: At least one column must maintain a spatial type assignment. The system will prevent removal of spatial types if it would result in zero spatial columns, ensuring the dataset remains a valid spatial dataset.

Schema Editing

Map Preview and Visualization

Interactive Map Preview

Access spatial data visualization through the map preview feature: The interactive map preview allows users to easily visualize their spatial data in various ways. Users can select from multiple map styles using the style dropdown to customize the map’s appearance.

If a dataset contains more than one spatial column, a separate dropdown allows users to choose which spatial column to display on the map. This enables detailed inspection and comparison of different geometries or geographic representations within the dataset.

If Source URL is provided, a link icon will be displayed to the map preview. If clicked, it will open the source URL in a new tab.

Map Preview

The map preview is also available in the catalog asset details page.

Catalog Asset Details

Note

Map preview is not available for view type datasets.