Visor de cortes de Aquavall
Featured

Aquavall — water network management for Valladolid

Client: Aquavall, the municipal water utility of Valladolid · Programme: PERTE

A geographic information system for the water supply and sewerage networks of Valladolid: a consultation viewer, a technical viewer, a desktop plugin for QGIS and a web back office, all on a PostGIS geodatabase that works out the network's shut-off zones automatically.

In production as Aquavall's own internal tool for managing supply interruptions.

Built entirely on open-source technology, with no proprietary licences.

688kmof water supply network
893kmof sewerage network
6,004shut-off valves
20,769service connections

Plus 19,372 manholes, 25,881 gullies and 1,867 fire hydrants. In production as Aquavall's internal tool. Figures from the system, November 2026.

The problem

A water network is not a drawing: it is a graph. When a burst needs repairing, the question that matters operationally is not where the pipe is, but which valves to close and which streets lose supply. Working that out by hand on a plan is slow and error-prone.

On top of that, network information lives in several places and every role needs a different tool: field staff want a viewer, the cartographer wants QGIS and the manager wants a dashboard.

The solution

One spatial database and four ways of working against it:

  • Consultation viewer, to see the network and any live shut-offs without touching the data.
  • Technical viewer, with the analysis tools and report generation.
  • QGIS plugin, to edit and analyse from the desktop without duplicating data.
  • Web back office, with access control and audit trail.

At the heart of the system is the automatic calculation of shut-off polygons: the network is noded with pgRouting — segments are split at crossings and sub-millimetre gaps are snapped together with a one-centimetre tolerance — and a breadth-first search over that graph determines the set of valves to close and the area left without supply.

Technology

Every part of the system runs on open-source software, without a single proprietary licence.

Database

PostgreSQL 18 with PostGIS. Network topology and the analysis algorithms — including the automatic calculation of shut-off polygons by graph traversal — are resolved with pgRouting and purpose-built SQL functions.

Layer publishing

GeoServer 3.0 on Apache Tomcat, through standard OGC WMS and WFS services.

Desktop

A bespoke plugin for QGIS 3.22+ in Python/PyQGIS, with the editing, management and analysis tools for the supply and sewerage networks.

Web viewers

JavaScript with OpenLayers 10, bundled with Vite. Coordinate reprojection with proj4 between ETRS89 UTM 30N (EPSG:25830) and Web Mercator, and PDF reports generated in the browser itself with jsPDF.

Back end

PHP with REST services and an admin panel: role-based access control, passwords hashed with bcrypt and operation traceability through audit triggers.

Reference mapping

Consumed directly from the WMS services of Spain's National Geographic Institute (PNOA, IGN Base) and the Cadastre. Reference data is therefore always current, and the system interoperates with the client's other platforms.

By the numbers

  • 4,282 hydraulic zones calculated automatically
  • 18,499 supply network segments, 18,496 with a zone assigned
  • 6,001 section valves
  • 8,406 shut-off polygons
  • 20,769 service connections and 48,007 sewerage segments
  • 32 published layers
  • 0 proprietary licences

A real example: shut-off zone no. 505 affects 13 segments, 0.34 km of network, 22 service connections and 199 customers, with 254 alternative supplies. That is what used to be worked out by hand on a plan.

Where we are

These are the three offices. The map does not set the limits: systems are deployed, taught and maintained remotely, and for whatever has to be seen in person, we travel.

  • Spain
    Valladolid Science Park of the University of Valladolid
    CTTA Building, Unit 305 · Miguel Delibes Campus
    Paseo de Belén, 9A · 47011 Valladolid
    Madrid Arganda del Rey
    28500 Madrid
  • United Kingdom London Uxbridge · Greater London
    UB8 2LN

Base mapping from OpenStreetMap and the Spanish Instituto Geográfico Nacional (CC BY 4.0). Map built with Leaflet.