A Python 3 with GDAL template for spatial operations in OpenFaaS.
faas template pull https://github.com/richardbischof/openfaas-python3-gdal-template
Create a new function
faas new --lang python3-gdal <fn-name>
Replace example gdal.VersionInfo() with your own logic.
def handle(req):
return gdal.VersionInfo()
Build, push and deploy
faas up -f <fn-name>.yml
Execute function
echo -n "<your-payload>" | faas invoke <fn-name> -