GeoMind transforms open geospatial data β satellite imagery, OpenStreetMap, elevation models, and live camera feeds β into structured, queryable, actionable intelligence through developer-friendly APIs.
Make geographic intelligence accessible through simple APIs and scalable infrastructure β no GIS expertise required.
Extract real-world metrics around any coordinate:
| Metric | Description | Unit |
|---|---|---|
| Building Density | Footprint area Γ· analysis area | ratio (0β1) |
| Road Density | Total road length Γ· area | km/kmΒ² |
| Vegetation Coverage | Vegetated land Γ· area | ratio (0β1) |
| Water Proximity | Distance to nearest water + coverage | meters + ratio |
| Elevation | Center + ring samples (min/max/mean) | meters |
Data sources: OpenStreetMap (via Overpass API), SRTM elevation (OpenTopoData/Open-Elevation)
Provenance: Every response includes source metadata, cache status, timestamps, and licenses (ODbL, public domain).
curl "http://localhost:8000/api/v1/location-intelligence?lat=52.52&lon=13.405&radius_m=500"Ingest live MJPEG/JPEG feeds, deduplicate, and serve latest frames.
| Feature | Details |
|---|---|
| Multi-feed | Configure N cameras with individual intervals |
| Deduplication | Perceptual hash (pHash) β skips visually identical frames |
| Scheduling | APScheduler with per-feed intervals + exponential backoff retries |
| Storage | Files organized by camera_id/YYYYMMDD_HHMMSS_NNNNNN.jpg |
| Persistence | Async SQLAlchemy (PostgreSQL/SQLite) for frame metadata |
| API | Health, list, latest frame (JSON + JPEG), manual trigger |
Config (cameras.yaml):
feeds:
- feed_url: "https://images.webcams.travel/api/cam/1471069946/image.jpg"
camera_id: "nyc_times_square"
fetch_interval_seconds: 30
timeout_seconds: 10
max_retries: 3git clone https://github.com/VarunGore36/GeoMind
cd GeoMind
# Start PostGIS + Redis + API
docker-compose up -d
# API at http://localhost:8000
# Docs at http://localhost:8000/docs# Install with camera extras
pip install -e ".[camera]"
# Copy config template
cp cameras.yaml.example cameras.yaml
# Edit cameras.yaml with your feeds
# Run
GEOMIND_CAM_CONFIG_PATH=cameras.yaml python -m src.geomind.main| Method | Endpoint | Description |
|---|---|---|
GET |
/api/v1/location-intelligence |
Extract features around a point |
| Query params | lat, lon, radius_m (optional), refresh (optional) |
WGS84 coords, radius in meters |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/v1/cameras/health |
All cameras status + frame counts |
GET |
/api/v1/cameras |
List configured cameras |
GET |
/api/v1/cameras/{id} |
Single camera status |
GET |
/api/v1/cameras/{id}/latest |
Latest frame metadata |
GET |
/api/v1/cameras/{id}/latest/image |
Latest frame as JPEG |
POST |
/api/v1/cameras/{id}/fetch |
Trigger immediate fetch |
| Method | Endpoint | Description |
|---|---|---|
GET |
/health |
Liveness probe |
GET |
/health/ready |
Readiness (DB + PostGIS) |
GET |
/ |
Service metadata |
Location Intelligence:
{
"query": { "latitude": 52.52, "longitude": 13.405, "radius_m": 500, "area_m2": 785398 },
"features": {
"building_density": { "value": 0.21, "building_count": 244, "footprint_area_m2": 164983 },
"road_density": { "value": 57.3, "unit": "km/km2", "road_length_m": 44970 },
"vegetation_coverage": { "value": 0.26, "vegetation_area_m2": 208049 },
"water_proximity": { "nearest_distance_m": 125, "water_coverage_ratio": 0.056 },
"elevation": { "value": 49, "min_m": 33, "max_m": 58, "mean_m": 44.2, "samples": 5 }
},
"provenance": {
"sources": [
{ "name": "OpenStreetMap", "license": "ODbL-1.0" },
{ "name": "Elevation", "dataset": "srtm30m", "license": "Public domain" }
],
"cache": { "hit": false, "ttl_s": 86400 }
}
}βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β GeoMind API β
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ€
β Location Intelligence β Camera Pipeline β
β βββββββββββββββββββββββββ β ββββββββββββββββββββ β
β Overpass API (OSM) βββββΆ β Camera Feeds (MJPEG/JPEG) β
β OpenTopoData (SRTM) βββββΆ β ββββββββββββββββββββ β
β βββββββββββββββββββββββββ β APScheduler βββββ Intervals β
β PostGIS (metrics) β ββββββββββββββββββββ β
β βββββββββββββββββββββββββ β Fetcher (HTTP + Retry) β
β FastAPI /v1/location-intel β ββββββββββββββββββββ β
β β pHash Dedup β
β β ββββββββββββββββββββ β
β β Files + Postgres β
β β ββββββββββββββββββββ β
β β FastAPI /v1/cameras β
ββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββ
- Async throughout β FastAPI + asyncpg + SQLAlchemy 2.0
- PostGIS β spatial indexes, UTM projection for accurate metrics
- Caching β 24h TTL for OSM coverage areas
- Deduplication β 64-bit perceptual hash, β₯95% similarity skips save
All settings via environment variables (GEOMIND_ prefix) or YAML:
| File | Purpose |
|---|---|
.env |
Runtime overrides (DB URL, API keys, log level) |
cameras.yaml |
Camera feeds, storage, database, Redis |
pyproject.toml |
Dependencies, tool config (ruff, mypy, pytest) |
Key env vars:
GEOMIND_DATABASE_URL=postgresql+asyncpg://user:pass@host/db
GEOMIND_CAM_REDIS__URL=redis://localhost:6379/0
GEOMIND_LOG_LEVEL=INFO# All tests (54 passing)
make test
# Camera tests only
make test-cam
# With coverage
pytest --cov=src --cov-report=htmlTest breakdown:
- 36 unit/integration tests for Location Intelligence
- 18 camera pipeline tests (config, storage, fetcher, DB, API, scheduler)
# docker-compose.yml services:
# db - postgis/postgis:16-3.4 (PostGIS 3.4)
# redis - redis:7-alpine (for camera caching)
# api - geomind:latest (FastAPI + Uvicorn)docker-compose up -d # Start
docker-compose logs -f api # View logs
docker-compose down # StopGeoMind/
βββ src/geomind/
β βββ cameras/ # Camera pipeline module
β β βββ config.py # Pydantic config models
β β βββ models.py # SQLAlchemy + Pydantic models
β β βββ storage.py # File storage + pHash dedup
β β βββ fetcher.py # HTTP fetcher with retries
β β βββ database.py # Async SQLAlchemy CRUD
β β βββ scheduler.py # APScheduler orchestration
β β βββ api.py # FastAPI routes
β β βββ README.md # Module docs
β βββ core/ # Config, errors, logging
β βββ db/ # Base, session, models
β βββ providers/ # Overpass, Elevation
β βββ repositories/ # PostGIS metric queries
β βββ services/ # Ingestion, metrics, orchestration
β βββ api/ # Health, Location Intelligence routes
β βββ main.py # FastAPI app factory
βββ tests/ # 54 tests (unit + integration)
βββ alembic/ # DB migrations
βββ scripts/ # cam_health_check.py
βββ static/ # Web viewer (index.html)
βββ cameras.yaml # Camera config (gitignored)
βββ cameras.yaml.example # Template
βββ docker-compose.yml
βββ Dockerfile
βββ Makefile
βββ pyproject.toml
βββ requirements.txt
βββ CHANGELOG.md
βββ LICENSE (MIT)
# Format & lint
make format
make lint
# Run tests
make test
# Submit PRCode style: ruff (line-length 100), type hints required (mypy strict).
MIT License β see LICENSE.
Varun Gore β @VarunGore36
Built with FastAPI, PostGIS, and open geospatial data.