GDAL: defining nodata value for gdal_calc.py

المشرف العام

Administrator
طاقم الإدارة
This old post exactly describes my question:

http://lists.osgeo.org/pipermail/gdal-dev/2011-September/030281.html

I want to copy the numpy ma.masked_outside functionality to mask values in my rasters, and then compute the average of these rasters.

It's not clear to me if this type of masking is possible with gdal_calc.

In that post, they were asking if you can use numpy functions in the calculations, like this:

gdal_calc.py -A layer1.tif -B layer2.tif -C layer3.tif --outfile=test.tif --calc="masked_outside((A,B,C), 50,250).mean"If that's not possible, I'd be interested to know of other ways to mask the data like that - I get the impression that in gdal_calc you can only define nodata to be a fixed value.



أكثر...
 
أعلى