Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/danizd/geoviable/llms.txt

Use this file to discover all available pages before exploring further.

GeoViable is an automated environmental feasibility assessment tool built for land parcels and development projects in Galicia, Spain. Environmental consultants and planners traditionally spend hours manually cross-referencing a parcel against a fragmented set of official GIS layers — national databases, regional portals, and hydraulic authority maps — to determine whether a site is affected by any protection regime. GeoViable collapses that process into seconds: draw or upload a polygon, run the analysis, and download a ready-to-submit technical PDF report.

What problem does GeoViable solve?

When evaluating land for construction, renewable energy, agriculture, or infrastructure projects in Galicia, any overlap with a protected environmental layer can block or significantly delay the permitting process. Identifying those overlaps currently requires opening multiple public GIS portals, downloading shapefiles, and running manual spatial queries — a workflow that is error-prone and time-consuming. GeoViable automates the full pipeline: the user defines a polygon, the backend reprojects it into the authoritative Spanish coordinate system (EPSG:25830), queries all seven official environmental layers simultaneously using PostGIS spatial functions, computes intersection areas and overlap percentages, assigns a risk score, and renders a formatted PDF report using official nomenclature — all in under 30 seconds.

The 7 Environmental Layers

Every analysis cross-references the submitted polygon against the following official layers, sourced from MITECO (Ministerio para la Transición Ecológica) and CNIG (Centro Nacional de Información Geográfica):
#LayerSpanish nameSourceUpdate cycle
1Red Natura 2000 (ZEPA + LIC/ZEC)Red Natura 2000MITECOAnnual
2Flood zones (T100 + T500 return periods)Zonas inundables SNCZIMITECO / SNCZIIrregular
3Hydraulic Public Domain (DPH)Dominio Público HidráulicoMITECOIrregular
4Livestock pathsVías pecuariasCNIGAnnual
5Protected Natural Spaces (ENP)Espacios Naturales ProtegidosMITECOAnnual
6Surface water bodiesMasas de agua superficialesMITECO6-year PHC cycle
7Groundwater bodiesMasas de agua subterráneasMITECO6-year PHC cycle
All layers are stored in EPSG:25830 (ETRS89 / UTM zone 30N), the standard coordinate reference system for Spain’s national cartography.

Core Workflow

The full assessment follows a straightforward three-step process:
  1. Draw or upload a polygon. Use the React+Leaflet map interface to draw a parcel boundary directly on screen, or upload a GeoJSON or Shapefile. The frontend parses the geometry client-side and validates it before sending anything to the server.
  2. Run the analysis. Click “Load layers” to send the polygon to the backend via POST /api/v1/analyze. FastAPI reprojects the geometry from EPSG:4326 to EPSG:25830 and runs PostGIS spatial queries (ST_Intersects, ST_Intersection, ST_Area) against all seven layers in parallel. Results are returned as JSON and overlaid on the map within seconds.
  3. Generate the PDF report. Click “Generate report” to call POST /api/v1/report/generate. The backend re-runs the analysis for data consistency, generates a static basemap with contextily and matplotlib, renders an HTML template with Jinja2, and converts it to a print-ready PDF using WeasyPrint. The browser downloads the file automatically.

Risk Score Levels

Each analysis produces a composite risk score based on which layers are affected and the percentage of parcel overlap:
ScoreSpanish labelMeaning
0NingunoNo overlap with any protected layer
1BajoMinor overlap with low-restriction layers
2MedioModerate overlap or medium-restriction layer affected
3AltoSignificant overlap or high-restriction layer affected
4Muy altoCritical overlap — project viability severely constrained

Technology Stack

ComponentTechnology
BackendPython 3.11 + FastAPI
Spatial databasePostgreSQL 15 + PostGIS 3.4
FrontendReact.js + React Leaflet + Leaflet-Geoman
Web serverNginx 1.25 (reverse proxy + static files)
PDF generationWeasyPrint (Jinja2 HTML templates → PDF)
Static map renderingcontextily + matplotlib + geopandas
OrchestrationDocker Compose
InfrastructureOracle Cloud Always Free (ARM, 24 GB RAM, 200 GB disk)
HTTPS / CDNLet’s Encrypt + Cloudflare

Operational Limits (MVP)

GeoViable enforces the following hard limits per request to maintain performance and data integrity:
ParameterLimit
Maximum polygon area100 km² (10,000 ha)
Maximum polygon vertices10,000
Maximum upload size5 MB
Polygons per request1 (single polygon only)
Analysis timeout30 seconds
GeoViable operates exclusively within Galicia, Spain. The bounding box for valid submissions is [-9.5, 41.5, -6.5, 44.0] (WGS84 longitude/latitude). Polygons outside this extent will fail validation or return zero intersections, as the environmental layer data is filtered to this region.

Where to go next

Quickstart

Set up GeoViable locally with Docker Compose in a few commands.

API Overview

Explore the REST endpoints: /analyze, /report/generate, /health, and /layers/status.

Build docs developers (and LLMs) love