Trying to cut geotif with a shp file.
When I open Python command line interpreter and run
from osgeo import gdal gdal.Warp(outfile, infile,format='GTiff', cutlineDSName=shpfile, srcSRS='EPSG:4326', dstSRS='EPSG:4326', dstNodata=-9999)
it creates the geotif as expected, though shows following output:
Warning 1: for band 1, destination nodata value has been clamped to 0, the original value being out of range. <osgeo.gdal.Dataset; proxy of <Swig Object of type 'GDALDatasetShadow *' at 0x7f8c72ac5b10> >
When I do the same within a web server, doing file preparation (projection, transparency, etc.) first with gdal and then trying to cut the file with the same command I get an empty file (0 bytes) and server (gunicorn) restarts.
Linux Mint 18.3
gdal==2.2.2 proj==4.9.3 geos==3.6.2 python==2.7.12 gunicorn==19.7.1
Does anyone have any idea how to make it working in the web server environment?