I want to reclassify a raster in one folder, rename it and put it in new folder using

المشرف العام

Administrator
طاقم الإدارة
I've been combing stack exchange and I cannot figure it out. I have a raster "slope_tif_18TXK030910", I want to reclassify it, rename it and put it into a new folder. this is what I have and it works fine BUT it comes out just named "reclass_" instead of "reclass_slope_tif_18TXK030910"

# Import system modulesimport arcpyfrom arcpy import envimport osfrom arcpy.sa import *# Check out the ArcGIS Spatial Analyst extension licensearcpy.CheckOutExtension("Spatial")inputFolder = r'E:\BLSK_HSI\practice_fish'env.workspace = inputFolderoutputFolder = r'E:\BLSK_HSI\practiceLC'inRaster = r'E:\BLSK_HSI\practice_fish\slope_tif_18TXK030910.img'reclassField = "VALUE"remap = RemapValue([[-1, 20, 1], [21, 90, 2]])outReclassify = Reclassify(inRaster, reclassField, remap, "NODATA")outname = os.path.join(outputFolder, "reclass_"+".img")outReclassify.save(outname)

أكثر...
 
أعلى