Custom tile writer script in Python
Context
At iCarto, the team needed a way for cartographers to export map tiles directly from QGIS without engineer intervention. This project revived and modernized an older Tile Writer approach for current production use.
My role
- Data analysis
- Cartography
- Frontend development
I updated Alexander Hajnal's original Tile Writer script to work with QGIS 3 and Python 3 after major API changes.
I adapted the script to run from the QGIS Python console and output tiles ready for Leaflet or Mapbox deployments.
Data and methodology
I started from the existing GIS Stack Exchange reference, audited breakages caused by the QGIS migration, and rebuilt compatibility function by function.
The workflow focused on exporting designer-defined map styles as reusable web tiles with minimal extra tooling.
Key decisions
- Prioritized compatibility with QGIS 3 and Python 3 over adding new features, because restoring reliability was the core need.
- Kept execution inside QGIS to match cartographers' daily environment and avoid extra engineering handoffs.
- Published both demo and source so teams could validate the output quickly and fork the script when needed.
Result
The result was an operational tile export script and public demo that proved direct QGIS-to-web tile generation.
Impact and learnings
- It reduced friction between cartographic design and web publication, making map production faster for multidisciplinary teams.