gih

Extracting Max-Min raster data

Discussion created by gih on Nov 17, 2010
Hi,

I'd previously posted this under 'Spatial Statistics', but feel 'Spatial Analyst' may be more appropriate, so apologies for the repetition.

I'm hoping someone may be able to help me with a query I have regarding use of raster data in ArcGIS 9, ArcMap. I haven't been using the package for long, so I'm still learning some things.

I am trying to predict where the suitable habitat of a plant species is likely to be over time, by considering how temperature and precipitation will change in the future. So far I have masked the species current locations with current temperature data (layer name: Mean_temp) and precipitation data (Mean_prec) to create two new layers (Mean_temp_cur and Mean_prec_cur) detailing these parameters in the current location. The two new layers give the maximum and minimum values (layer high, low values) at each location.

My question regards how I can use this data (max and min values) to interrogate predicted future temperature and precipitation information. I have two additional layers detailing temperature and precipitation information for 2020 (temp_2020 and prec_2020). Currently I am interrogating the 2020 data using a Single Output Map Algebra function, as listed below.

con(temp_2020 <= 90 & temp_2020 >= 20 & prec_2020 <= 40 & prec_2010 >= 20,1,0)

where 90,20 and 40,20 are high/low values from Mean_temp_cur and Mean_prec_cur.

This statement interrogates the data in the two 2020 layers and returns a pixel value of 1 if true and 0 if false. It seems to work fine, but wanting to push the boat out a little further, I have two questions about it.

First, why will the statement:

con(20 <= temp_2020 <= 90 & 20 <= prec_2020 <= 40,1,0)

not work? From what I can see, both statements above are asking the same thing, but the second is more concise. However, for some reason, when I try the second I don't get the correct data returned? Do con statements need to be structured in such a way that only one value is considered at a time?

My second question, is there a method of extracting the max and min values directly from the Mean_temp_cur and Mean_prec_cur layers? In other words, in order to construct the first statement above, I had to look at the relevant layers, note down the max and min (high, low) values, and enter them into the statement. Is there a way to refer to the layers in the statement instead of defining the values definitely? I'm thinking, by referring to max and min values in a layer, the model becomes more flexible, in case max and min values change in the future?

Any help with these questions would be much appreciated. Thanks.

Outcomes