<?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: Infinity in Reclassify's RemapRange() ? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/infinity-in-reclassify-s-remaprange/m-p/22584#M1755</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I solved my own problem. Instead of using some default "high value" or float("inf"), I use the &lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//0017000000m7000000" rel="nofollow noopener noreferrer" target="_blank"&gt;GetRasterProperties function&lt;/A&gt; to get the max value of the input raster being reclassified, and then use that (max+1) in the remap range object ( just to be sure... float point arithmetic etc).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Max_Value_Result=arcpy.GetRasterProperties_management(EuDist_Ra_wStats,"MAXIMUM")
Max_Ra_Value=float(Max_Value_Result.getOutput(0))
arcpy.AddMessage("Max Raster Value is {0}.".format(Max_Ra_Value)) &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 20:55:12 GMT</pubDate>
    <dc:creator>DavidWasserman</dc:creator>
    <dc:date>2021-12-10T20:55:12Z</dc:date>
    <item>
      <title>Infinity in Reclassify's RemapRange() ?</title>
      <link>https://community.esri.com/t5/python-questions/infinity-in-reclassify-s-remaprange/m-p/22583#M1754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Python Community, &lt;BR /&gt;I have been using python for a few years now, but just recently started learning arcpy through &lt;A href="http://www.amazon.com/Python-Scripting-ArcGIS-Paul-Zandbergen/dp/1589482824"&gt;&lt;SPAN style="color: #0066c0; font-size: 13px; font-family: Arial, sans-serif;"&gt;Zandbergen&lt;/SPAN&gt;'s book&lt;/A&gt;. &lt;BR /&gt;I am trying to make a statistics based reclassification tool, and one of the elements I am using is the &lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//005m0000007m000000"&gt;RemapRange object&amp;nbsp; (Takes in doubles) &lt;/A&gt;in ArcGIS 10.3.&amp;nbsp; I don't think the rest of the script is relevant, but the relevant portion is:&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14260989076706032" data-renderedposition="93.33333587646484_8_911_16" jivemacro_uid="_14260989076706032"&gt;&lt;P&gt;myremap=RemapRange([[0,Mean,9]......,[Mean+(Qrt_StD*7),float("inf"),1])&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now when I use infinity, this step is passed and no error is given. When I use a really large number like 1000000000000, it gives me the desired output. &lt;BR /&gt;My problem is a really large number is not a really robust solution,&lt;A href="http://gis.stackexchange.com/questions/21666/how-to-write-infinity-to-a-feature-class-in-arcpy"&gt; some forums&lt;/A&gt;, suggest ArcGIS might have problems with infinity in some circumstances, and the documentation does not mention infinity explicitly (understanding its limitations generally, is understandable).&lt;BR /&gt;My questions are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.WHat is the best way to represent "the end of the range" with a RemapRange ? Do you leave it blank? Some scripts do that, but that did not run or gave a syntax error when I tried it.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2.Is the best way to handle this to use a different function? Some suggested using the largest number possible for Floating points/doubles.&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;ANSWER:&lt;/SPAN&gt;&lt;/STRONG&gt; For me what worked best was finding the max value property of the incoming raster and use that value +1. &lt;/P&gt;&lt;P&gt;3. What are reasonable ways to represent infinity in arcpy? (Is it just this object?)&lt;/P&gt;&lt;P&gt;4. Is there anything I could be missing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;BR /&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2015 20:26:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/infinity-in-reclassify-s-remaprange/m-p/22583#M1754</guid>
      <dc:creator>DavidWasserman</dc:creator>
      <dc:date>2015-03-11T20:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: Infinity in Reclassify's RemapRange() ?</title>
      <link>https://community.esri.com/t5/python-questions/infinity-in-reclassify-s-remaprange/m-p/22584#M1755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I solved my own problem. Instead of using some default "high value" or float("inf"), I use the &lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//0017000000m7000000" rel="nofollow noopener noreferrer" target="_blank"&gt;GetRasterProperties function&lt;/A&gt; to get the max value of the input raster being reclassified, and then use that (max+1) in the remap range object ( just to be sure... float point arithmetic etc).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Max_Value_Result=arcpy.GetRasterProperties_management(EuDist_Ra_wStats,"MAXIMUM")
Max_Ra_Value=float(Max_Value_Result.getOutput(0))
arcpy.AddMessage("Max Raster Value is {0}.".format(Max_Ra_Value)) &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:55:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/infinity-in-reclassify-s-remaprange/m-p/22584#M1755</guid>
      <dc:creator>DavidWasserman</dc:creator>
      <dc:date>2021-12-10T20:55:12Z</dc:date>
    </item>
  </channel>
</rss>

