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 have a shp file with some rectangles and I want to extract statistics within these areas from a raster image. I prefer ArcMap 9.3.

share|improve this question
add comment

4 Answers 4

up vote 9 down vote accepted

Your task could be done easily by using Zonal Statistics tool of Spatial Analyst extension.

share|improve this answer
    
+1. This assumes the rectangles do not overlap, though. If they do overlap, you need to loop over the rectangles (or over subsets of disjoint rectangles). –  whuber Jan 20 '11 at 16:58
2  
For versions of ArcGIS prior to 10, Hawth's tools has Zonal Statistics ++ which deals with overlapping polygons, give it a shot. spatialecology.com/htools/zonalstats.php –  Dan Patterson Jan 20 '11 at 19:49
add comment

As a free alternative, SAGA GIS contains a module that may do what you want (Grid Statistics for Polygons). http://www.saga-gis.org/saga_modules_doc/shapes_grid/index.html

share|improve this answer
1  
+1. "Grid statistics for polygons" appears only to obtain a limited set of quantiles (5%, 10%, ..., 95%). However, the ability to obtain any quantile (apart from the median) does not exist in ArcGIS, so it's good to know about this capability. –  whuber Jan 20 '11 at 17:01
add comment

You can also use GRASS for zonal statistics. From doc page:

r.statistics is a tool to analyse exploratory statistics of a "cover layer" according to how it intersects with objects in a "base layer". A variety of standard statistical measures are possible (called "zonal statistics" in some GIS).

The available methods are the following:

  • distribution
  • average
  • mode
  • median
  • average deviation
  • standard deviation
  • variance
  • skewness
  • kurtosis
  • minimum
  • maximum
  • sum
share|improve this answer
add comment

If you need more complex statistics or a free alternative (compared to spatial analyst), you can use raster package in R. From which you can extract pretty much any statistic you can imagine.

share|improve this answer
add comment

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.