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’s PostGIS database contains no environmental data on a fresh installation. The seven official layers — Red Natura 2000, flood zones, Hydraulic Public Domain, livestock paths, Protected Natural Spaces, and surface and groundwater bodies — must be loaded explicitly before spatial analyses return meaningful results. This page describes both loading methods.
Running an analysis on an empty database is not an error. The API will respond successfully, but every layer will show risk: ninguno with zero spatial intersections — because there is simply nothing to intersect with. If you receive a valid PDF with no afecciones on any layer, check that the data has been loaded before filing a bug report.

Loading Methods

Verifying the Load

After loading, connect to the database and run this query to confirm all seven tables have data:
SELECT 'red_natura_2000'            AS tbl, count(*) FROM red_natura_2000
UNION ALL SELECT 'zonas_inundables',          count(*) FROM zonas_inundables
UNION ALL SELECT 'dominio_publico_hidraulico', count(*) FROM dominio_publico_hidraulico
UNION ALL SELECT 'vias_pecuarias',            count(*) FROM vias_pecuarias
UNION ALL SELECT 'espacios_naturales_protegidos', count(*) FROM espacios_naturales_protegidos
UNION ALL SELECT 'masas_agua_superficial',    count(*) FROM masas_agua_superficial
UNION ALL SELECT 'masas_agua_subterranea',    count(*) FROM masas_agua_subterranea;
Run it with:
docker compose exec geoviable-db psql -U geoviable -d geoviable -c "
  SELECT 'red_natura_2000' AS tbl, count(*) FROM red_natura_2000
  UNION ALL SELECT 'zonas_inundables', count(*) FROM zonas_inundables
  UNION ALL SELECT 'dominio_publico_hidraulico', count(*) FROM dominio_publico_hidraulico
  UNION ALL SELECT 'vias_pecuarias', count(*) FROM vias_pecuarias
  UNION ALL SELECT 'espacios_naturales_protegidos', count(*) FROM espacios_naturales_protegidos
  UNION ALL SELECT 'masas_agua_superficial', count(*) FROM masas_agua_superficial
  UNION ALL SELECT 'masas_agua_subterranea', count(*) FROM masas_agua_subterranea;
"
Every row should show a count greater than zero. A count of 0 means that layer either was not loaded, was filtered out entirely by the Galicia bounding box, or failed silently — check the script output and logs. You can also verify layer freshness and load timestamps through the API:
GET /api/v1/layers/status
All layers are stored in EPSG:25830 (ETRS89 / UTM zone 30N). The loading script reprojects every shapefile to this CRS automatically, regardless of the source projection. If you supply your own sample data for testing, ensure it is in EPSG:25830 — coordinates in UTM zone 29N will not spatially intersect with Galicia features stored in zone 30N.

Build docs developers (and LLMs) love