import arcpy, os from arcpy.sa import * from arcpy import env arcpy.CheckOutExtension("Spatial") arcpy.env.overwriteOutput = True ws = arcpy.env.workspace=r"X:\DATA\Raster_LC.gdb" arcpy.env.extent = r"X:\DATA\Raster_LC.gdb\Study_Area_ras" arcpy.env.mask = r"X:\DATA\Raster_LC.gdb\Study_Area_ras" arcpy.env.snapRaster = r"X:\DATA\Raster_LC.gdb\Study_Area_ras" ##### Following section Converts nodata to 0 values within the extent of the above mask. TreeAd = Reclassify("New_Trees", "Value", RemapValue ([["NODATA", 0], [700, 1000]])) TreeAd.save("Trees_Ad_0") TreeAd = "Trees_Ad_0" TreeErase = Reclassify("Remove_Trees", "Value", RemapValue ([["NODATA", 0], [100, 30]])) TreeErase.save("Tree_Erase_0") TreeErase = "Tree_Erase_0"
Solved! Go to Solution.
import arcpy, os from arcpy.sa import * from arcpy import env arcpy.CheckOutExtension("Spatial") arcpy.env.overwriteOutput = True ws = arcpy.env.workspace=r"X:\DATA\Raster_LC.gdb" arcpy.env.extent = r"X:\DATA\Raster_LC.gdb\Study_Area_ras" arcpy.env.mask = r"X:\DATA\Raster_LC.gdb\Study_Area_ras" arcpy.env.snapRaster = r"X:\DATA\Raster_LC.gdb\Study_Area_ras" ##### Following section Converts nodata to 0 values within the extent of the above mask. TreeAd = Reclassify("New_Trees", "Value", RemapValue ([[700, 1000], ["NODATA", 0]])) TreeAd.save("Trees_Ad_0") TreeAd = "Trees_Ad_0" TreeErase = Reclassify("Remove_Trees", "Value", RemapValue ([[100, 30], ["NODATA", 0]])) TreeErase.save("Tree_Erase_0") TreeErase = "Tree_Erase_0"
import arcpy, os from arcpy.sa import * from arcpy import env arcpy.CheckOutExtension("Spatial") arcpy.env.overwriteOutput = True ws = arcpy.env.workspace=r"X:\DATA\Raster_LC.gdb" arcpy.env.extent = r"X:\DATA\Raster_LC.gdb\Study_Area_ras" arcpy.env.mask = r"X:\DATA\Raster_LC.gdb\Study_Area_ras" arcpy.env.snapRaster = r"X:\DATA\Raster_LC.gdb\Study_Area_ras" ##### Following section Converts nodata to 0 values within the extent of the above mask. TreeAd = Reclassify("New_Trees", "Value", RemapValue ([[700, 1000], ["NODATA", 0]])) TreeAd.save("Trees_Ad_0") TreeAd = "Trees_Ad_0" TreeErase = Reclassify("Remove_Trees", "Value", RemapValue ([[100, 30], ["NODATA", 0]])) TreeErase.save("Tree_Erase_0") TreeErase = "Tree_Erase_0"