<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Problem with raster Reclassify in python script in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599020#M8712</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is helpful, but still not fixing things.&amp;nbsp; But now I'm starting to think is is how I am building the reclassArg value.&amp;nbsp; if I set a new value to the value of reclassArg and follow hints in the other thread, it clearly shows that my variable is not seeing it as a list.&amp;nbsp; Looks like I need to work on the formatting, then test again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;reclassArg&lt;/P&gt;&lt;P&gt;'[[327.850126532, 1000.0, 1000], [1000.0,&amp;nbsp; 2000.0,&amp;nbsp; 2000], [ 2000.0,&amp;nbsp; 3000.0,&amp;nbsp; 3000], [ 3000.0, 6500.0, 6500]]'&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; zzz = '[[327.850126532, 1000.0, 1000], [1000.0,&amp;nbsp; 2000.0,&amp;nbsp; 2000], [ 2000.0,&amp;nbsp; 3000.0,&amp;nbsp; 3000], [ 3000.0, 6500.0, 6500]]'&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; remap = RemapRange(zzz)&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; remap&lt;/P&gt;&lt;P&gt;RemapRange([['['], ['['], ['3'], ['2'], ['7'], ['.'], ['8'], ['5'], ['0'], ['1'], ['2'], ['6'], ['5'], ['3'], ['2'], [','], [' '], ['1'], ['0'], ['0'], ['0'], ['.'], ['0'], [','], [' '], ['1'], ['0'], ['0'], ['0'], [']'], [','], [' '], ['['], ['1'], ['0'], ['0'], ['0'], ['.'], ['0'], [','], [' '], [' '], ['2'], ['0'], ['0'], ['0'], ['.'], ['0'], [','], [' '], [' '], ['2'], ['0'], ['0'], ['0'], [']'], [','], [' '], ['['], [' '], ['2'], ['0'], ['0'], ['0'], ['.'], ['0'], [','], [' '], [' '], ['3'], ['0'], ['0'], ['0'], ['.'], ['0'], [','], [' '], [' '], ['3'], ['0'], ['0'], ['0'], [']'], [','], [' '], ['['], [' '], ['3'], ['0'], ['0'], ['0'], ['.'], ['0'], [','], [' '], ['6'], ['5'], ['0'], ['0'], ['.'], ['0'], [','], [' '], ['6'], ['5'], ['0'], ['0'], [']'], [']']])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, at least that helps...maybe.&amp;nbsp; &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Nov 2015 02:18:16 GMT</pubDate>
    <dc:creator>RebeccaStrauch__GISP</dc:creator>
    <dc:date>2015-11-04T02:18:16Z</dc:date>
    <item>
      <title>Problem with raster Reclassify in python script</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599011#M8703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cross posting: &lt;A href="https://community.esri.com/space/2145" target="_blank"&gt;Python&lt;/A&gt;​&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm writing a python tool that given a elevation raster (elevation value in meters), converts to a "raster object" with elevation value in feet. I then create a variable based on elevation Range provided be the user to be used with the Reclassify command as a RemapRange.&amp;nbsp; The result of this Reclassify (and maybe one other step eventually) will be input to RasterToPolygon&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've included a very simplified version of the code I have,&lt;/P&gt;&lt;P&gt;The out value of my reclassArg is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [[327.850126532, 1000, 1000], [1000,&amp;nbsp; 2000,&amp;nbsp; 2000], [ 2000,&amp;nbsp; 3000,&amp;nbsp; 3000], [ 3000, 6500, 6500]]&lt;/P&gt;&lt;P&gt;But I have also tried&amp;nbsp; version&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; such as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 327.850126532 1000 1000; 1000&amp;nbsp; 2000&amp;nbsp; 2000;&amp;nbsp; 2000&amp;nbsp; 3000&amp;nbsp; 3000;&amp;nbsp; 3000 6500 6500&lt;/P&gt;&lt;P&gt;and all different variations of the two, based on the "results" snippet, and various help docs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried quite a few different commands and versions of the reclassArg, with the last being from the local ArcGIS 10.3 tool help&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="137424" alt="" class="image-1 jive-image" height="316" src="https://community.esri.com/legacyfs/online/137424_pastedImage_0.png" style="width: 482px; height: 316.41px;" width="482" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But my output raster keeps come out with a single value 127.&amp;nbsp;&amp;nbsp; Full disclosure, before I tried&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outDEMtmp = Reclassify(elevFeet, "Value", RemapRange("{0}".format(reclassArg)), "NODATA")&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outDEMtmp = arcpy.sa.Reclassify(elevFeet, "Value", RemapRange("{0}".format(reclassArg)), "NODATA")&lt;/P&gt;&lt;P&gt;and even&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.gp.Reclassify_sa(elevFeet, "Value", reclassArg, outDEMtmp, "NODATA")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first two (using the [[ ]] list as reclassArg)&amp;nbsp; finishes without an erro, but all values are are "127"&lt;/P&gt;&lt;P&gt;The third option is not reclassifying anything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I admit my spatial analyst skills are very rusty, and the raster-object concept is new (all though similar to the old GRID), but I'm running out of ideas to try, other than running the tools manually.&amp;nbsp; Any help or a good resource on scripting the Reclassify tool would be helpful.&lt;/P&gt;&lt;P&gt;Using 10.3, ArcInfo/Advanced and Spatial Analyst (I have access to 3D if needed).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import os
