Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm trying to apply seperate equations for different land types. I have created a raster containing only the land type I'm interested in. I then reclassed the values to '0'. My plan was to use the raster calculator with the equation and add + "reclassed raster", which would be +0, thus only returning values that are within the area I'm interested in. However, when I try the calculation, it doesn't work properly, giving me something like values from -3e20 to +3e20 but there are no values or points actually there. If I do the raster calculator without the "+ reclassed raster", it works perfectly, so the equation itself (or other data layers) is not the problem. If I look at the reclassed raster, there is no attribute table, and every time I try to build one it fails. Any ideas on what's going wrong or a better way to do this? Thanks!!!

Yes, it's ArcGIS 10.1 with Spatial Analyst. The reclassify doesn't give me an empty raster (only no attribute table), it's only when I use the raster calculator.

share|improve this question
What software and version are you using? It looks like it could be ArcGIS 10.1 with Spatial Analyst but is it? –  PolyGeo Feb 5 '13 at 2:47
-1 Could you add more details? Will remove the downvote as soon as you fix it. –  R.K. Feb 5 '13 at 3:31
With respect to your clarification that reclassify is giving you no table - an output raster that doesn't have a value attribute table (vat) is usually continuous data (i.e. floating decimal values) or is such a large file that it is not efficient for a vat to be built (i.e. huge number of rows/columns even if they are integer values). As for raster calculator giving you empty output, we may need to see the expression you are trying to calculate. –  ccn Feb 5 '13 at 16:17
add comment

1 Answer

up vote 2 down vote accepted

If you provide more detail on how you reclassified and the specific raster calculation used to get the empty data raster (usually indicated by -3e20 to +3e20) that will be helpful in troubleshooting the problem.

Assuming ArcGIS with Spatial Analyst, if reclassify and raster calculator are giving you empty output then try the following two tools to achieve the result you need:

Set Null can be used to set all other values not equal to the one you're interested in as NoData - a much more straightforward method than reclass to change values to NoData.

Extract by Mask can then be used to isolate cells within the other raster wherever there are values in the set null output. And then you can use this masked raster when calculating the corresponding equation (or more efficiently use the SetNull output as a mask in the environments and calculate on the original land raster).

Perhaps a more simplified approach will be to use the Con tool to apply your separate equations inside conditional statements for different land types. Basically, they may look something like this (substitute with your file names):

Con(LandRas == 1, (type equation 1 here), 0)
Con(LandRas == 2, (type equation 2 here), 0)
Con(LandRas == 3, (type equation 3 here), 0)
share|improve this answer
The Con tool looks like it may work. But I don't see anywhere to input the Con(...) as you suggested. When I opened the Con tool, I have "input conditional raster", which I assume would be my land cover raster. Then I have expression (I could put Value=42 (forest)). There is also input true raster (perhaps the raster calculation with the forest equation), and input false raster or contant value (leave blank?). Where would I go to enter the equations as you suggested? –  LeeAnna Feb 5 '13 at 18:16
The above code can be used (with modification of course) directly in raster calculator. See the help topic conditional evaluation with Con for more info on how to set up the Con tool with more complex expressions. To use the Con tool directly, taking example 1 above, enter the following: Input conditional raster: LandRas, Expression: Value = 1, Input true raster: (type equation here), Input false raster: 0, Output: LandEq1 –  ccn Feb 5 '13 at 22:11
Thank you so much! It worked!!! You're a lifesaver! –  LeeAnna Feb 6 '13 at 14:37
If it is resolved- accept the answer. –  Tomek Feb 7 '13 at 11:27
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.