I've been searching for a way to generate server side static maps using Python (or any other languages, doesn't matter).
I can create the maps I want with QGIS (and they look really great) but I don't know how to automate the process.
What I want is;
Creating a map style in QGIS and export it to some kind of XML (there is a plugin named quantumnik but it is not available any more I guess)
Running a query over PostGIS in my Python script
- Creating a shapefile or only a PNG using the dataset returned from query and style XML defined above.
- Repeating the whole process every night with different datasets.
I've played around with Mapnik but couldn't succeed in generating a heatmap yet (https://github.com/stellaeof/mapnik-rasterizers)
I've read about QGIS server, GeoServer, MapServer. But now I am confused since there are a lot of tools around.
Is Mapnik the right direction or are there any better tools for that kind of process?
Or is there a way to use QGIS programmatically on a server?
EDIT:
After trying a lot of different things, I've decided to use GeoServer. I've installed it using using docker container image: https://github.com/kartoza/docker-geoserver It can generate png, gif, jpeg, and also can serve WMS layers that can be integrated with Leafletjs pretty easily.
Only problem is, I am trying to design my maps with QGIS first and then export them to GeoServer using "Geoserver Explorer" plugin and it doesn't work well for labels and some other features. There is no easy way to generate SLD in QGIS I guess. I keep fixing SLD configurations by hand after exporting them to GeoServer. But this is still the best solution I guess.
It would still be great if you can suggest better plugins or ways to integrate QGIS and GeoServer or any other SLD editors.