# ADR-002 — PostGIS as Spatial Source of Truth ## Status Accepted for V1. ## Context GeoIntel stores areas, datasets, AI detections, segmentations, QA geometries, and exports. Spatial operations need to be queryable and persistent. ## Decision Use PostgreSQL with PostGIS as the canonical database for: - project areas, - dataset spatial bounds, - vector features, - detection polygons/boxes, - segmentation polygons, - QA/QC geometries, - spatial metadata, - analysis outputs. Raw rasters, tiles, masks, and large binary artifacts stay on disk/object storage. PostGIS stores metadata and vectorized results. ## Consequences The backend can do spatial filtering, intersections, bounding-box queries, and QA matching without reloading every file. The portfolio visibly demonstrates professional GIS database skills. ## Non-goals Do not store full large rasters as database blobs in V1.