Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working with the image below and I am trying to find how many pixels are in the grey corners of the image, and I want to assign them a probability of 5%. The bottom layer is my DEM and the top layer is a raster of distances. I know how many pixels I have on my raster layer, however I am not sure of how I can get the pixels outside of the circles and how to assign those pixels a probability. I would appreciate any help I can get!

Image Link

share|improve this question
Could you explain how the "probabilities" are supposed to work? How would they affect the counts you are trying to compute? Also, as a new user you cannot post images--it's an anti-spam measure--but if you upload them elsewhere on the Web (try you can link to them. – whuber Jul 10 '12 at 14:46
The probablilies will not effect the counts. I just want to say that there are x amount of pixels in those corners and they have a probability of 5%. For instance, there is a count of 468 cells are are in the center color red those have a probability of 25% – user8759 Jul 10 '12 at 15:32
(I rolled back to a previous version in an effort to get the image link to work, to no avail. In case the problem is at my end, I'm not attempting any further changes for now.) – whuber Jul 10 '12 at 20:40
Rephrasing the question with more context would be helpful if you can't get the image working. – MappingTomorrow Jul 11 '12 at 6:50
Does the Image Link work now? – user8759 Jul 11 '12 at 17:58

Follow these steps in ArcMap 10:

  1. Right click on your DEM, select "Open Attribute Table". Right click "Count" and select "statistics". The "Sum" value is the total number of pixels in your DEM.
  2. Since your rings are beyond the range of your DEM, Use Extract by Mask on your data, with the DEM as the mask and your Rings the input raster. Make sure to use this new ring raster in your analysis. This will ensure the final calculations are accurate.
  3. Repeat step 1 with your rings and calculate the total number of pixels for the ring raster.
  4. Say, for example, your DEM has 10,000 pixels and your ring raster has 7000 pixels. From here, divide your ring pixels by your total DEM pixels (e.g. 7000/10000 = 0.7).

Based on this analysis, you can say there is a 0.3 probability that a randomly selected pixel within the extent of your DEM will fall outside of the rings, yet within the DEM raster (i.e. assuming the cell size is the same for both rasters). I hope this helps you.

share|improve this answer
Aaron, I have downloaded my DEM from the USGS National Seamless Viewer and when I right click I am unable to open the Attribute table. Do you know if there is a way I can go around that? I tried making the DEM a Raster but its not working. =/ – user8759 Jul 11 '12 at 13:52
You are likely working with a 32 bit floating point raster, which cannot utilize the "Build Raster Attribute Table" (Data Management). An easy workaround would be to right click on your DEM in the table of contents and select Properties > Source. From here, multiply the columns and rows, which results in the total number of pixels for your DEM. Your other raster should not be 32 bit floating point, so you should be able to follow step 1 to get the pixel count. – Aaron Jul 11 '12 at 14:14
I'm sorry Im fairly new at using GIS =/ How do I multiply the Columns and Rows/? Do I do that within the layers properties? – user8759 Jul 11 '12 at 14:40
Yes, in "Layer Properties", select the "Source" tab. Look at Raster Information > Colums and Rows. The value should look something like 5980, 7690. Simply multiply 5980*7690 = 45986200, which results in the total number of pixels in your DEM (i.e. assuming your DEM is a rectangle or square). – Aaron Jul 11 '12 at 15:25
Aaron, the layers properties does not allow me to make any changes. It wont let me type anything or do any calculations. – user8759 Jul 11 '12 at 15:38

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.