<?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: Raster calculator - complex conditional statement in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-complex-conditional-statement/m-p/342202#M4786</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I want to normalize precipitation values with the mean for specific altitude-classes:&lt;BR /&gt;&lt;BR /&gt;I have two input rasters&lt;BR /&gt;&lt;BR /&gt;1: reclassified dtm, with 1==0&amp;gt;dtm&amp;lt;200, 2==200&amp;gt;dtm&amp;lt;400, 3==400&amp;gt;dtm&amp;lt;600, �?�10== if 1800&amp;gt;dtm&amp;lt;2000, 11== dtm&amp;gt;2000&lt;BR /&gt;2: precipitation.&lt;BR /&gt;&lt;BR /&gt;I want to create a statement like&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;if reclassified dtm=1, precipitation should be divided by the value for the average precipitation in 0-200m altitude,&lt;BR /&gt;else if reclassified dtm=2, precipitation should be divided by the value for the average precipitation in 200-400m altitude,&lt;BR /&gt;...&lt;BR /&gt;if reclassified dtm=11, precipitation should be devided by the value for the average precipitation in &amp;gt;2000m altitude.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Is there any way this can be done in raster calculator?&lt;BR /&gt;&lt;BR /&gt;(I have already done statistics to find average precipitation in the different altitudes and reclassified a dtm)&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could do this with nested Con statements, or the Pick tool, but I believe there is an easier way. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The Zonal Statistics tool replicates the mean for the zone for all cells in the zone -- so you can do this with the Raster Calculator tool:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family:Courier New;"&gt;&lt;STRONG&gt;float("precip") / ZonalStatistics("reclass_dtm", "VALUE",&amp;nbsp; "precip", "MEAN")&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Apr 2014 21:36:26 GMT</pubDate>
    <dc:creator>curtvprice</dc:creator>
    <dc:date>2014-04-02T21:36:26Z</dc:date>
    <item>
      <title>Raster calculator - complex conditional statement</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-complex-conditional-statement/m-p/342200#M4784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Raster calculator - complex conditional statement&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need help creating a raster calculator syntax. I want to normalize precipitation values with the mean for specific altitude-classes:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have two input rasters&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1: reclassified dtm, with 1==0&amp;gt;dtm&amp;lt;200, 2==200&amp;gt;dtm&amp;lt;400, 3==400&amp;gt;dtm&amp;lt;600, ???10== if 1800&amp;gt;dtm&amp;lt;2000, 11== dtm&amp;gt;2000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2: precipitation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to create a statement like&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;???if reclassified dtm=1, precipitation should be divided by the value for the average precipitation in 0-200m altitude,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if reclassified dtm=2, precipitation should be divided by the value for the average precipitation in 200-400m altitude,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;???.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if reclassified dtm=11, precipitation should be devided by the value for the average precipitation in &amp;gt;2000m altitude.???&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there any way this can be done in raster calculator?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(I have already done statistics to find average precipitation in the different altitudes and reclassified a dtm)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2014 13:48:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-complex-conditional-statement/m-p/342200#M4784</guid>
      <dc:creator>JonDra</dc:creator>
      <dc:date>2014-03-27T13:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: Raster calculator - complex conditional statement</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-complex-conditional-statement/m-p/342201#M4785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I had a tip about how to write an expression:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Con("dmt_reclass" == 1, "precipitation" / 270) &amp;amp; Con("dmt_reclass" ==&amp;nbsp; 2, "precipitation" / 420) &amp;amp; .....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Where dmt_reclass is of course my reclassified dmt. 270 is the average precipitation in dmt_reclass 1 and so on.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But this won't work for me, my result is just a raster with a novalue it seems like.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm totally new to coding these, so I don't know what I'm doing wrong.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2014 15:06:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-complex-conditional-statement/m-p/342201#M4785</guid>
      <dc:creator>JonDra</dc:creator>
      <dc:date>2014-03-27T15:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: Raster calculator - complex conditional statement</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-complex-conditional-statement/m-p/342202#M4786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I want to normalize precipitation values with the mean for specific altitude-classes:&lt;BR /&gt;&lt;BR /&gt;I have two input rasters&lt;BR /&gt;&lt;BR /&gt;1: reclassified dtm, with 1==0&amp;gt;dtm&amp;lt;200, 2==200&amp;gt;dtm&amp;lt;400, 3==400&amp;gt;dtm&amp;lt;600, �?�10== if 1800&amp;gt;dtm&amp;lt;2000, 11== dtm&amp;gt;2000&lt;BR /&gt;2: precipitation.&lt;BR /&gt;&lt;BR /&gt;I want to create a statement like&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;if reclassified dtm=1, precipitation should be divided by the value for the average precipitation in 0-200m altitude,&lt;BR /&gt;else if reclassified dtm=2, precipitation should be divided by the value for the average precipitation in 200-400m altitude,&lt;BR /&gt;...&lt;BR /&gt;if reclassified dtm=11, precipitation should be devided by the value for the average precipitation in &amp;gt;2000m altitude.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Is there any way this can be done in raster calculator?&lt;BR /&gt;&lt;BR /&gt;(I have already done statistics to find average precipitation in the different altitudes and reclassified a dtm)&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could do this with nested Con statements, or the Pick tool, but I believe there is an easier way. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The Zonal Statistics tool replicates the mean for the zone for all cells in the zone -- so you can do this with the Raster Calculator tool:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family:Courier New;"&gt;&lt;STRONG&gt;float("precip") / ZonalStatistics("reclass_dtm", "VALUE",&amp;nbsp; "precip", "MEAN")&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2014 21:36:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-complex-conditional-statement/m-p/342202#M4786</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2014-04-02T21:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: Raster calculator - complex conditional statement</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-complex-conditional-statement/m-p/342203#M4787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It worked for me if I wrote it like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Con("dmt_reclass" == 1, "precipitation" / 270, Con("dmt_reclass" == 2, "precipitation" / 420, Con("dmt_reclass"==3, "precipitation" / 540)))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So a nested statement that is.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I haven't tried the zonal statistics tool with the raster calculator curtvprice, but I'm going to look into it!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the help guys!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 14:10:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-complex-conditional-statement/m-p/342203#M4787</guid>
      <dc:creator>JonDra</dc:creator>
      <dc:date>2014-04-07T14:10:10Z</dc:date>
    </item>
  </channel>
</rss>

