Is there a better way to do this?
I'm trying to create a script that will change classifications of a raster to:
0 for: 0,7-9,15-20,40,62-63,73,78-87,89-130,132-151,153-175,177-203,215,228,251-253
1 for: all others
import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = r'C:\input'
outReclass1 = Reclassify("raster.tif", "Value",
RemapRange([[0,0,0],[7,9,0],[15,20,0],
[40,40,0],[62,63,0],[73,73,0],[78,87,0],
[89,130,0],[132,151,0],[153,175,0],
[177,203,0],[215,215,0],[228,228,0],[251,253,0]]), 1)
outReclass1.save(r'C:\output.gdb')
I was attempting to modify the script from the ArcGIS Resource Center Desktop Help.
Aucun commentaire:
Enregistrer un commentaire