5

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.

4 Answers 4

8

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

2
  • +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
    Commented Jan 20, 2011 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
    – user681
    Commented Jan 20, 2011 at 19:49
4

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

1
  • 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
    Commented Jan 20, 2011 at 17:01
4

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
3

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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