#### [SOLVED] Getting Zonal Statistics of Overlapping Circles?

I have a Buildings (polygon) shp file and a DSM. what I wanted to do was to get the pixel values for all the vertices of those buildings, and find another pixel value just around those vertices (say 2m, but exclude values coinciding with the building) that will give the maximum difference when subtracted to the value of the vertex. Finally, retain only the vertex that gave the maximum difference for each building.

What I did is I used the 'Feature to Point Vertices' in ArcMap to convert my building vertices into a point shp file. Then I made a 2m buffer around these points and I used the Erase tool using the Buildings as the erase feature. I thought I'd get the value for the vertices using 'Extract Values to Point' tool and then use Zonal Stat as Table to get the minimum values on the buffer circles. This is where my problem starts, ArcMap won't perform the Zonal Stat as Table because I have overlapping circles and performing the process on each circle is time consuming.

Does anyone have a suggestion to do it in a more efficient manner?

#### @whuber 2014-04-02 18:04:44

Begin with the elevation raster (the DSM).

1. Compute focal minima and maxima using 2m radial neighborhoods, producing two new rasters.

2. Subtract the original raster from these focal rasters. Take the absolute values of the differences.

3. Compute the local maximum of the two absolute differences in (2): this gives the largest height deviation within 2 meters of each cell.

4. Extract the values from (3) at the building vertex points. The result is a table with one row per point and two attributes: the point identifier and the height deviation.

5. Join the result of (4) back to the building vertex point layer, which (presumably) contains a building identifier. Summarize the height deviations by building, retaining the maximum value. The result is a table with one row per building and an attribute giving the greatest height deviation found around any of its vertices.

6. Join the result of (5) back to the building vertex points (using their common building identifier). The resulting table now has two numerical attributes: the height deviation around each vertex and the maximum height deviation for the building. Select all records where the former equals the latter: these are the vertices where the building's maximum height deviation is realized. (Note that there can be multiple such vertices per building, because there is no guarantee every building has a unique vertex of maximal height deviation.)

The focal operations (1) overcome the problems with overlap. They will tend to be faster than (vector) buffering of the vertices unless there are very few vertices compared to the size of the raster.

The steps in this process are efficient. The raster operations (1-3) consist of two focal operations (with small neighborhoods) and four local (cell-by-cell) calculations. The table-based operations (4-6) consist of one spatial lookup (to extract the raster values) and some joins and summaries, which amount to a small number of passes over the building vertices. For a vertex dataset with n vertices and a DSM with N cells of cellsize c meters, the total effort is O(n log(n)) + O(N/c^2) with small implicit constants. (The logarithmic term accounts for implicit searches in the join and summary operations.)

#### @user28739 2014-04-08 07:04:52

Thank you very much Whuber for the really great idea. Yes, this is more effective than dealing with a lot of vectors especially since I'm always getting that annoying error ("[Field] does not exist") whenever I'm doing Zonal stat as table.

### How to display min and max pixel from Zonal Statistics?

• 2018-03-20 20:58:09
• Francisco Sánchez Acosta
• 44 View
• 2 Score
• Tags:   qgis zonal-statistics