Processing raster difference in Image Analysis

3154
2
01-10-2012 11:31 AM
LauraCockrell
New Contributor
Hi all,
I am using the 'Difference' button to process two rasters using the Processing feature in the Image Analysis Window could use some help with the resulting image.
The image produced is displayed using Colormap and I want to produce a classified raster that shows the difference as three classes: Gain (+ 1.1 to positive X value), No change (-1 to 1), and Loss (-1.1 to negative X value). When I click on Show: Classified, I get a 'Compute Histogram' question box that tells me "The Classified renderer requires the data to have a histogram. Do you want to compute the histogram?" I click Yes and get a 'Classify Renderer' information box that tells me "Unique histogram is not available. You can import class breaks from another layer." Then, 'Initialize Classify Renderer' information box pops up with "Failed to initialize classify renderer (possibly too many unique values)".
I tried to Build Raster Attribute Table for the difference raster, because I figured that if the attribute table was there to define the values of the pixels, it would be easier for GIS to compute the histogram for the classification. I get back "Error Message 000049: Failed to build attribute table" and am instructed that I should make the raster is a single-band integer dataset. Not really sure what that means... Under raster properties I know my raster is a signed integer raster and has a 16-bit pixel depth.
When I try to Calculate Statistics, I get a Python script error, everything freezes and then GIS crashes 😕
I was working on this and somehow got it to work, but cannot seem to duplicate it even though I followed my steps from before. Any advice on working through this issue (or any suggestions on working around it) would be very much appreciated!!
~Laura Cockrell
0 Kudos
2 Replies
JeffreySwain
Esri Regular Contributor
Based on what you have provided, I have a few follow up questions.

1. What bit depth are the rasters that you are finding the difference of? 16 bit as well?
2. Are you sure it is using a color map and not just a color ramp?
3. What is the range of values present in your raster per the statistics?
4. How large is this dataset, file size wise?

It will not be possible to find the raster attribute table if the number of unique values exceeds a threshold established by the properties in the map document, the highest default value is 65,536.  This is set to avoid memory crashes, you can increase that number, but bear in mind it may allow the processing to proceed, but will take a long time to process.  The value can be found under Customize > Options > Raster > Raster Dataset. 

If you are looking to find output values with decimals as indicated, something is not correct as your output appears to be a signed integer.  Without knowing more about the inputs, I would ask you provide more information about the inputs and perhaps the reason the processing is not working will become more clear.
0 Kudos
LauraCockrell
New Contributor
1. The original raster is a 16-bit, continuous, unsigned integer.
2. When the difference layer is produced on-the-fly in the IAW, the product is displayed as a color map. I would like to change the display to Classified and break it into three classes.
---->In lue of this not working, I clipped out the area I am working with as a subset, and THAT I was able to classify, so it is likely that the original raster difference was too large for the function to work.
3. The difference in raster values of the area is -87 to 136 when I use std-dev stretch on the display and -32768 to 32767 when I use a the 'none' under stretch. Not sure if there is a better way to find out that info.
4. The difference data set is 26.85 mb, 3703 columns and 3801 rows of pixels. The landsat image I am working with represents just over 2.2 million acres of land.

As I said above, I clipped the Difference layer with the subset of habitat that I sampled and I was able to break down the classification the way I wanted it. I am just guessing, but it is likely that my laptop was unable to handle the total processing size of the raster and it can handle the size of the data subset much better.
~Laura Cockrell
0 Kudos