OGC APIs for topographic geodata, built on geocomponents: datasets are described in YAML, and both the PostGIS schema and the per-dataset OGC API — Features services are generated from those descriptions.
System overview (Mermaid): ARCHITECTURE.md.
geocomponents/— the engine. Start with its README for describing datasets and running locally; see DEPLOY.md for deployment.gccore/— a FastAPI service with Alembic-managed tables in the sharedgc_corePostgreSQL schema.gcjobs/— a FastAPI service with Alembic-managed tables in the sharedgc_jobsPostgreSQL schema.gcimport/— a profile-driven, single-endpoint FastAPI service that validates JSON-FG uploads and idempotently imports dataset features.gcmapview/— local Vite + React map viewer with an/importpage that starts imports through gcjobs, editable Cadastre layers, and read-only Bane/Bygning layers on the map.nibio/NIBIO AR5 database dump and schema adjustments. Useful for Postgis Topology integration.
The root Makefile provides shortcuts for the local compose stack, the
frontend, and gcimport:
make lock # Refresh lockfiles for geocomponents, gccore, gcjobs, and gcimport
make install # Sync dependencies from the existing lockfiles for geocomponents, gccore, gcjobs, and gcimport
make docker-up # Start the local compose stack: PostGIS, geocomponents, gcimport, gcmapview, gccore, and gcjobs
make docker-down # Stop the local compose stack
make docker-delete-db-volume # Delete the local geocomponents Postgres volume
make docker-trivy-scan # Build and Trivy-scan all Dockerfile-based services via Docker
make frontend-install # Install frontend dependencies without running scripts
make frontend-build # Build the frontend
make frontend-run # Run the frontend development server
make frontend-lint # Lint the frontend
make frontend-format # Format the frontend
make gccore-install # Install gccore dependencies
make gccore-test # Run gccore tests
make gccore-run # Run gccore on port 8002
make gcjobs-install # Install gcjobs dependencies
make gcjobs-test # Run gcjobs tests
make gcjobs-run # Run gcjobs on port 8003
make gcimport-install # Install gcimport dependencies
make gcimport-test # Run gcimport tests
make gcimport-run # Run gcimport on port 8001To scan container images locally with the same Trivy severity filters as CI:
# Scan all Dockerfile-based services
make docker-trivy-scan
# Scan only one service image
make docker-trivy-scan SERVICE=gcimportThis runs Trivy inside Docker, so no local trivy install is required. It
expects a working local Docker daemon and access to the Docker socket.
The repo uses pre-commit at the root to run various file-hygiene checks at commits. It currently lives in geocomponents as a dev tool instead of at root to avoid a root python project and tooling manifest.
The same hooks run in CI (see .github/workflows/ci.yml).
The hooks are installed running commands below. uv is the only prerequisite:
# One-time setup: refresh lockfiles, sync environments, install the git hook, and warm hook envs
make lock
make install
uv run --project geocomponents pre-commit install
# Run against staged files (this is what the git hook does)
uv run --project geocomponents pre-commit run
# Run against every file in the repo (this is what CI does)
uv run --project geocomponents pre-commit run --all-filesFor running the geocomponents test suite (unit tests without Docker,
contract + integration tests against a local PostGIS), see
geocomponents/README.md.
With make docker-up, the local ports are:
http://localhost:8000for geocomponentshttp://localhost:8001/docsfor gcimport Swagger (internal import worker API)http://localhost:8002/docsfor gccore Swaggerhttp://localhost:8003/docsfor gcjobs Swagger andhttp://localhost:8003/importsas the public import APIhttp://localhost:8080for gcmapview
gcjobs accepts browser and curl uploads on port 8003 and proxies them to
gcimport on port 8001 inside the local stack. gcimport still requires an
explicit import profile on every upload request. Use ?profile=fkb_bane for
Bane uploads and ?profile=bygning for Bygning uploads. Examples:
curl -F 'file=@bane.json;type=application/json' \
'http://localhost:8003/imports?profile=fkb_bane'
curl -F 'file=@bygning.geojson;type=application/geo+json' \
'http://localhost:8003/imports?profile=bygning'We are currently using imresamu/postgis:17-3.6-alpine instead of the official postgis/postgis:17-3.6-alpine image for running locally as this resolves missing ARM64 compability in official image.