<?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: Replace no data with zeros in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/replace-no-data-with-zeros/m-p/26756#M1425</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Greetings,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can do this by embedding an IsNull statement within a Con statement.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Con(IsNull("raster"),0, "raster")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You may find these resources useful.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;&lt;A class="jive-link-external-small" href="http://blogs.esri.com/Support/blogs/supportcenter/archive/2011/08/02/null-doesn-t-mean-zero.aspx" rel="nofollow" target="_blank"&gt;How to add different-sized rasters with NoData Values&lt;/A&gt;&amp;nbsp; &lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;&lt;A class="jive-link-external-small" href="http://forums.arcgis.com/threads/33347-Raster-Extents-Calculator-Problems" rel="nofollow" target="_blank"&gt;Raster Extents + Calculator Problems &lt;/A&gt;&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Eric&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Feb 2012 20:25:16 GMT</pubDate>
    <dc:creator>EricRice</dc:creator>
    <dc:date>2012-02-13T20:25:16Z</dc:date>
    <item>
      <title>Replace no data with zeros</title>
      <link>https://community.esri.com/t5/data-management-questions/replace-no-data-with-zeros/m-p/26754#M1423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have multiple rasters of varying extents. The data within are binary (0 or 1 values). I want to do a very simple raster calculation where I sum the number of rasters having a "1" in each pixel. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) I first did a quick calculation on each to set the extent (Map Algebra&amp;gt;Raster Calculator&amp;gt; inraster * 1, while setting the Environment Stettings&amp;gt;Output Coordinates to one that matches my desired extent) - this worked successfully to reset the extent.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Next I want to replace No Data with 0's so that I can perform the sum calculation across all pixels within the extent (if No Data exists in the stack of rasters, no calculation is performed). What is the most efficient way of doing this? Is there an entire different approach I should be taking to tackle this problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance for your help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2012 18:53:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/replace-no-data-with-zeros/m-p/26754#M1423</guid>
      <dc:creator>DiannProsser</dc:creator>
      <dc:date>2012-02-13T18:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Replace no data with zeros</title>
      <link>https://community.esri.com/t5/data-management-questions/replace-no-data-with-zeros/m-p/26755#M1424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;From the &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009z000000ms000000.htm"&gt;help documentation&lt;/A&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Using the Is Null in conjunction with the Con tool, you can change NoData values on a raster to any desired value while retaining the original non-NoData values for the remaining cells.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;---&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;To change NoData value to 0, you can simply use the raster calculator with following statement:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Con(IsNull(raster), 0, raster). &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]11938[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2012 20:18:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/replace-no-data-with-zeros/m-p/26755#M1424</guid>
      <dc:creator>PrasantaBhattarai</dc:creator>
      <dc:date>2012-02-13T20:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: Replace no data with zeros</title>
      <link>https://community.esri.com/t5/data-management-questions/replace-no-data-with-zeros/m-p/26756#M1425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Greetings,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can do this by embedding an IsNull statement within a Con statement.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Con(IsNull("raster"),0, "raster")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You may find these resources useful.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;&lt;A class="jive-link-external-small" href="http://blogs.esri.com/Support/blogs/supportcenter/archive/2011/08/02/null-doesn-t-mean-zero.aspx" rel="nofollow" target="_blank"&gt;How to add different-sized rasters with NoData Values&lt;/A&gt;&amp;nbsp; &lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;&lt;A class="jive-link-external-small" href="http://forums.arcgis.com/threads/33347-Raster-Extents-Calculator-Problems" rel="nofollow" target="_blank"&gt;Raster Extents + Calculator Problems &lt;/A&gt;&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Eric&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2012 20:25:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/replace-no-data-with-zeros/m-p/26756#M1425</guid>
      <dc:creator>EricRice</dc:creator>
      <dc:date>2012-02-13T20:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: Replace no data with zeros</title>
      <link>https://community.esri.com/t5/data-management-questions/replace-no-data-with-zeros/m-p/26757#M1426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you both very much. Success!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The links were helpful also.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 13:27:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/replace-no-data-with-zeros/m-p/26757#M1426</guid>
      <dc:creator>DiannProsser</dc:creator>
      <dc:date>2012-02-14T13:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: Replace no data with zeros; Follow-up Issue Raster Extents + Calculator Problems</title>
      <link>https://community.esri.com/t5/data-management-questions/replace-no-data-with-zeros/m-p/26758#M1427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;A follow-up issue:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Eric, related to the link you sent (&lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/33347-Raster-Extents-Calculator-Problems" rel="nofollow noopener noreferrer" target="_blank"&gt;Raster Extents + Calculator Problems&lt;/A&gt;&lt;SPAN&gt;), when I try to set the Environment Settings then Copy Raster, the output does not encompass the entire extent. Can you see where I'm going wrong in my python script? Or should I post this on the Python page? Thank you!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