import arcpy
from arcpy import env
from arcpy.sa import *

arcpy.CheckOutExtension("spatial")

theWorkspace = r"C:\_beartest\Prep.gdb"
arcpy.env.workspace = theWorkspace
arcpy.env.overwriteOutput = True
wsPath, wsGDB = os.path.split(theWorkspace)

rasterIn = r"C:\_beartest\Unit20Araster.gdb\elevClip"

toElevFeet = 3.280839895013123

elevFeet = (Raster(rasterIn) * toElevFeet)
elevMinimum = elevFeet.minimum

elevCutoffFt = "6500"
flatElevBreak = ("1000; 2000; 3000")

# processing the elevation and high-cuttoff variables to create reclass arguments
elevSplit = flatElevBreak.split(";")
lstCnt = 1
for reclassValue in elevSplit:
&amp;nbsp;&amp;nbsp;&amp;nbsp; print(reclassValue)
&amp;nbsp;&amp;nbsp;&amp;nbsp; print("Reclass value:{0} ft".format(reclassValue))
&amp;nbsp;&amp;nbsp;&amp;nbsp; if lstCnt == 1:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reclassArg = ("[[{0}, {1}, {2}]".format(elevMinimum, reclassValue, ("{0}".format(reclassValue))))
&amp;nbsp;&amp;nbsp;&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reclassArg = ("{0}, [{1}, {2}, {3}]".format(reclassArg, prevValue, reclassValue, ("{0}".format(reclassValue))))
&amp;nbsp;&amp;nbsp;&amp;nbsp; lstCnt += 1
&amp;nbsp;&amp;nbsp;&amp;nbsp; prevValue = reclassValue
reclassArg = ("{0}, [{1}, {2}, {3}]]".format(reclassArg, prevValue, elevCutoffFt, ("{0}".format(elevCutoffFt))))
print(reclassArg)

outDEMtmp = arcpy.sa.Reclassify(elevFeet, "Value", RemapRange("{0}".format(reclassArg)), "NODATA")
outDEMtmp.save(elevReclass)

print("hello2")
#arcpy.RasterToPolygon_conversion(outDEMtmp, "reclassPoly", "SIMPLIFY", "VALUE")

arcpy.CheckInExtension("spatial")
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suggestions would be greatly appreciated.&amp;nbsp; Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: added line 18 which was missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Rebecca Strauch, GISP

