<?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 Using conditional statement in ModelBuilder on multiband file in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/using-conditional-statement-in-modelbuilder-on/m-p/93923#M1312</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to run an NDVI on a multiband file; however, some of the pixels within each band have reflectance values less than 0 or greater than 1.&amp;nbsp; I want to set up a conditional statement to run an NDVI if the pixels are not null and set the pixel values to null if they already are.&amp;nbsp; Here's the formula I'm using:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Con("%B4_RC.tif%"&amp;nbsp; ==&amp;nbsp; Null OR "%B3_RC.tif%" == Null , Null , (("%B4_RC.tif%" - "%B3_RC.tif%") / ("%B4_RC.tif%" + "%B3_RC.tif%")))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My total model flow consists of:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. make raster layer (to separate each of the 6 bands in the multiband file)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. raster calculator ('SetNull Band# &amp;lt; 0, Band#' which was calculated for each of the 6 bands to set values less than 0 to null)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. raster calculator (this is where I'm having the problem.&amp;nbsp; I need to run an NDVI just on bands 3 and 4 but only if BOTH bands have non-null values)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there something wrong with my code format?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 May 2013 17:55:50 GMT</pubDate>
    <dc:creator>MelaniePhillips</dc:creator>
    <dc:date>2013-05-21T17:55:50Z</dc:date>
    <item>
      <title>Using conditional statement in ModelBuilder on multiband file</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/using-conditional-statement-in-modelbuilder-on/m-p/93923#M1312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to run an NDVI on a multiband file; however, some of the pixels within each band have reflectance values less than 0 or greater than 1.&amp;nbsp; I want to set up a conditional statement to run an NDVI if the pixels are not null and set the pixel values to null if they already are.&amp;nbsp; Here's the formula I'm using:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Con("%B4_RC.tif%"&amp;nbsp; ==&amp;nbsp; Null OR "%B3_RC.tif%" == Null , Null , (("%B4_RC.tif%" - "%B3_RC.tif%") / ("%B4_RC.tif%" + "%B3_RC.tif%")))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My total model flow consists of:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. make raster layer (to separate each of the 6 bands in the multiband file)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. raster calculator ('SetNull Band# &amp;lt; 0, Band#' which was calculated for each of the 6 bands to set values less than 0 to null)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. raster calculator (this is where I'm having the problem.&amp;nbsp; I need to run an NDVI just on bands 3 and 4 but only if BOTH bands have non-null values)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there something wrong with my code format?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 17:55:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/using-conditional-statement-in-modelbuilder-on/m-p/93923#M1312</guid>
      <dc:creator>MelaniePhillips</dc:creator>
      <dc:date>2013-05-21T17:55:50Z</dc:date>
    </item>
  </channel>
</rss>

