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 am using Arcgis 10.1. I have a MODIS raster from the NSIDC website with a pixel resolution of 500 m and an attribute table with the fields 'VALUE' (as the code of snow, clouds, etc.) and 'COUNT' (as the number of pixel in each class (or in each 'VALUE'). I also have a DEM from USGS that I have reprojected to match the Spatial Reference and the pixel resolution of the MODIS (thus increasing the pixel of each cells from the original 83 up to 500 m size). What I would like to do is to have a table (or whatever) showing the area of the snow class for each 200 m elevation ranges (the hypsographic curve of the snow cover). I have reclassified the 500 m resolution DEM as to have 200 m elevation ranges, and now I have a new attribute table showing the 'VALUE' (the different elevation ranges) and their respective pixel 'COUNT'. I've been trying using the Zonal Histogram tool, putting as the input zone my MODIS and as the input value my DEM. The result seemed fine but I noticed that summing the number of pixels of each elevation range within the same class(for instance 'snow' that is the one I need) the final number of pixel is different than the one in the MODIS attribute Table (sometimes a lot different!). No clue why, guess it might be due to spatial difference amongst the two rasters due to the transformation I've made, even though the two rasters were both clipped using the same mask... Here are examples of 2 original Attribute Tables that I have (200 is snow, other numbers are other classes):

    MODIS                 reclissified_DEM
VALUE  COUNT                VALUE  COUNT    
 25    240787                   0      2
100       169                 200 188277
...       ...                 ...    ... 
200     32265                6600      3

Moreover, I also noticed zooming to pixel extent that the pixels of the two rasters do not match, and I think this leads ArcGIS not working as I'd like. Is there a way to match them as to loose the fewer information as possible? Or, is there an easier way to do all this job? See the below image to understand what I mean: not matching pixels Hope You could help me.

share|improve this question
add comment

1 Answer

You can use the Snap Raster environment setting to get the corners of the pixels of your two data sets to align properly.

Based on the screenshot, it looks like you are exactly 1/2 pixel off in both the X and Y directions. This could easily cause the Zonal Histogram tool to incorrectly count the number of pixels. This is because all of the Zonal tools in Spatial Analyst use a cell center method of delineating zones in your input raster. But if your cell centers are perfectly on the edge or corner of the zone raster, who knows what will happen. Hopefully this problem won't arise once you've applied the Snap Raster setting.

share|improve this answer
    
Also try to set your Extent (resources.arcgis.com/en/help/main/10.1/index.html#/…) in environmental settings. –  Tomek Sep 13 '12 at 5:37
2  
+1 It may be useful to know that Zonal Histogram does not count incorrectly. First--behind the scenes--ArcGIS automatically resamples one (or both) of the rasters to a common grid. Then it does its work. So the key to getting verifiable, reproducible results is to prevent ArcGIS from changing your data. Do this by manually resampling all rasters before performing any analysis. –  whuber Sep 13 '12 at 16:58
    
I tried to set both the snap ant the extent from the Environment setting, but I still get the same result... –  umbe1987 Sep 13 '12 at 18:27
    
I think I found the reason why the two rasters are not perfectly overlapping each other: I started my work by clipping the MODIS with the DEM and only later I resampled the pixel size of the DEM to match that of the MODIS. So I think when I first performed the clip, the tool has clipped the MODIS by "cuttting each pixels somewhere inside it", and so now I'm having problems. Question: whuber, how can I manually resample it? Can I convert it to graphic, move its position and then convert it back to a raster? It would be a lot of work if I had to re-do everything, even if I can use Python... –  umbe1987 Sep 13 '12 at 18:38
    
@user9518 Use the Resample tool in Spatial Analyst to manually resample. Don't forget to set the Snap Raster environment in the new geoprocessing window. –  dmahr Sep 13 '12 at 19:09
show 2 more comments

Your Answer

 
discard

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.