Spatial Pack Layer
Spatial Pack Layer
Section titled “Spatial Pack Layer”Schema for layer definitions within a Spatial Pack manifest
This schema defines 19 fields (3 required, 16 optional).
Fields
Section titled “Fields”| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
id | string | Yes | Layer identifier (unique within pack) | Pattern: ^[a-z][a-z0-9_.]+$. Examples: land.tenure, env.vegetation, elev.dem_5m |
type | string | Yes | Layer data type | Values: vector, raster, pointcloud |
schema | string | No | Schema identifier for layer attributes | Pattern: ^[a-z]+\.[a-z][a-z0-9_.]+\.v[0-9]+$. Examples: sp.land.tenure.v1, sp.env.vegetation.v1 |
schema_uri | string | No | Resolvable URI to JSON Schema definition | Format: uri |
title | string | Yes | Human-readable layer title | - |
description | string | No | Layer description and usage notes | - |
tilejson | string | No | URL to TileJSON metadata (for vector tiles) | Format: uri |
pmtiles | string | No | URL to PMTiles file | Format: uri |
parquet | string | No | Path or URL pattern to GeoParquet files | Examples: s3://bucket/path/*.parquet, ./layers/data.parquet |
cog | string | No | URL to Cloud Optimized GeoTIFF (for raster) | Format: uri |
copc | string | No | URL to Cloud Optimized Point Cloud (for pointcloud) | Format: uri |
overviews | string | No | URL to overview file (.ovr) | Format: uri |
geometry_type | string | No | OGC geometry type for vector layers | Values: Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon, GeometryCollection |
raster_stats | object | No | Statistics for raster layers | - |
index | object | No | Spatial index configuration | - |
stats | object | No | Layer statistics and quality metrics | - |
security | object | No | Layer-level security settings | - |
validation | object | No | Validation status and conformance | - |
extensions | array of string | No | Extension identifiers applied to this layer | Item pattern: ^[a-z0-9]+:[a-z0-9_-]+@[0-9]+\.[0-9]+$. Item examples: sp:temporal@1.0, sp:versioning@1.0 |
Nested Objects
Section titled “Nested Objects”Raster Stats
Section titled “Raster Stats”Statistics for raster layers
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
min | number | No | - | |
max | number | No | - | |
mean | number | No | - | |
stddev | number | No | - | |
nodata | number | No | - |
Spatial index configuration
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
h3_res | integer | No | H3 resolution level | Min: 0. Max: 15 |
s2_level | integer | No | S2 cell level | Min: 0. Max: 30 |
Layer statistics and quality metrics
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
features | integer | No | Feature count | Min: 0 |
updated_at | string | No | Last update timestamp | Format: date-time |
geometry_valid_pct | number | No | Percentage of valid geometries | Min: 0. Max: 100 |
attribute_completeness | object: {string: number} | No | Map of attribute name to completeness ratio (0-1) | - |
Security
Section titled “Security”Layer-level security settings
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
classification | string | No | Security classification | Values: public, internal, restricted |
visibility | array of string | No | Role patterns that can access this layer | Examples: [demo:viewer, demo:analyst]. Item pattern: ^[a-z0-9]+:[a-z]+$ |
Validation
Section titled “Validation”Validation status and conformance
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
conformance_uri | string | No | URL to conformance report | Format: uri |
status | string | No | Validation status | Values: pass, fail, warn, pending |
validator | string | No | Validator name and version | - |
rule_set_hash | string | No | Hash of validation rule set used | - |
errors | integer | No | Min: 0 | |
warnings | integer | No | Min: 0 |
Conditional Requirements
Section titled “Conditional Requirements”These rules apply conditionally based on the value of other fields.
| When | Condition | Then |
|---|---|---|
type is vector | - | geometry_type field is available |
type is raster | - | cog field is required |