<?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: Extract by mask in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/extract-by-mask/m-p/324223#M4556</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Some of the images have value ranges from 0-255 i.e. the max 256 values in an 8bit raster, while others range from 1-255 - so only 255 values.&amp;nbsp; So when I run my extract and want to have a NoData value - the rasters that already have a maximum number of values for 8bit (256) default to 16bit because they need to include the NoData value therefore create 257 unique values which cannot be held in an 8bit raster.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is a new environment setting (10.1 and later) that may be helpful in this situation:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//001w00000043000000"&gt;NoData (Environment setting) &lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Oct 2013 16:19:24 GMT</pubDate>
    <dc:creator>curtvprice</dc:creator>
    <dc:date>2013-10-17T16:19:24Z</dc:date>
    <item>
      <title>Extract by mask</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/extract-by-mask/m-p/324221#M4554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: dk10&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to extract cells of a raster by using the Extract by Mask option (ArcGIS 10.0 SP4 - windows 7 Pro - SP1).&amp;nbsp; I have 2 raster datasets I want to process and I am getting different results on either.&amp;nbsp; The inputs are both 3 band, 8 Bit Unsigned Integer Rasters (TIFF format), cell size 0.1 meters, No Data Value of 256 and compression = None.&amp;nbsp; When I run the extract by raster arcgis process on them, 1 comes out fine - in the same format as the input, but the 2nd one comes out as a 16-bit unsigned integer TIFF - with a No Data value of 65536.&amp;nbsp; Any thoughts or ideas on why this is?&amp;nbsp; The script below is being used to (with indents of course):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;import arcpy,sys,string,os&lt;BR /&gt;from arcpy.sa import *&lt;BR /&gt;arcpy.CheckOutExtension("Spatial")&lt;BR /&gt;&lt;BR /&gt;def extractds(i):&lt;BR /&gt;&amp;nbsp;&amp;nbsp; arcpy.env.compression = "None"&lt;BR /&gt;&amp;nbsp;&amp;nbsp; inws = "D:/Project/imageprocessing/test"&lt;BR /&gt;&amp;nbsp;&amp;nbsp; outws = "D:/Project/imageprocessing/test"&lt;BR /&gt;&amp;nbsp;&amp;nbsp; arcpy.env.workspace = outws&lt;BR /&gt;&amp;nbsp;&amp;nbsp; clipds = "D:\\Project\\imageprocessing\\Data.gdb\\orthoclip"&lt;BR /&gt;&amp;nbsp;&amp;nbsp; arcpy.env.snapRaster = inws + "\\" + str(i) + ".tif"&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if not arcpy.Exists(outws + "\\" + str(i) + "_extract.tif"):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outextract = ExtractByMask(inws + "\\" + str(i) + ".tif",clipds)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outextract.save(outws + "\\" + str(i) + "_extract.tif")&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;mylist = ['5058A','5058B']&lt;BR /&gt;for i in mylist:&lt;BR /&gt;&amp;nbsp;&amp;nbsp; arcpy.AddMessage(str(i))&lt;BR /&gt;&amp;nbsp;&amp;nbsp; extractds(i)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Screen shot of properties from input:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]28087[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Screen shot of properties from output:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]28088[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for any help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Darryl Klassen&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Oct 2013 15:35:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/extract-by-mask/m-p/324221#M4554</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-10-07T15:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: Extract by mask</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/extract-by-mask/m-p/324222#M4555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: dk10&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After much investigation, I have determined the cause of my issue.&amp;nbsp; Some of the images have value ranges from 0-255 i.e. the max 256 values in an 8bit raster, while others range from 1-255 - so only 255 values.&amp;nbsp; So when I run my extract and want to have a NoData value - the rasters that already have a maximum number of values for 8bit (256) default to 16bit because they need to include the NoData value therefore create 257 unique values which cannot be held in an 8bit raster.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Oct 2013 15:39:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/extract-by-mask/m-p/324222#M4555</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-10-08T15:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Extract by mask</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/extract-by-mask/m-p/324223#M4556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Some of the images have value ranges from 0-255 i.e. the max 256 values in an 8bit raster, while others range from 1-255 - so only 255 values.&amp;nbsp; So when I run my extract and want to have a NoData value - the rasters that already have a maximum number of values for 8bit (256) default to 16bit because they need to include the NoData value therefore create 257 unique values which cannot be held in an 8bit raster.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is a new environment setting (10.1 and later) that may be helpful in this situation:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//001w00000043000000"&gt;NoData (Environment setting) &lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Oct 2013 16:19:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/extract-by-mask/m-p/324223#M4556</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2013-10-17T16:19:24Z</dc:date>
    </item>
  </channel>
</rss>