EDIT: added line 18 which was missing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:43:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599011#M8703</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2021-12-12T01:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with raster Reclassify in python script</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599012#M8704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you are reclassing ranges to the higher of the range...correct? (it should be a list of lists)&lt;/P&gt;&lt;P&gt;can you show the results of your print statements? and perhaps whip in a few more at the various stages&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2015 00:52:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599012#M8704</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-11-04T00:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with raster Reclassify in python script</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599013#M8705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dan, running this in the ArcMap python window....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; import os
... import arcpy
... from arcpy import env
... from arcpy.sa import *
... 
... arcpy.CheckOutExtension("spatial")
... 
... theWorkspace = r"C:\_beartest\Prep.gdb"
... arcpy.env.workspace = theWorkspace
... arcpy.env.overwriteOutput = True
... wsPath, wsGDB = os.path.split(theWorkspace)
... 
... rasterIn = r"C:\_beartest\Unit20Araster.gdb\elevClip"
... 
... toElevFeet = 3.280839895013123
... 
... elevFeet = (Raster(rasterIn) * toElevFeet)
... elevMinimum = elevFeet.minimum
... 
... elevCutoffFt = "6500"
... flatElevBreak = ("1000; 2000; 3000")
... 
... # processing the elevation and high-cuttoff variables to create reclass arguments
... elevSplit = flatElevBreak.split(";")
... lstCnt = 1
... for reclassValue in elevSplit:
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print(reclassValue)
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print("Reclass value:{0} ft".format(reclassValue))
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if lstCnt == 1:
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reclassArg = ("[[{0}, {1}, {2}]".format(elevMinimum, reclassValue, ("{0}".format(reclassValue))))
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reclassArg = ("{0}, [{1}, {2}, {3}]".format(reclassArg, prevValue, reclassValue, ("{0}".format(reclassValue))))
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lstCnt += 1
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; prevValue = reclassValue
... reclassArg = ("{0}, [{1}, {2}, {3}]]".format(reclassArg, prevValue, elevCutoffFt, ("{0}".format(elevCutoffFt))))
... print(reclassArg)
... 
... outDEMtmp = arcpy.sa.Reclassify(elevFeet, "Value", RemapRange("{0}".format(reclassArg)), "NODATA")
... #outDEMtmp.save(elevReclass)
... 
... print("hello2")
... #arcpy.RasterToPolygon_conversion(outDEMtmp, "reclassPoly", "SIMPLIFY", "VALUE")
... 
... arcpy.CheckInExtension("spatial")
... 
1000
Reclass value:1000 ft
 2000
Reclass value: 2000 ft
 3000
