Docs
Contents

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

IDes_hidrografia_cuencas_mspf
Records4,161
Size3.9 MB
GeometryMULTIPOLYGON, POLYGON
CRSEPSG:4326
Versionv/2026-08
Sourcemiteco
Upstream layermiteco:Cuencas_MSPF.zip
LicenceCC-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/download

sha256 of this version:

64470c8677f5d4bef2299542565c6a38fc2553922f5447d1aac3b8452aa2c104

Query it without downloading it

import duckdb
con = 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.

ColumnTypeFilledDistinctValues
COD_MASSUPVARCHAR100 %4,161
AREA_CMSPFDOUBLE100 %3,688Range: 0.01 → 3556.01
Shape_LengDOUBLE100 %4,161Range: 0.00399291652244 → 10.3536134523
Shape_AreaDOUBLE100 %4,161Range: 6.849925156e-07 → 0.386114598989
prov_codeVARCHAR100 %47
prov_nameVARCHAR100 %47
prov_aproxBOOLEAN100 %1false
_fuenteVARCHAR100 %1miteco
_fecha_capturaDATE100 %12026-08-29
_fecha_edicionDATE100 %12026-08-29
_licenciaVARCHAR100 %1CC-BY-4.0
_atribucionVARCHAR100 %1© MITECO — CC BY 4.0 · des
bboxSTRUCT(xmin DOUBLE, ymin DOUBLE, xmax DOUBLE, ymax DOUBLE)100 %—
geometryGEOMETRY(‘EPSG:4326’)100 %—