Hello all,
I need some help in creating a raster calculator syntax to extract areas of no change between 2 temporal land cover raster. One is for 2020 and the other for 2021, my idea was to set areas of change as null using setNull.
I started by using this 2020.tif == 2021.tif which gave a boolean raster (0 & 1) for areas of change and no change, however I would like the output to reflect the land cover classes that remained the same between both years as against a boolean result.
I tried using setNull(2020.tif, 2021.tif, 2020.tif != 2021.tif) but I keep getting errors on the syntax.
Would be grateful on some help on this syntax.
Solved! Go to Solution.
Con("2020.tif" == "2021.tif", "2020.tif") # condition, true, false but in this case if not true it will be nodata
If no Input false raster or constant value is specified, NoData will be assigned to those cells that do not result in true from the expression.
Con("2020.tif" == "2021.tif", "2020.tif") # condition, true, false but in this case if not true it will be nodata
If no Input false raster or constant value is specified, NoData will be assigned to those cells that do not result in true from the expression.
Thanks a lot Dan!
This gave me the result I require.
Regards,
Saisai