<?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 Adding two conditional statement for raster value replacing using ArcPy? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/adding-two-conditional-statement-for-raster-value/m-p/724642#M56103</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #242729; background-color: rgba(248, 248, 248, 0.6); border: 0px; margin: 0px 0px 1em;"&gt;I am trying to add two conditional function (whatever value of raster fall between 0 and 1 range remain same other value replace by 0), so far i have i can put single condition only but i am trying to execute two function. . Below is my conditional statement script line.&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;outRaster &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; Con&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;localRaster &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; localRaster&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="color: #242729; background-color: rgba(248, 248, 248, 0.6); border: 0px; margin: 0px 0px 1em;"&gt;Above&amp;nbsp;code only can replace whatever raster value below 0 will replace by 0, but how to add this condition &amp;gt; 0.0 and &amp;lt; 1 remain same and other value replace by 0.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 01 Oct 2016 09:04:15 GMT</pubDate>
    <dc:creator>ShouvikJha</dc:creator>
    <dc:date>2016-10-01T09:04:15Z</dc:date>
    <item>
      <title>Adding two conditional statement for raster value replacing using ArcPy?</title>
      <link>https://community.esri.com/t5/python-questions/adding-two-conditional-statement-for-raster-value/m-p/724642#M56103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #242729; background-color: rgba(248, 248, 248, 0.6); border: 0px; margin: 0px 0px 1em;"&gt;I am trying to add two conditional function (whatever value of raster fall between 0 and 1 range remain same other value replace by 0), so far i have i can put single condition only but i am trying to execute two function. . Below is my conditional statement script line.&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;outRaster &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; Con&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;localRaster &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; localRaster&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="color: #242729; background-color: rgba(248, 248, 248, 0.6); border: 0px; margin: 0px 0px 1em;"&gt;Above&amp;nbsp;code only can replace whatever raster value below 0 will replace by 0, but how to add this condition &amp;gt; 0.0 and &amp;lt; 1 remain same and other value replace by 0.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Oct 2016 09:04:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/adding-two-conditional-statement-for-raster-value/m-p/724642#M56103</guid>
      <dc:creator>ShouvikJha</dc:creator>
      <dc:date>2016-10-01T09:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: Adding two conditional statement for raster value replacing using ArcPy?</title>
      <link>https://community.esri.com/t5/python-questions/adding-two-conditional-statement-for-raster-value/m-p/724643#M56104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;outRaster &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; Con&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;localRaster &lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Con&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;localRaster &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; localRaster&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;if the localraster is &amp;gt; 0, then do a check to see if it is &amp;lt; 1. &amp;nbsp;If it is &amp;lt;1, it will be &amp;gt;= 0 and &amp;lt; 1... sooo keep the value&lt;/P&gt;&lt;P&gt;If not... assign it 0, in both cases&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Oct 2016 09:14:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/adding-two-conditional-statement-for-raster-value/m-p/724643#M56104</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-10-01T09:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: Adding two conditional statement for raster value replacing using ArcPy?</title>
      <link>https://community.esri.com/t5/python-questions/adding-two-conditional-statement-for-raster-value/m-p/724644#M56105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/3116"&gt;Dan Patterson&lt;/A&gt;‌. Thank you. Now Perfectly &amp;nbsp;its working. &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Oct 2016 09:23:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/adding-two-conditional-statement-for-raster-value/m-p/724644#M56105</guid>
      <dc:creator>ShouvikJha</dc:creator>
      <dc:date>2016-10-01T09:23:08Z</dc:date>
    </item>
  </channel>
</rss>

