2.9 KiB
Canonical Domain Models
This document defines shared concepts. All backend services, frontend types and tests must use these definitions.
Project
A Project is an investigation container.
Required behavior:
- contains Areas, Datasets, AnalysisRuns and Exports;
- has a human-readable name and optional description;
- may contain demo or real data, but the data mode must be visible;
- does not directly store geospatial features except through child entities.
Area
An Area is a geospatial boundary used to clip, filter and analyze data.
Required fields:
idproject_idnamegeometrygeometry_crsarea_m2bounds_4326created_at
Rules:
- API representation is GeoJSON EPSG:4326.
- Internal metric operations should use EPSG:31370 for Kempen/Belgium.
- Area can be a free polygon, municipality-derived polygon or demo fixture.
Dataset
A Dataset is a registered data source or uploaded file.
Dataset types:
rastervectorreference_vectormodel_outputmaskexport
Required behavior:
- original artifact is preserved;
- metadata extraction produces a metadata record;
- validation state is explicit;
- derived datasets reference parents.
Layer
A Layer is a map-renderable view of a dataset or analysis output.
Rules:
- layers have styling metadata;
- layers do not own authoritative geometry;
- layer visibility is frontend state, not processing state.
AnalysisRun
An AnalysisRun is one execution of a processing pipeline.
Examples:
- raster metadata extraction;
- vector clipping;
- object detection;
- segmentation;
- QA/QC;
- export generation.
Required fields:
idproject_idarea_idoptionalanalysis_typestatusparameters_jsonstarted_atfinished_aterror_codeoptionalerror_messageoptional
Detection
A Detection is a candidate object produced or imported as an analysis output.
Required fields:
- class name;
- confidence;
- geometry;
- bbox;
- source analysis run;
- model metadata if AI-produced;
- source tile if tiled inference was used.
Segmentation
A Segmentation is a polygon or raster mask representing class coverage.
Required fields:
- class name;
- geometry or mask path;
- area_m2;
- confidence/score if available;
- source analysis run;
- model metadata if AI-produced.
ReferenceFeature
A ReferenceFeature is an authoritative or semi-authoritative feature used for validation.
V1 examples:
- GRB-like building polygons;
- demo reference buildings;
- OSM fallback buildings.
QualityCheck
A QualityCheck compares candidate outputs to reference data or validates dataset integrity.
Required outputs:
- metric values;
- method;
- thresholds;
- matched/unmatched features where applicable;
- pass/fail or warning status.
Export
An Export is a generated artifact derived from persisted state.
Allowed V1 exports:
- GeoJSON;
- CSV metrics;
- simple HTML/Markdown report if trivial;
- not mandatory: complex PDF.