feat: add governed hydrology and historical imagery
GeoIntel CI / docs-smoke (push) Canceled after 0s
GeoIntel CI / contract-smoke (push) Canceled after 0s

This commit is contained in:
Codex
2026-07-15 12:17:45 +02:00
parent 5b1156e989
commit fb38eb3e91
32 changed files with 1646 additions and 55 deletions
+40 -1
View File
@@ -3,7 +3,7 @@ import maplibregl from 'maplibre-gl'
import 'maplibre-gl/dist/maplibre-gl.css'
import { PRIMARY_FOCUS_CENTER } from '../config/primaryFocus'
import { featureCollectionBounds } from '../lib/geojsonBounds'
import type { MapViewportState, VectorSelectionBBox } from '../types'
import type { MapImageOverlay, MapViewportState, VectorSelectionBBox } from '../types'
interface GeoMapProps {
data: GeoJSON.FeatureCollection | null
@@ -13,6 +13,7 @@ interface GeoMapProps {
selectedFeature?: GeoJSON.Feature | null
selectionData?: GeoJSON.FeatureCollection | null
qaEvidenceData?: GeoJSON.FeatureCollection | null
imageOverlay?: MapImageOverlay | null
selectionBbox?: { min_x: number; min_y: number; max_x: number; max_y: number } | null
bboxSelectionMode?: boolean
visible?: boolean
@@ -153,6 +154,7 @@ function GeoMap({
selectedFeature = null,
selectionData = null,
qaEvidenceData = null,
imageOverlay = null,
selectionBbox = null,
bboxSelectionMode = false,
visible = true,
@@ -346,6 +348,43 @@ function GeoMap({
}
}, [])
useEffect(() => {
const map = mapRef.current
if (!map || !mapStyleReady || !map.isStyleLoaded()) {
return
}
if (map.getLayer('bounded-orthophoto')) {
map.removeLayer('bounded-orthophoto')
}
if (map.getSource('bounded-orthophoto')) {
map.removeSource('bounded-orthophoto')
}
if (!imageOverlay) {
return
}
const [minX, minY, maxX, maxY] = imageOverlay.bbox
map.addSource('bounded-orthophoto', {
type: 'image',
url: imageOverlay.url,
coordinates: [
[minX, maxY],
[maxX, maxY],
[maxX, minY],
[minX, minY],
],
})
const beforeLayer = ['area-fill', 'dataset-fill', 'selection-bbox-fill'].find((layerId) => map.getLayer(layerId))
map.addLayer(
{
id: 'bounded-orthophoto',
type: 'raster',
source: 'bounded-orthophoto',
paint: { 'raster-opacity': imageOverlay.opacity ?? 0.88 },
},
beforeLayer,
)
}, [imageOverlay, mapStyleReady])
useEffect(() => {
const map = mapRef.current
if (!map || !mapStyleReady || !map.isStyleLoaded()) {