I have a raster dataset in ArcGIS displaying altitude.
I want to replace all values
< 8 with value
Other values have to stay the same. How can I do this?
I tried raster calculator, but I don't seem to get the expression right.
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.Sign up to join this community
With the raster calculator, you can use the Con() statement(condiotion, value if true, value if false)
Con("raster" < 8 , 8, "raster")
# Import system modules import arcpy from arcpy import env from arcpy.sa import * # Set environment settings env.workspace = "C:/project/input/data" # Execute Con outCon = Con("altitude" < 8, 8, "altitude") # Save the outputs outCon.save("C:/project/output/output.img")