<?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: Normalizing Data to Data Range Using Raster Calculator in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/normalizing-data-to-data-range-using-raster/m-p/338484#M4748</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi, &lt;BR /&gt;&lt;BR /&gt;I�??d like to normalize map data in raster format to the data range using Raster Calculator. I'm not so much concerned with the accuracy of the method.&lt;BR /&gt; &lt;BR /&gt;e.g. v�??(i) = (v(i) - minA) / (maxA - minA) &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;What is the syntax I need to do this? I am getting problems using the following script:&lt;BR /&gt;&lt;BR /&gt;("raster" - min("raster")) / (max("raster") - min("raster"))&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I could convince you to do this in the Python Window, it would be a lot easier. In that case you can make use of the Raster object in arcpy. Just have a look at the code below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
my_raster = arcpy.Raster(r'obj\objecten')
result = (my_raster - my_raster.minimum) / (my_raster.maximum - my_raster.minimum)
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Basically you load the arcpy module, you define a variable "my_raster" to which you will assign the raster you want to process. &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;In this case I used a raster called "objecten" which resides in a grouplayer called "obj", but you can just specify the name of the raster as it is called in your table of content.&lt;/SPAN&gt;&lt;SPAN&gt; The last line performs the calculation (make sure you have the Spatial Analyst extension switched on). As you can see you can access the minimum and maximum values of a raster, since they are properties of the raster object.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See also:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//002100000017000000" rel="nofollow noopener noreferrer" target="_blank"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//002100000017000000&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//018z00000051000000" rel="nofollow noopener noreferrer" target="_blank"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//018z00000051000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To save the result, you can add another line:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
result.save('yourNameGoesHere')
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It will save it in your current workspace.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Xander&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 16:01:13 GMT</pubDate>
    <dc:creator>XanderBakker</dc:creator>
    <dc:date>2021-12-11T16:01:13Z</dc:date>
    <item>
      <title>Normalizing Data to Data Range Using Raster Calculator</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/normalizing-data-to-data-range-using-raster/m-p/338483#M4747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I???d like to normalize map data in raster format to the data range using Raster Calculator. I'm not so much concerned with the accuracy of the method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;e.g. v???(i) = (v(i) - minA) / (maxA - minA) &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is the syntax I need to do this? I am getting problems using the following script:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;("raster" - min("raster")) / (max("raster") - min("raster"))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 13:18:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/normalizing-data-to-data-range-using-raster/m-p/338483#M4747</guid>
      <dc:creator>VM3</dc:creator>
      <dc:date>2013-08-20T13:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Normalizing Data to Data Range Using Raster Calculator</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/normalizing-data-to-data-range-using-raster/m-p/338484#M4748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi, &lt;BR /&gt;&lt;BR /&gt;I�??d like to normalize map data in raster format to the data range using Raster Calculator. I'm not so much concerned with the accuracy of the method.&lt;BR /&gt; &lt;BR /&gt;e.g. v�??(i) = (v(i) - minA) / (maxA - minA) &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;What is the syntax I need to do this? I am getting problems using the following script:&lt;BR /&gt;&lt;BR /&gt;("raster" - min("raster")) / (max("raster") - min("raster"))&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I could convince you to do this in the Python Window, it would be a lot easier. In that case you can make use of the Raster object in arcpy. Just have a look at the code below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
my_raster = arcpy.Raster(r'obj\objecten')
result = (my_raster - my_raster.minimum) / (my_raster.maximum - my_raster.minimum)
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Basically you load the arcpy module, you define a variable "my_raster" to which you will assign the raster you want to process. &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;In this case I used a raster called "objecten" which resides in a grouplayer called "obj", but you can just specify the name of the raster as it is called in your table of content.&lt;/SPAN&gt;&lt;SPAN&gt; The last line performs the calculation (make sure you have the Spatial Analyst extension switched on). As you can see you can access the minimum and maximum values of a raster, since they are properties of the raster object.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See also:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//002100000017000000" rel="nofollow noopener noreferrer" target="_blank"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//002100000017000000&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//018z00000051000000" rel="nofollow noopener noreferrer" target="_blank"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//018z00000051000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To save the result, you can add another line:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
result.save('yourNameGoesHere')
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It will save it in your current workspace.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Xander&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:01:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/normalizing-data-to-data-range-using-raster/m-p/338484#M4748</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-11T16:01:13Z</dc:date>
    </item>
  </channel>
</rss>