Reclass value: 3000 ft
[[327.850126532, 1000, 1000], [1000,&amp;nbsp; 2000,&amp;nbsp; 2000], [ 2000,&amp;nbsp; 3000,&amp;nbsp; 3000], [ 3000, 6500, 6500]]
hello2
&amp;gt;&amp;gt;&amp;gt; &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:43:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599013#M8705</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2021-12-12T01:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with raster Reclassify in python script</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599014#M8706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to figure out where the 127 is coming from (I have my suspicions).&amp;nbsp; Can you change the reclass value ranges by putting a decimal point in the number range and convert to an integer output class ie( 1000.0, 2000.0, 2) just for fun.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/3355"&gt;Curtis Price&lt;/A&gt;​ if you are around, can you pin this down?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2015 01:13:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599014#M8706</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-11-04T01:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with raster Reclassify in python script</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599015#M8707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good thought Dan.&amp;nbsp; At least I'm getting an error now.&amp;nbsp; If I have the reclassArg as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [[327.850126532, 1000.0, 1000], [1000.0,&amp;nbsp; 2000.0,&amp;nbsp; 2000], [ 2000.0,&amp;nbsp; 3000.0,&amp;nbsp; 3000], [ 3000.0, 6500.0, 6500]]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inputting it into the same command...&lt;/P&gt;&lt;P&gt;outDEMtmp = arcpy.sa.Reclassify(elevFeet, "Value", RemapRange("{0}".format(reclassArg)), "NODATA")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am now getting error&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image" height="99" src="https://community.esri.com/legacyfs/online/137425_pastedImage_0.png" style="width: 514px; height: 98.6548px;" width="514" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried simplifying it more, as you suggested and getting same error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reclassArg = "(1000.0, 2000.0, 2)"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print ("new reclassArg: {0}".format(reclassArg))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outDEMtmp = arcpy.sa.Reclassify(elevFeet, "Value", RemapRange("{0}".format(reclassArg)), "NODATA")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got the same error.&amp;nbsp; So, I'm trying a few more reclass command combinations to see if it will make any difference. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;grrrrrrrrr......&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2015 01:33:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599015#M8707</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2015-11-04T01:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with raster Reclassify in python script</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599016#M8708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have to send it as a string representation of a tuple, since you can send the tuple directly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; reclassArg = (1000.0,2000.0,2)&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; print("new version: {}".format(reclassArg))&lt;/P&gt;&lt;P&gt;new version: (1000.0, 2000.0, 2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and since you only have one parameter, you need not specify the parameter number unless you are providing things out of order. eg....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; ObiSpeak = ["Confused", "am", "I"]&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; print("{2} {1} {0}".format(*ObiSpeak))&lt;/P&gt;&lt;P&gt;I am Confused&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2015 01:48:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599016#M8708</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-11-04T01:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with raster Reclassify in python script</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599017#M8709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm at a loss.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dan/Curtis, et al., please send any suggestions if you have them, but time to put in a tech support ticket.&amp;nbsp; Most likely it is my just interpreting the help somehow, but having it comes out as one big 127 value has really got me stumped.&amp;nbsp; I even tried running it against the original elevation raster (meters) and it came out the same, so it has to be something with my range argument.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2015 01:52:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599017#M8709</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2015-11-04T01:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with raster Reclassify in python script</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599018#M8710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dan.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reclassArg = (1000.0,2000.0,2)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fff = arcpy.sa.Reclassify("elevClip", "Value", RemapRange("{0}".format(reclassArg)),"NODATA")&lt;/P&gt;&lt;P&gt;Still came out as 127.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW, I know the {#} isn't necessary, but I find its a good habit for me to be in so I don't screw up when I do reorder.&amp;nbsp; Doesn't hurt anything, IMO.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2015 01:56:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599018#M8710</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2015-11-04T01:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with raster Reclassify in python script</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599019#M8711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hmmmm ringing a bell&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/message/524284"&gt;Re: Reclassify raster - floating point to categorical&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2015 01:59:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599019#M8711</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-11-04T01:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with raster Reclassify in python script</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599020#M8712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is helpful, but still not fixing things.&amp;nbsp; But now I'm starting to think is is how I am building the reclassArg value.&amp;nbsp; if I set a new value to the value of reclassArg and follow hints in the other thread, it clearly shows that my variable is not seeing it as a list.&amp;nbsp; Looks like I need to work on the formatting, then test again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;reclassArg&lt;/P&gt;&lt;P&gt;'[[327.850126532, 1000.0, 1000], [1000.0,&amp;nbsp; 2000.0,&amp;nbsp; 2000], [ 2000.0,&amp;nbsp; 3000.0,&amp;nbsp; 3000], [ 3000.0, 6500.0, 6500]]'&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; zzz = '[[327.850126532, 1000.0, 1000], [1000.0,&amp;nbsp; 2000.0,&amp;nbsp; 2000], [ 2000.0,&amp;nbsp; 3000.0,&amp;nbsp; 3000], [ 3000.0, 6500.0, 6500]]'&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; remap = RemapRange(zzz)&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; remap&lt;/P&gt;&lt;P&gt;RemapRange([['['], ['['], ['3'], ['2'], ['7'], ['.'], ['8'], ['5'], ['0'], ['1'], ['2'], ['6'], ['5'], ['3'], ['2'], [','], [' '], ['1'], ['0'], ['0'], ['0'], ['.'], ['0'], [','], [' '], ['1'], ['0'], ['0'], ['0'], [']'], [','], [' '], ['['], ['1'], ['0'], ['0'], ['0'], ['.'], ['0'], [','], [' '], [' '], ['2'], ['0'], ['0'], ['0'], ['.'], ['0'], [','], [' '], [' '], ['2'], ['0'], ['0'], ['0'], [']'], [','], [' '], ['['], [' '], ['2'], ['0'], ['0'], ['0'], ['.'], ['0'], [','], [' '], [' '], ['3'], ['0'], ['0'], ['0'], ['.'], ['0'], [','], [' '], [' '], ['3'], ['0'], ['0'], ['0'], [']'], [','], [' '], ['['], [' '], ['3'], ['0'], ['0'], ['0'], ['.'], ['0'], [','], [' '], ['6'], ['5'], ['0'], ['0'], ['.'], ['0'], [','], [' '], ['6'], ['5'], ['0'], ['0'], [']'], [']']])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, at least that helps...maybe.&amp;nbsp; &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2015 02:18:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599020#M8712</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2015-11-04T02:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with raster Reclassify in python script</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599021#M8713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check my format string which doesn't cast the variable as a string which yours does, it casts it as a tuple. If you build the table as in curtis's example then you should have the format you need&amp;nbsp; Curtis should be online soon &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2015 02:27:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599021#M8713</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-11-04T02:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with raster Reclassify in python script</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599022#M8714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried that, but that didn't help any. Still getting 127.&amp;nbsp; I've tried various versions of the reclassArg formatting and using the&amp;nbsp; remap =&amp;nbsp; and using the RemapRange(reclassArg) with various formatting...both with .0 and without.&amp;nbsp; All either they come out as 127 or it just doesn't reclass.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe Curtis will have some other ideas.&amp;nbsp; Otherwise, hopefully tech support will have some ideas.&amp;nbsp; I'm getting close to giving up for the night.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2015 02:43:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599022#M8714</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2015-11-04T02:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with raster Reclassify in python script</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599023#M8715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was thinking about his idea of doing it all at once, after building the remap table&lt;/P&gt;&lt;P&gt;eg.&lt;/P&gt;&lt;P&gt;remap = RemapRange([[1000, 2000, 1], [2000, 3000, 2],&amp;nbsp; [3000, 4000, 3]]&lt;/P&gt;&lt;P&gt;out_reclass = Reclassify(raster, "Value", remap, "NODATA")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2015 02:54:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599023#M8715</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-11-04T02:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with raster Reclassify in python script</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599024#M8716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, that worked, but I need to get my reclassArg, which will be created on the fly, into that format.&amp;nbsp; I've been working on that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: after quite a bit more manipulation in getting my reclassArg into a list, I also realized for some reason it wants the new value to not be the same as my reclassValue.&amp;nbsp; No sure what the reason is for that right now, but at least now I might be able to clean it up and get it to work in the morning.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT2: cleaned up script a little...this is a snippet of what ended up working.&amp;nbsp; Super quick now, so I can now continue on.&amp;nbsp; Thanks for you help Dan (and &lt;A href="https://community.esri.com/migrated-users/3355" target="_blank"&gt;Curtis Price&lt;/A&gt;​ via the other thread).&amp;nbsp; It was my reclassArg not being formatted correctly all along. &lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;flatElevBreak = ("1000; 2000; 3000")

