Pixel type and depth issue with 10.5 from 10.1

1117
2
06-12-2017 06:10 PM
AlexChen
New Contributor III

We have a model built in Model Builder in 10.1. Towards migrating this model to 10.5, I came across an issue with raster pixel type and depth.

I ran the "Feature to Raster" tool with a polygon feature class (with a dozen of features) and a Long field with all Null values generated a raster output with 8 Bit and Unsigned Integer in 10.1. The same tool and same input params generated a raster output with 1 Bit and Unsigned Integer in 10.5.

The fact that this tool worked differently in 10.5 stopped the subsequent tools in the model from working while I was testing the migrated model.

I am wondering if there was an upgrade in this tool from 10.1 to 10.5; or whether we should have set up the default raster pixel type and depth in ArcMap? It doesn't seem to be anywhere in Environment Settings or Geoprocessing Options where raster pixel type and depth can be forced.

0 Kudos
2 Replies
DanPatterson_Retired
MVP Emeritus

be aware of the affect of your nodata settings, they can have surprising impacts on the raster output type in some instances.

curtvprice
MVP Esteemed Contributor

Spatial Analyst 10.5 has a major change in that temporary rasters saved in the scratch folder are sa... This has benefits as it takes advantage of .tif compression (much more flexible than grids) and the the much more simple .tif format (no grid folders or info folder to muck with).  Grids also store values with 32-bits where tifs can use as little as 1-bit.  Better yet, the maxint for the Value and Count fields in the .tif raster table can be greater than 2.1e9 (the old INFO VALUE 4 5 B limit applies to Esri Grids). This is a really good thing, I have already seen rasters process that failed at 10.4 because of this change, and some big performance improvements.

Although I am pretty happy about this so far, but there is no denying it is a downside that this may break a few workflows that don't assume things about the output (like bit depth). The fix in ModelBuilder is to set the NoData environment setting keep your NoData working (arcpy.env.NoData = "PROMOTION" is what I'd try), or use Copy Raster to enforce the bit depth you need for the next tool in the chain after the raster is created.

Hey, Spatial Analyst team, we need an ArcGIS blog post about this!