I am trying to reclassify a raster, "Conifer_Focl", which lives in inputData.gdb. The max value for "Conifer_Focl" is 33.217064. I'm looking to reclassify as:enter image description here

I am following the instructions from RemapRange, yet I am receiving the following error:

File "C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\geoprocessing_base.py", line 510, in return lambda *args: val(*gp_fixargs(args, True)) arcgisscripting.ExecuteError: ERROR 000622: Failed to execute (Reclassify). Parameters are not valid. ERROR 000628: Cannot set input into parameter remap.

import arcpy
from arcpy.sa import *

arcpy.env.workspace = """C:\Users\inputData.gdb"""
inRaster = "Conifer_Focl"
myRemapRange = RemapRange([[0, 1, 100], [1, 2, 85], [2, 3, 75], [3, 4, 65], [4, 7, 40], [7, 10, 20],[10, 33.217064, 0]])

outReclassRR = Reclassify(inRaster, "VALUE", myRemapRange)

Why does this alternate code work (exported from model)? I don't see an output raster name requested.

arcpy.gp.Reclassify_sa("Conifer_Focl", "VALUE", "0 1 100;1 2 85;2 3 75;3 4 65;4 7 40;7 10 20;10 33.217064 0", "Conifer_Modifier_Model3", "DATA")
  • I think you have your ranges the wrong way around, Can you expand on what your final output values should be? Note the newValue should be an integer. It should be arcpy.sa.Reclassify but you've imported everything from arcpy.sa. Aug 15 '17 at 4:39
  • @MichaelStimson Thanks. Updated with the integer values (decimal values were a previous run).
    – ENIAC-6
    Aug 15 '17 at 4:45
  • Welcome to GIS SE! As a new user be sure to take the Tour where you will see that there should be only one question asked per question under our focussed Q&A format.
    – PolyGeo
    Aug 15 '17 at 4:46
  • Does it still give the same error with integer values? It works for me, but as arcpy.sa.RemapRange([[0, 1, 100]... without the raster it's impossible to check any further. Aug 15 '17 at 4:48
  • maybe you also need to set the remapping of NoData values, since they probably exist in your raster? have you already looked at this post? gis.stackexchange.com/questions/153771/…
    – dru87
    Aug 15 '17 at 11:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.