Sub-basins of surface water bodies (WFD art. 5)
What it is
The detailed scale of the same system: 4,161 catchments, one per surface water body, computed by MITECO from the water-body polygons and a 100×100 m flow-direction model. Against the 118 planning basins (es_hidrografia_cuencas), the median here is 55.5 km² and the range runs from 0.006 to 3,556 km²: this is the unit a water body’s status is actually attributed to, and therefore the one that tells you which body a given site drains into. COD_MASSUP is unique across all 4,161 and links to the corresponding water body. The area declared in AREA_CMSPF is in km² and checks out: 483,028.6 km² declared against 482,817.7 measured in an equal-area projection, with a median deviation of 0.08 % per polygon — the ratio against hectares comes to 0.01, exactly what would betray a unit mix-up. ⚠ Shape_Area and Shape_Leng, by contrast, come in degrees: use AREA_CMSPF. ⚠ Mainland only. Measured on the geometry: 0 polygons in the Canaries and 0 in the Balearics, with the envelope at lon −9.3..3.3 and lat 36.0..43.8. On the islands this layer does not say ‘no basin’, it says it is not published — the difference matters when it is used to rule sites out.
According to the publishing agency
Official text, in Spanish, exactly as the upstream service publishes it:
Subcuencas de las masas de agua superficiales de la DMA (artículo 5) A partir de los polígonos de las masas de agua y el modelo de direcciones de 100x100m, se han calculado las cuencas vertientes a esas masas de agua, de la Península Ibérica.
At a glance
| ID | es_hidrografia_cuencas_mspf |
| Records | 4,161 |
| Size | 3.9 MB |
| Geometry | MULTIPOLYGON, POLYGON |
| CRS | EPSG:4326 |
| Version | v/2026-08 |
| Source | miteco |
| Upstream layer | miteco:Cuencas_MSPF.zip |
| Licence | CC-BY-4.0 |
Extent: -9.257315, 36.022392 → 3.297941, 43.753115
Download
curl -H "x-api-key: $GEOVIS_API_KEY" \ https://datos.geovis.es/v1/data/datasets/es_hidrografia_cuencas_mspf/downloadsha256 of this version:
64470c8677f5d4bef2299542565c6a38fc2553922f5447d1aac3b8452aa2c104Query it without downloading it
import duckdbcon = duckdb.connect(); con.execute("INSTALL spatial; LOAD spatial; INSTALL httpfs; LOAD httpfs;")con.execute("SELECT count(*) FROM read_parquet('<url-firmada>')").fetchone()Columns
Column names are kept exactly as the agency publishes them. They are not translated: renaming them would break traceability against the official source.
The literals below are the ones present in the data: they work as-is in a WHERE. Only columns with few distinct values are enumerated; for the rest, the count is given.
| Column | Type | Filled | Distinct | Values |
|---|---|---|---|---|
COD_MASSUP | VARCHAR | 100 % | 4,161 | |
AREA_CMSPF | DOUBLE | 100 % | 3,688 | Range: 0.01 → 3556.01 |
Shape_Leng | DOUBLE | 100 % | 4,161 | Range: 0.00399291652244 → 10.3536134523 |
Shape_Area | DOUBLE | 100 % | 4,161 | Range: 6.849925156e-07 → 0.386114598989 |
prov_code | VARCHAR | 100 % | 47 | |
prov_name | VARCHAR | 100 % | 47 | |
prov_aprox | BOOLEAN | 100 % | 1 | false |
_fuente | VARCHAR | 100 % | 1 | miteco |
_fecha_captura | DATE | 100 % | 1 | 2026-08-29 |
_fecha_edicion | DATE | 100 % | 1 | 2026-08-29 |
_licencia | VARCHAR | 100 % | 1 | CC-BY-4.0 |
_atribucion | VARCHAR | 100 % | 1 | © MITECO — CC BY 4.0 · des |
bbox | STRUCT(xmin DOUBLE, ymin DOUBLE, xmax DOUBLE, ymax DOUBLE) | 100 % | — | |
geometry | GEOMETRY(‘EPSG:4326’) | 100 % | — |