I am trying to reclassify DEM using arcpy.sa.Reclassify
and it is showing an error.
Following are my commands:
dem_re=arcpy.sa.Reclassify("dem_extfish.tif","VALUE",arcpy.sa.RemapRange([[391, 677, 1],[677, 963, 2],[963, 1249, 3],[1249, 1535, 4],[1535, 1821, 5],[1821, 2107, 6],[2107, 2393, 7],[2393, 2679, 8],[2679, 2965, 9],[2965, 3242,10]]))
dem_re.save("reclass_dem_eleband.tif")
The above command gives the error:
ExecuteError: ERROR 999999: Error executing function.
Failed to execute (Reclassify).
However, it was reclassified using ArcMap but have been producing the error with ArcPy.
The full error and traceback are as below:
ExecuteError Traceback (most recent call last)
<ipython-input-39-d371dde30892> in <module>()
----> 1 dem_re=arcpy.sa.Reclassify("dem_extfish.tif","VALUE",arcpy.sa.RemapRange([[391, 677, 1],[677, 963, 2],[963, 1249, 3],[1249, 1535, 4],[1535, 1821, 5],[1821, 2107, 6],[2107, 2393, 7],[2393, 2679, 8],[2679, 2965, 9],[2965, 3242,10]]))
C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\sa\Functions.py in Reclassify(in_raster, reclass_field, remap, missing_values)
5751 reclass_field,
5752 remap,
-> 5753 missing_values)
5754 Reclassify.__esri_toolname__ = "Reclassify_sa"
5755 Reclassify.__esri_toolinfo__ = [
C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\sa\Utils.py in swapper(*args, **kwargs)
51
52 try:
---> 53 result = wrapper(*args, **kwargs)
54 finally:
55 # Reset the geoprocessor state to the original setting.
C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\sa\Functions.py in Wrapper(in_raster, reclass_field, remap, missing_values)
5745 remap,
5746 out_raster,
-> 5747 missing_values)
5748 return _wrapToolRaster(u"Reclassify_sa", unicode(result.getOutput(0)))
5749 return Wrapper(
C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\geoprocessing\_base.py in <lambda>(*args)
508 val = getattr(self._gp, attr)
509 if callable(val):
--> 510 return lambda *args: val(*gp_fixargs(args, True))
511 else:
512 return convertArcObjectToPythonObject(val)
ExecuteError: ERROR 999999: Error executing function.
Failed to execute (Reclassify).
arcpy.env.workspace
but the error is till there