Data Model Architecture
A normalized, geospatially-aware schema designed for scalability, interoperability, and real-time spatial analytics.
GeoServer's data model separates spatial geometry, attribute metadata, and version history while maintaining strict referential integrity. It is optimized for high-throughput ingestion, dynamic reprojection, and multi-tenant isolation.
Core Entities
| Entity | Description | Key Fields | Type |
|---|---|---|---|
Workspace |
Tenant/project isolation boundary | id, name, owner, limits |
Container |
Dataset |
Logical collection of related layers | id, workspace_id, source_type |
Container |
Layer |
Renderable geospatial resource | id, dataset_id, crs, bounding_box |
Resource |
Feature |
Individual spatial record | id, layer_id, geometry, properties |
Record |
Metadata |
Provenance, styling, access rules | target_id, target_type, json_payload |
Extension |
Version |
Immutable snapshot for audit/rollback | id, base_id, timestamp, diff_hash |
History |
Relationships & Hierarchy
The model follows a strict top-down containment pattern with bidirectional foreign keys for traversal optimization.
Workspace
1:N Datasets
Dataset
1:N Layers
Layer
1:N Features
Feature
1:1 Geometry + N:M Props
Features link to a single geometry index but support polymorphic attributes via a key-value store. Metadata and Versions are soft-linked to any entity using a polymorphic target_id/target_type pair.
Spatial Data Types
Geometry is stored in standardized WKB/EWKB format with runtime serialization to GeoJSON, KML, or Shapefile. The model supports all OGC Simple Features types:
POINT/MULTIPOINTLINESTRING/MULTILINESTRINGPOLYGON/MULTIPOLYGONGEOMETRYCOLLECTION- Z-aware and M-aware variants (
Z,M,ZM)
Coordinate Reference Systems
Each Layer declares a native CRS (EPSG code). At query time, GeoServer applies dynamic reprojection using the target_crs parameter. The model caches transformation matrices for common EPSG pairs to minimize runtime overhead.
auto_transform: true at the dataset level. Geometric validity is enforced on ingestion using the JTS Topology Suite.
Versioning & Lifecycle
Every mutation triggers a new immutable Version record. The system maintains:
- Base Version: Latest production snapshot
- Working Version: Staging/draft state
- Archived Versions: Retained per retention policy (default: 90 days)
Branching is supported via fork_from_version. Rollbacks apply diff patches rather than full rebuilds, ensuring O(k) complexity where k is the number of changed features.
API Serialization
The data model serializes to JSON-LD for machine readability and human-friendly REST endpoints. Below is a canonical Feature representation:
All endpoints support ?fields= projection, ?geometry_type= filtering, and ?version= temporal queries. Pagination uses cursor-based offsets for consistent ordering across large feature sets.