outWorkspace = "D:/GIS_Watf/Output_PrepAnalysis/"
inRaster = "D:/GIS_Watf/Output_wi/d074bhgo_wi"
outRaster = outWorkspace + "e074bhgo"

#extent is xmin ymin xmax ymax
&lt;SPAN style="color:&amp;quot;#0000FF&amp;quot;;"&gt;arcpy.env.extent = arcpy.Extent(-2638000, 1870000, 2210000, 5923000)
&lt;/SPAN&gt;
# Process: Copy Raster
&lt;SPAN style="color:&amp;quot;#0000FF&amp;quot;;"&gt;arcpy.CopyRaster_management(inRaster, outRaster, "", "", "", "NONE", "NONE", "")&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:05:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/replace-no-data-with-zeros/m-p/26758#M1427</guid>
      <dc:creator>DiannProsser</dc:creator>
      <dc:date>2021-12-10T21:05:31Z</dc:date>
    </item>
    <item>
      <title>Re: Replace no data with zeros</title>
      <link>https://community.esri.com/t5/data-management-questions/replace-no-data-with-zeros/m-p/26759#M1428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Diann,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How are you confirming the output is not the extent you specified? A visual check perhaps?&amp;nbsp; Are you increasing the extent of the raster? Have you turned on NoData to display as some color so you can visually see where the extent really ends?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would also advise you to set a snap raster so all raster pixels align.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Eric&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 18:24:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/replace-no-data-with-zeros/m-p/26759#M1428</guid>
      <dc:creator>EricRice</dc:creator>
      <dc:date>2012-02-14T18:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: Replace no data with zeros</title>
      <link>https://community.esri.com/t5/data-management-questions/replace-no-data-with-zeros/m-p/26760#M1429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you, Eric. Adding the snap raster fixed it... It's still a little confusing to me why setting the extent alone doesn't do it, but at least it works now! Thank you very much, again!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To answer your questions,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-I was confirming the ouptut by visual inspection - using the identity tool over various parts of my desired extent and could see that nothing was showing up (not even No Data). I could also see from the properties that I didn't have the correct number of cells.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-Yes, I was increasing the extent, not reducing it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 18:36:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/replace-no-data-with-zeros/m-p/26760#M1429</guid>
      <dc:creator>DiannProsser</dc:creator>
      <dc:date>2012-02-14T18:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: Replace no data with zeros</title>
      <link>https://community.esri.com/t5/data-management-questions/replace-no-data-with-zeros/m-p/26761#M1430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am having the same problem that Diann had in the 'Copy Raster' tool.&amp;nbsp; I am trying to increase the extent of a raster.&amp;nbsp; I have changed the environment settings to make sure that my output extent is the same as a larger raster (that encompasses my entire study area) and I have also snapped to this same larger raster.&amp;nbsp; However, the output does not encompass the entire extent, but just remains the same.&amp;nbsp; I have turned on NoData to display as a color so I can visually see where the extent really ends, and looking at the raster properties of the output file, I still have the same number of rows and columns of the input file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there another step that I might be missing?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance for any help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Eric&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2012 00:08:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/replace-no-data-with-zeros/m-p/26761#M1430</guid>
      <dc:creator>EricPalm</dc:creator>
      <dc:date>2012-10-10T00:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: Replace no data with zeros</title>
      <link>https://community.esri.com/t5/data-management-questions/replace-no-data-with-zeros/m-p/26762#M1431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;From the &lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009z000000ms000000.htm"&gt;help documentation&lt;/A&gt;:&lt;BR /&gt;Using the Is Null in conjunction with the Con tool, you can change NoData values on a raster to any desired value while retaining the original non-NoData values for the remaining cells.&lt;BR /&gt;---&lt;BR /&gt;To change NoData value to 0, you can simply use the raster calculator with following statement:&lt;BR /&gt;Con(IsNull(raster), 0, raster). &lt;BR /&gt;[ATTACH=CONFIG]11938[/ATTACH]&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi! I've a similar problem. I want to replace in a grid map, all the values over a threshold with a new value. I cant'use reclassify because my grid is a continuous raster! How can I do it? Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2012 19:12:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/replace-no-data-with-zeros/m-p/26762#M1431</guid>
      <dc:creator>ludovicofrate</dc:creator>
      <dc:date>2012-10-15T19:12:33Z</dc:date>
    </item>
  </channel>
</rss>

