[gdal-dev] gdal_calc.py else not 0

Benjamin_P benjamin.preisig at metgis.com
Fri Sep 19 06:30:33 PDT 2014


I am posting a response I got from Graeme B. Bell:

To get "1 if zero, or A" you do:

--calc="(A==0)*1 + (A>0)*A"

Don't make 1 your nodata value if it's actually a data value here

G




--
View this message in context: http://osgeo-org.1560.x6.nabble.com/gdal-calc-py-else-not-0-tp5162590p5162914.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list