PNR Art. 8 Generator
Official MITECO deliverable generator for the EU Nature Restoration Regulation.
The EU Nature Restoration Regulation 2024/1991 requires every qualifying Spanish municipality to submit an Article 8 deliverable to MITECO by May 2026. The format is strict: specific Excel workbooks, GeoPackage layers with exact schema, Cloud-Optimized GeoTIFFs, ISO 19115 metadata, a signed PDF memoir, and a ZIP under 20 MB. 1,342 municipalities need it. This project industrialises the whole thing.
The pipeline
Seven numbered steps, all deterministic. The same input files and the same municipality INE code always produce a byte-identical ZIP — critical for audit.
- Input catalogue — reads Copernicus HRL rasters, CLC+ Backbone, DEGURBA shapefile, LAU 2024 geometry, and the municipal boundary for the given INE.
- EVU / CAU computation — computes
Urban Ecosystem AreaandTree Canopy Areacoverage ratios using zonal statistics over the rasters. - Measure catalogue — loads the municipal measure inventory (medidas de restauración) and maps each to ZEU/MED/FDC categories.
- Excel workbook — generates the MITECO Formato Uniforme v20260317 workbook with the computed figures and measure catalogue.
- GeoPackage — writes ZEU (Zonas Ecosistema Urbano), MED (Medidas), FDC (Fichas De Compromiso) as separate layers with exact attribute schema.
- COG rasters + metadata — exports EVU and CAU as Cloud-Optimized GeoTIFFs plus ISO 19115 metadata XML. Builds the PDF memoir from templated LaTeX/ReportLab.
- Pack — assembles the ZIP honoring the 20 MB limit (lossy compression fallback on oversize).
Two front-ends, one package
The heavy lifting lives in pnr_art8/. Everything is reusable both from a QWizard-based desktop app and from a CLI.
# Quick municipality lookup
pnr-art8 info --ine 38023
# Full build (CLI)
pnr-art8 build --ine 38023 --year 2024 \
--evu ./evu.tif --cau ./cau.tif \
--medidas ./medidas.gpkg
# Or drive the GUI
pnr-art8-gui
The Qt 6 GUI is a guided wizard: it picks the INE from a searchable catalogue, auto-suggests raster sources from the Copernicus DiscoMap (88 products indexed), runs the pipeline with a progress bar and writes the ZIP into outputs/<INE>/<year>/.
Packaging
Because the target audience is municipal staff, not Python devs, the app ships as a single Windows .exe via PyInstaller. The entire GDAL/rasterio stack plus Qt resources gets baked into one executable. Install is copy-and-paste.
Reference
First real-world run: Ayuntamiento de San Cristóbal de La Laguna (ES38023). Output reproduced 1:1 against the hand-crafted v01 (EVU 40.71 %, CAU 0.46 %, 304 measures, 1.05 MB ZIP). Paradigm of passing an audit check by construction.
License: EUPL-1.2. Target submission channel: bzn-pnr@miteco.es. Deadline: 15 May 2026.