Initial GeoIntel V1 foundation
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"type": "Feature",
|
||||
"properties": {"name": "Geel demo area"},
|
||||
"geometry": {
|
||||
"type": "Polygon",
|
||||
"coordinates": [[[4.98,51.16],[4.99,51.16],[4.99,51.17],[4.98,51.17],[4.98,51.16]]]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"error": {
|
||||
"code": "FEATURE_DISABLED",
|
||||
"message": "This feature is disabled in the current milestone.",
|
||||
"details": {"feature": "LIDAR_LAB", "target_milestone": "V4"}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "Geel Building QA Demo",
|
||||
"description": "Detect buildings and compare against reference polygons.",
|
||||
"region": "Kempen"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"analysis_run_id": "demo-qaqc-run",
|
||||
"metrics": {"precision": 0.92, "recall": 0.88, "f1": 0.90, "mean_iou": 0.71},
|
||||
"counts": {"true_positive": 23, "false_positive": 2, "false_negative": 3},
|
||||
"layers": {"matches": "exports/demo_matches.geojson", "false_positives": "exports/demo_fp.geojson", "false_negatives": "exports/demo_fn.geojson"}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
# API Response and Error Contract
|
||||
|
||||
## Standard error
|
||||
|
||||
All API errors must use:
|
||||
|
||||
```json
|
||||
{
|
||||
"error": {
|
||||
"code": "STRING_CODE",
|
||||
"message": "Human readable message.",
|
||||
"details": {}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Job response
|
||||
|
||||
Long-running operations return:
|
||||
|
||||
```json
|
||||
{
|
||||
"job_id": "uuid",
|
||||
"analysis_run_id": "uuid",
|
||||
"status": "queued",
|
||||
"status_url": "/analysis-runs/{id}"
|
||||
}
|
||||
```
|
||||
|
||||
## Resource metadata
|
||||
|
||||
Resources should include:
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "uuid",
|
||||
"created_at": "ISO-8601",
|
||||
"updated_at": "ISO-8601"
|
||||
}
|
||||
```
|
||||
|
||||
## Pagination
|
||||
|
||||
List endpoints use:
|
||||
|
||||
```json
|
||||
{
|
||||
"items": [],
|
||||
"total": 0,
|
||||
"limit": 50,
|
||||
"offset": 0
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,31 @@
|
||||
# Domain Model Contract
|
||||
|
||||
## Core aggregates
|
||||
|
||||
### Project
|
||||
A project is an investigation workspace. It contains areas, datasets, analyses, and exports.
|
||||
|
||||
### Area
|
||||
A spatial polygon or selected administrative unit used to clip and analyze datasets.
|
||||
|
||||
### Dataset
|
||||
A source artifact or external reference. Datasets can be raster, vector, reference, model output, mask, or export.
|
||||
|
||||
### AnalysisRun
|
||||
A tracked execution of a pipeline such as detection, segmentation, QA, clipping, tiling, or index computation.
|
||||
|
||||
### Detection
|
||||
A model-derived feature, usually a georeferenced bounding box or polygon.
|
||||
|
||||
### Segmentation
|
||||
A mask-derived polygon or raster mask output.
|
||||
|
||||
### QualityCheck
|
||||
A comparison between model outputs and reference data such as GRB.
|
||||
|
||||
## Geometry rules
|
||||
|
||||
- Use SRID 4326 for API-level GeoJSON interchange unless explicitly documented.
|
||||
- Use projected CRS for area/length calculations when required.
|
||||
- Store original CRS metadata for every dataset.
|
||||
- Never calculate area in degrees.
|
||||
@@ -0,0 +1,37 @@
|
||||
# Event Contracts
|
||||
|
||||
GeoIntel uses events to document state transitions, even if V1 implements them as database records/log entries rather than a full event bus.
|
||||
|
||||
## Event names
|
||||
|
||||
- ProjectCreated
|
||||
- AreaCreated
|
||||
- DatasetUploaded
|
||||
- DatasetMetadataExtracted
|
||||
- RasterTiled
|
||||
- VectorImported
|
||||
- DetectionQueued
|
||||
- DetectionStarted
|
||||
- DetectionCompleted
|
||||
- DetectionFailed
|
||||
- SegmentationCompleted
|
||||
- QualityCheckCompleted
|
||||
- ExportGenerated
|
||||
|
||||
## Event shape
|
||||
|
||||
```json
|
||||
{
|
||||
"event_id": "uuid",
|
||||
"event_type": "DatasetUploaded",
|
||||
"project_id": "uuid",
|
||||
"dataset_id": "uuid",
|
||||
"analysis_run_id": null,
|
||||
"timestamp": "ISO-8601",
|
||||
"payload": {}
|
||||
}
|
||||
```
|
||||
|
||||
## Implementation rule
|
||||
|
||||
Every long-running workflow must create at least one event at start and one at completion/failure.
|
||||
Reference in New Issue
Block a user