I have written a Python package whose main function takes a bounding box as input, reads the according data from a data source of mine and renders it into a
png image which is returned to the caller. On top of this library, one could easily add an
http API or a command line interface for external usage without Python.
Now, I would like to publish my images as a
WMS service so that I can view my layer using any standard
WMS client like
QGIS. Of course it would be possible to implement a fully compliant
WMS API on top of my library, however, the specification is kind of extensive and allows for a lot of mistakes to make.
Is there any tool or library available that would do the heavy lifting of the
WMS API but still can serve my own images which would be created by calling out to my Python library (using pure Python, a command line interface, an HTTP API or whatever works)?
I am aware of the following solutions and do not consider them to be suitable:
- Use GeoServer (or MapServer or uDig or ...) to do the rendering and publish the data as
WMS. The way that my images are created is out of the scope of what GeoServer's styling features are capable of. Maybe I could write my own plugin for it but this sounds kind of heavy.
- Pre-render all possible images, put them into some folder and let that folder be served by
GeoServeror similar tools. However, my data is too dynamic to be proxied for a long time and would outdate pretty quick.