Idriss Lemnouni Get in touch
All projects

Geospatial / Environmental analysis

Mapping agricultural water use in Morocco

How much does pixel selection change a water-use estimate at the edge of a Moroccan lagoon?

Solution

I mapped FAO WaPOR rasters in Leaflet and cross-checked area-weighted water-use estimates in PostGIS.

My contribution · I computed the zonal estimates, verified them in both Python and PostGIS, and built the Leaflet atlas.

Tools Python · Rasterio · PostGIS · QGIS · Leaflet

Results

At the lagoon edge in 2023, evapotranspiration was 506.95 mm/year with area weighting and 257.70 mm/year at the centroid.

PostGIS and Python agreed on all sixteen summaries, including a repeated database load.

Area-weighted AETI, lagoon edge
506.95 mm/year Source

Data & evaluation

Data sources

  • FAO WaPOR v3 AETI and gross biomass water productivity rasters, 2022–2023

Method

  1. Intersect pixel footprints with two study polygons in equal-area coordinates and check the calculations independently in PostGIS.
  2. Read windows from eight revision-pinned rasters, compare centroid, cell-centre and area-weighted estimates, and expose year, resolution and indicator in a local Leaflet atlas.

Limitations

The two zones are study polygons containing mixed land cover. Remote estimates need field observations for agronomic validation.

WaPOR estimates evapotranspiration. Estimating irrigation withdrawals or validating at field scale requires independent withdrawal records and in-field measurements.

Reproduce the study

Use Python 3.13 and Docker Compose. Prepare the pinned WaPOR inputs, start PostGIS, then run the zonal checks and atlas setup.

Local reproduction instructions and pinned source

Setup instructions for the local dashboard

Skills demonstrated

  • Area-weighted zonal statistics
  • Spatial SQL
  • Raster validation

Project figures