numpy where in rasterio calculator

Posted

Note to self: numpy.where gebruiken in de rasterio calculator

rio calc "(where (== 0 (read 1) ) (read 2) (read 1))" input01.tif input02.tif output01.tif --overwrite --not-masked --dtype float32

Dit is gelijk in numpy aan:

numpy.where(input01 == 0, input02, input01.

--not-masked zorgt ervoor dat nodata 0 in input01 niet wordt genegeerd.

Author
Categories python, rasters