elevFeet = (Raster(rasterIn) * toElevFeet)
elevMin = elevFeet.minimum
elevMax = elevFeet.maximum&amp;nbsp; 
print("\n Elevation raster source: {0}".format(elevFeet))

# processing the elevation and high-cuttoff variables to create reclass arguments
elevSplit = flatElevBreak.split(";")
lstCnt = 1
reclassArg = []
for reclassValue in elevSplit:
&amp;nbsp;&amp;nbsp;&amp;nbsp; print(reclassValue)
&amp;nbsp;&amp;nbsp;&amp;nbsp; print("Reclass value:{0} ft".format(reclassValue))
&amp;nbsp;&amp;nbsp;&amp;nbsp; if lstCnt == 1:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reclassArg.append([int(elevMin), int(reclassValue), lstCnt])
&amp;nbsp;&amp;nbsp;&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reclassArg.append([int(prevValue), int(reclassValue), lstCnt])
&amp;nbsp;&amp;nbsp;&amp;nbsp; lstCnt += 1
&amp;nbsp;&amp;nbsp;&amp;nbsp; prevValue = reclassValue
reclassArg.append([int(prevValue), int(elevCutoffFt), lstCnt])
reclassArg.append([int(elevCutoffFt), int(elevMax), 9])
print("{0}".format(reclassArg))
remap&amp;nbsp; = RemapRange(reclassArg)
print("{0}".format(remap))

# Process: Reclassify
outDEMtmp = Reclassify(elevFeet, "Value", remap, "NODATA")

print("hello2")
arcpy.RasterToPolygon_conversion(outDEMtmp, "reclassPoly", "SIMPLIFY", "VALUE")



&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dan, no need to keep refining the code...it works, it's readable...time for me to move on.&amp;nbsp; &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:43:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599024#M8716</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2021-12-12T01:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with raster Reclassify in python script</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599025#M8717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry It is late, I was thinking about how you put it together as well&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;minelev = 649&lt;/P&gt;&lt;P&gt;elevs = [1000,2000,3000]&lt;/P&gt;&lt;P&gt;elevs.insert(0,minelev)&lt;/P&gt;&lt;P&gt;remap = [[elevs[i-1],elevs&lt;I&gt;,elevs&lt;I&gt;] for i in range(1,len(elevs))]&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;print("remap ... {}".format(remap))&lt;/P&gt;&lt;P&gt;#out_reclass = Reclassify(raster, "Value", remap, "NODATA")&amp;nbsp;&amp;nbsp; # then do this thing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;print yields remap ... [[649, 1000, 1000], [1000, 2000, 2000], [2000, 3000, 3000]]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ADDENDUM&lt;/P&gt;&lt;P&gt;an example from one of Curtis's remap examples for weighted overlay&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/message/563054"&gt;Re: Assign Dynamic Influence % to Weighted Overlay Table for Weighted Overlay Analysis&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2015 03:26:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/problem-with-raster-reclassify-in-python-script/m-p/599025#M8717</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-11-04T03:26:18Z</dc:date>
    </item>
  </channel>
</rss>

