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.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.
Loading Methods
- Option A — Manual load from ZIPs (recommended)
- Option B — Automated download from MITECO/CNIG
The recommended approach for initial setup is to load from preprocessed ZIP files containing the official MITECO/CNIG shapefiles filtered and reprojected for Galicia.Step 2 — Place ZIPs in
Copy the received files into the
This is useful for diagnosing The script runs a Available values for
Step 1 — Request the ZIP files
The preprocessed ZIPs are available on request:Request data files from: daniel.zas.dacosta@gmail.com
Step 2 — Place ZIPs in backend/data/
Copy the received files into the backend/data/ directory. The load_initial_data.py script looks for files with these exact names:| File | Layer |
|---|---|
red_natura_2000.zip | Red Natura 2000 (ZEPA + LIC/ZEC) |
zonas_inundables_t100.zip | Flood zones T100 |
zonas_inundables_t500.zip | Flood zones T500 |
dph.zip | Hydraulic Public Domain |
vias_pecuarias.zip | Livestock paths |
enp.zip | Protected Natural Spaces |
masas_agua_superficial.zip | Surface water bodies |
masas_agua_subterranea.zip | Groundwater bodies |
Step 3 — (Optional) Inspect before loading
Before committing to a full load, you can inspect each ZIP’s column names, CRS, geometry types, and column mapping without writing anything to the database:NULL columns caused by shapefile field name changes between MITECO dataset versions.Step 4 — Load all layers
TRUNCATE + INSERT pipeline for each layer inside a single transaction, then runs VACUUM ANALYZE to update query planner statistics. At the end it prints a summary table with record counts for every layer.Reload a single layer
If one layer fails or you need to refresh it independently:--layer:--layer value | Table |
|---|---|
red_natura_2000 | red_natura_2000 |
zonas_inundables | zonas_inundables (loads both T100 and T500) |
dominio_publico_hidraulico | dominio_publico_hidraulico |
vias_pecuarias | vias_pecuarias |
espacios_naturales_protegidos | espacios_naturales_protegidos |
masas_agua_superficial | masas_agua_superficial |
masas_agua_subterranea | masas_agua_subterranea |
Verifying the Load
After loading, connect to the database and run this query to confirm all seven tables have data: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:
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.