How sarahgoel/satquery-ai works
SatQuery AI is an analyst-facing Earth-observation assistant: users submit natural-language questions with GeoTIFF scenes, then receive mapped analysis results and auditable traces. The documented workflow parses raster metadata, checks spatial alignment, classifies intent, dispatches to temporal, cross-modal, grounding, or VQA analysis, and records execution evidence. The graph preserves these documented capability branches; source excerpts are partial, so uncertain internal calls are omitted. README-documented PostGIS persistence and UI capabilities are included.
Main entry points: agent.py Analysis controller · GeospatialAnalysis.jsx Analysis workspace · registry.py Analysis tool registry · routes.py Query endpoint
Components 23
Analyst console
- Analysis workspace
frontend/src/pages/GeospatialAnalysis.jsx - Query and uploads
frontend/src/components/geospatial/QueryComposer.jsx - Map results
frontend/src/components/MapViewer.jsx - Trace viewer
frontend/src/components/TraceViewer.jsx - Report export
frontend/src/components/ReportDownloader.jsx
Request orchestration
- Query endpoint
backend/api/routes.py - Analysis controller
backend/app/services/agent.py - Intent router
backend/app/agents/semantic_router.py
EO analysis
- Raster metadata parser
backend/app/services/geospatial/parser.py - Spatial alignment
backend/app/services/geospatial/alignment.py - Analysis tool registry
backend/app/tools/registry.py - Temporal change
backend/app/services/analytical/temporal_change.py - Cross-modal analysis
backend/app/services/analytical/cross_modal.py - Feature grounding
backend/app/services/grounding_service.py - Raster vectorization
backend/app/services/geospatial/vector.py - Spectral products
backend/app/services/geospatial/spectral.py - EO VQA models
backend/app/services/models/rs_vlm.py - Change VQA model
backend/app/services/models/change_vqa.py - Sensor fusion model
backend/app/services/models/fusion.py
Trace and persistence
- Execution trace store
backend/app/utils/trace_store.py - PostGIS database
backend/app/database/session.py
Other components
- EO analyst
- Ollama serving
Connections 23
- EO analyst → Analysis workspace: uses
- Analysis workspace → Query and uploads: collects query
- Query and uploads → Query endpoint: submits scenes
- Query endpoint → Analysis controller: starts analysis
- Analysis controller → Raster metadata parser: parses rasters
- Analysis controller → Spatial alignment: validates overlap
- Analysis controller → Intent router: classifies intent
- Intent router → Ollama serving: requests routing
- Analysis controller → Analysis tool registry: dispatches tools
- Analysis tool registry → Temporal change: runs change analysis
- Analysis tool registry → Cross-modal analysis: runs joint analysis
- Analysis tool registry → Feature grounding: localizes features
- Analysis tool registry → EO VQA models: answers image query
- Temporal change → Change VQA model: uses model
- Cross-modal analysis → Sensor fusion model: uses model
- Feature grounding → Raster vectorization: vectorizes masks
- Analysis controller → Spectral products: computes indices
- Analysis controller → Execution trace store: records execution
- Execution trace store → PostGIS database: persists traces
- Query endpoint → Analysis workspace: returns analysis
- Analysis workspace → Map results: shows overlays
- Analysis workspace → Trace viewer: shows trace
- Analysis workspace → Report export: exports report