Open-Source GIS Architecture for Small Municipalities

GIS map visualization showing road network, waterworks polylines and municipal boundary polygons

Why GIS for a Local Municipality

This post presents a case study on building an open-source GIS for municipalities – specifically, a small municipality in Bosnia and Herzegovina. Like most municipalities in the country, the client faced a familiar problem: data about communal infrastructure and urban planning lived in isolated silos – spreadsheets, paper drawings, and legacy AutoCAD files. Nothing was spatially integrated. Answering a simple question like “where does the water main run on this street?” could take hours of searching across departments.

The task was clear: establish an integrated geographic information system and build a central spatial database serving two key departments – waterworks and urban planning.

This case study builds on our earlier post on multi-user data management with editor and viewer roles – you can read it here.

“The goal was simple: every clerk, the moment they opened their computer, should immediately have the spatial context of their work — not copy data from three different folders.”

Choosing an Open-Source GIS Stack for a Small Municipality

The technology choices were guided by three principles: open-source where possible, no unnecessary middleware layers, and easy to maintain by a single person. GeoServer and similar middleware were ruled out early – a direct QGIS PostGIS connection delivers everything the municipality needs without additional infrastructure complexity. “This approach has proven to be the most reliable open-source GIS solution for municipalities working with limited IT resources.”
Database
PostgreSQL + PostGIS 3.6
Hetzner VPS, Ubuntu, three schemas: vodovod, urbanizam, audit_log
Coordinate system
SRID 31276
Yugoslav Gauss-Krüger — the standard for spatial data in BiH
GIS client
QGIS
Direct PostGIS connection, no middleware
Admin panel
Flask (Python)
User management, capacity monitoring, audit log viewer

Schemas, Roles, and Audit Logging

The database is divided into three schemas. vodovod and urbanizam store the spatial data for each department, while audit_log records every change – who modified what and when, in JSONB format that preserves both the old and new state of each record. All geometry columns carry GIST spatial indexes, and data access is controlled through granular PostgreSQL roles.

This architecture directly addresses two recurring problems in municipal systems: lack of accountability (“who deleted that polygon?”) and overly broad data access (“everyone can see everything”).

A Flask Interface for day-to-day Management

Alongside QGIS, a Flask admin panel was developed to give the database administrator a clear system overview without requiring direct SQL access. The panel covers disk capacity tracking per schema, an audit log viewer with filters and a JSON diff display for comparing changes, and user management – creating accounts, removing them, and adjusting per-schema permissions.

The panel’s design is intentionally simple: white cards, sticky table headers, sidebar-only navigation. The goal was a tool that a municipal administrator can use without any technical training.

What Was Learned

This project confirmed that a modern GIS for local government requires neither expensive licenses nor complex infrastructure. A well-configured PostgreSQL + PostGIS + QGIS stack can cover the full needs of a municipality the size of Šamac. The key lesson: audit logging and granular roles should be built in from day one – retrofitting these elements costs far more than designing them into the schema from the start.

The system is currently in final testing with waterworks and urban planning staff, with a planned go-live in 2026.