<?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: nodata option in CopyRaster in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/nodata-option-in-copyraster/m-p/165491#M12714</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I made the suggested change but it did not change any interior water bodies, only those that were on the boundary.&amp;nbsp; I again tried with both the actual and scientific notation numbers.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Aug 2013 14:21:00 GMT</pubDate>
    <dc:creator>MikeKnowles</dc:creator>
    <dc:date>2013-08-20T14:21:00Z</dc:date>
    <item>
      <title>nodata option in CopyRaster</title>
      <link>https://community.esri.com/t5/python-questions/nodata-option-in-copyraster/m-p/165489#M12712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm working with a NETCDF file and am running the following code and the nodata option of the CopyRaster command doesn't appear to be working as I expect.&amp;nbsp; The CopyRaster successfully creates the raster but in the properties the maximum value is still displayed as the value in the CopyRaster command.&amp;nbsp; I've also tried entering the 36-digit number instead of the scientific notation and I get the same result.&amp;nbsp; I'm not sure if it's the large value that's the problem or if I'm overlooking something.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The nc variable I'm working with has the large value for water bodies and the remaining cells between 0-1 (floating point) so if the nodata option worked I'd expect a max &amp;lt;= 1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcpy
from arcpy import env
arcpy.CheckOutExtension("spatial")
from arcpy.sa import *
arcpy.env.overwriteOutput = True

arcpy.env.workspace = r"G:\data\NETCDF"
NetCDFFile = r"G:\data\NETCDF\year.nc"
GDB = r"G:\data\NETCDF\GCM\Hist_Output_Part_Burn4.gdb"
NetCDFFileProp = arcpy.CreateObject("NetCDFFileProperties", NetCDFFile)

##for i in range(0,int(NetCDFFileProp.getDimensionSize("year"))):
for i in range(0,1):
## # convert month from a floating point to an integer (prevents error in naming raster)
 DIMENSION_VALUE = int(NetCDFFileProp.getDimensionValue("year",i))
 print 'Working on Dimension Value: ', DIMENSION_VALUE, '(index ', i, ')'

 # delete existing raster if it exists
 if arcpy.Exists( GDB + "\\" + "year" + str(DIMENSION_VALUE )):
&amp;nbsp; print '--- deleting ', "year" + str(DIMENSION_VALUE)
&amp;nbsp; arcpy.Delete_management( GDB + "\\" + "year" + str(DIMENSION_VALUE ))
 # create raster layer from NetCDF file
 arcpy.MakeNetCDFRasterLayer_md(NetCDFFile, "part_burn", "lon", "lat", "year_"+str(i), "", "year " + str(DIMENSION_VALUE))

 # create raster
 arcpy.CopyRaster_management("year_"+str(i), GDB + "\\" + "Hist_PB_"+str(DIMENSION_VALUE+1895), "", "", "9.96921e+036")

 #reclass raster
#Notify when finished
print "Finished!"&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Aug 2013 19:20:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/nodata-option-in-copyraster/m-p/165489#M12712</guid>
      <dc:creator>MikeKnowles</dc:creator>
      <dc:date>2013-08-19T19:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: nodata option in CopyRaster</title>
      <link>https://community.esri.com/t5/python-questions/nodata-option-in-copyraster/m-p/165490#M12713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you tried setting both background_value and nodata_value to the same number?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 12:53:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/nodata-option-in-copyraster/m-p/165490#M12713</guid>
      <dc:creator>markdenil</dc:creator>
      <dc:date>2013-08-20T12:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: nodata option in CopyRaster</title>
      <link>https://community.esri.com/t5/python-questions/nodata-option-in-copyraster/m-p/165491#M12714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I made the suggested change but it did not change any interior water bodies, only those that were on the boundary.&amp;nbsp; I again tried with both the actual and scientific notation numbers.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 14:21:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/nodata-option-in-copyraster/m-p/165491#M12714</guid>
      <dc:creator>MikeKnowles</dc:creator>
      <dc:date>2013-08-20T14:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: nodata option in CopyRaster</title>
      <link>https://community.esri.com/t5/python-questions/nodata-option-in-copyraster/m-p/165492#M12715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you have Spatial Anayst, you could use Set Null,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;but I am guessing that you don't.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could try exporting using Raster to ASCII &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and editing the ascii file by setting the NODATA_VALUE entry&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and then using ASCII to raster&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;to get your raster back.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 17:03:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/nodata-option-in-copyraster/m-p/165492#M12715</guid>
      <dc:creator>markdenil</dc:creator>
      <dc:date>2013-08-20T17:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: nodata option in CopyRaster</title>
      <link>https://community.esri.com/t5/python-questions/nodata-option-in-copyraster/m-p/165493#M12716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;mdenil, Thank you.&amp;nbsp; The SetNull option ended up accomplishing what I had wanted.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2013 17:32:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/nodata-option-in-copyraster/m-p/165493#M12716</guid>
      <dc:creator>MikeKnowles</dc:creator>
      <dc:date>2013-08-21T17:32:53Z</dc:date>
    </item>
  </channel>
</rss>

