<?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: Reclass with ArcPy in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/reclass-with-arcpy/m-p/706268#M54659</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course.. Now it succeded but it doesn't appear anywhere. At the parameters of the tool I have put the inDEM as Raster Layer/ Input and outDEM as Raster Layer/ Output. I don't see the problem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 15 Nov 2015 18:48:05 GMT</pubDate>
    <dc:creator>KONPETROV</dc:creator>
    <dc:date>2015-11-15T18:48:05Z</dc:date>
    <item>
      <title>Reclass with ArcPy</title>
      <link>https://community.esri.com/t5/python-questions/reclass-with-arcpy/m-p/706262#M54653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I am trying to bulid a python tool in which the user will import a DEM and that tool will reclassify it in 3 classes, for maxheight-10, maxheight-20 &amp;amp; maxheight-30 meters to use it for other process. I have created that code but I always get an error that RemapRange is not defined. Why is that? I am using ArcGIS 10.2.2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# Import system modules
import arcpy


# Set environment settings
inWorkspace = arcpy.GetParameterAsText(0)
inDEM = arcpy.GetParameterAsText(1)
outDEM = arcpy.GetParameterAsText(2)


# Get Raster Properties
maxvalue = arcpy.GetRasterProperties_management(inDEM, "MAXIMUM")
minvalue = arcpy.GetRasterProperties_management(inDEM, "MINIMUM")
minvalue2 = (minvalue.getOutput(0))
maxvalue2 = (maxvalue.getOutput(0))


# Conversion of max value to integer
intmaxvalue = int(float(maxvalue.getOutput(0)))


# Creation of classes per 10 meters until intmaxvalue-30 meters
class1 = intmaxvalue - 10
class2 = intmaxvalue - 20
class3 = intmaxvalue - 30


#Reclass DEM
reclassfield = "Value"
myRemapRange = RemapRange([[minvalue, class3, 4], [class3, class2, 3], [class2, class1, 2], [class1, maxvalue2, 1]])
outReclass = Reclassify(inDEM, reclassfield, myRemapRange)
outReclass.save(outDEM)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:40:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reclass-with-arcpy/m-p/706262#M54653</guid>
      <dc:creator>KONPETROV</dc:creator>
      <dc:date>2021-12-12T05:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: Reclass with ArcPy</title>
      <link>https://community.esri.com/t5/python-questions/reclass-with-arcpy/m-p/706263#M54654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are 3 numbers&amp;nbsp; in the range you appear to have 2 &lt;A href="http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-spatial-analyst/an-overview-of-transformation-classes.htm" title="http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-spatial-analyst/an-overview-of-transformation-classes.htm"&gt;RemapRange—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Nov 2015 18:31:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reclass-with-arcpy/m-p/706263#M54654</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-11-15T18:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: Reclass with ArcPy</title>
      <link>https://community.esri.com/t5/python-questions/reclass-with-arcpy/m-p/706264#M54655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried that also, and I have the same error&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Nov 2015 18:33:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reclass-with-arcpy/m-p/706264#M54655</guid>
      <dc:creator>KONPETROV</dc:creator>
      <dc:date>2015-11-15T18:33:01Z</dc:date>
    </item>
    <item>
      <title>Re: Reclass with ArcPy</title>
      <link>https://community.esri.com/t5/python-questions/reclass-with-arcpy/m-p/706265#M54656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;print out the remaprange so people can see the output without having to do it themselves&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Nov 2015 18:35:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reclass-with-arcpy/m-p/706265#M54656</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-11-15T18:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Reclass with ArcPy</title>
      <link>https://community.esri.com/t5/python-questions/reclass-with-arcpy/m-p/706266#M54657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Traceback (most recent call last):&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "C:\Users\KOSTAS\Desktop\code.py", line 25, in &amp;lt;module&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; myRemapRange = RemapRange([[minvalue, class3, 4], [class3, class2, 3], [class2, class1, 2], [class1, maxvalue2, 1]])&lt;/P&gt;&lt;P&gt;NameError: name 'RemapRange' is not defined&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Failed to execute (MAXIMUMViewshedAnalysis)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the message&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Nov 2015 18:36:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reclass-with-arcpy/m-p/706266#M54657</guid>
      <dc:creator>KONPETROV</dc:creator>
      <dc:date>2015-11-15T18:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Reclass with ArcPy</title>
      <link>https://community.esri.com/t5/python-questions/reclass-with-arcpy/m-p/706267#M54658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh and check the 2nd code example, you need to import sa&lt;/P&gt;&lt;P&gt;&lt;SPAN class="kn"&gt;from&lt;/SPAN&gt; &lt;SPAN class="nn"&gt;arcpy.sa&lt;/SPAN&gt; &lt;SPAN class="kn"&gt;import&lt;/SPAN&gt; &lt;SPAN class="o"&gt;*&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Nov 2015 18:36:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reclass-with-arcpy/m-p/706267#M54658</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-11-15T18:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: Reclass with ArcPy</title>
      <link>https://community.esri.com/t5/python-questions/reclass-with-arcpy/m-p/706268#M54659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course.. Now it succeded but it doesn't appear anywhere. At the parameters of the tool I have put the inDEM as Raster Layer/ Input and outDEM as Raster Layer/ Output. I don't see the problem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Nov 2015 18:48:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reclass-with-arcpy/m-p/706268#M54659</guid>
      <dc:creator>KONPETROV</dc:creator>
      <dc:date>2015-11-15T18:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: Reclass with ArcPy</title>
      <link>https://community.esri.com/t5/python-questions/reclass-with-arcpy/m-p/706269#M54660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I can't tell since I don't know what the output dem filename is and whether you have your environments set to add the results automatically to disk, or whether you are running the script with arcmap running, or whether you are using an external python ide or the one built into arcmap.&amp;nbsp; More details are needed and print statements would help those on this site narrow down the problems you are having.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Nov 2015 18:56:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reclass-with-arcpy/m-p/706269#M54660</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-11-15T18:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: Reclass with ArcPy</title>
      <link>https://community.esri.com/t5/python-questions/reclass-with-arcpy/m-p/706270#M54661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellent. The only problem is that I have a value that is propably is NO DATA and it appears separate from the classes. How can i fix that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Nov 2015 19:03:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reclass-with-arcpy/m-p/706270#M54661</guid>
      <dc:creator>KONPETROV</dc:creator>
      <dc:date>2015-11-15T19:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: Reclass with ArcPy</title>
      <link>https://community.esri.com/t5/python-questions/reclass-with-arcpy/m-p/706271#M54662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/arcpy/spatial-analyst/an-overview-of-transformation-classes.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/spatial-analyst/an-overview-of-transformation-classes.htm"&gt;RemapRange—Spatial Analyst module | ArcGIS for Desktop&lt;/A&gt; shows how to deal with nodata values, it will always be a separate class&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Nov 2015 19:37:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reclass-with-arcpy/m-p/706271#M54662</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-11-15T19:37:16Z</dc:date>
    </item>
  </channel>
</rss>

