2014-04-02 03:06:54 8 Comments

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?

### Related Questions

#### Sponsored Content

#### 0 Answered Questions

### Zonal Statistics As Table with Very Small Polygon

**2018-07-31 20:49:33****Sourav****62**View**0**Score**0**Answer- Tags: arcmap zonal-statistics calculate-values

#### 0 Answered Questions

### Zonal statistics tool excluding some features in ArcMap?

**2018-07-18 02:05:44****Frank****35**View**0**Score**0**Answer- Tags: raster arcmap spatial-analyst zonal-statistics

#### 1 Answered Questions

### [SOLVED] Marking zonal statistics areas with a point

**2018-05-16 23:28:59****itshardtofindanunuse****20**View**0**Score**1**Answer- Tags: arcgis-desktop point arcgis-10.5 zonal-statistics

#### 1 Answered Questions

### [SOLVED] How to treat bias? Calculate zonal statistics proportionally?

**2018-04-12 08:32:35****Canna****40**View**1**Score**1**Answer- Tags: arcgis-desktop spatial-analyst arcgis-10.4 zonal-statistics

#### 0 Answered Questions

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

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

#### 0 Answered Questions

### QGIS Zonal Statistics for polygons is missing results?

**2018-02-01 13:58:55****sha12****254**View**4**Score**0**Answer- Tags: qgis raster polygon zonal-statistics

#### 1 Answered Questions

### [SOLVED] Zonal Statistics As A Table missing Features in Results?

**2015-03-23 19:45:28****Andy B****944**View**0**Score**1**Answer- Tags: arcgis-desktop spatial-analyst zonal-statistics parcel

#### 1 Answered Questions

### [SOLVED] Polygons too Small for Zonal Statistics

**2017-01-09 12:42:32****Jamie2483****397**View**1**Score**1**Answer- Tags: arcgis-desktop arcmap modelbuilder spatial-analyst zonal-statistics

#### 0 Answered Questions

### Using zonal stats on lidar data returns unusual values

**2016-10-18 13:06:49****user3390486****99**View**1**Score**0**Answer- Tags: arcgis-desktop polygon lidar zonal-statistics

#### 3 Answered Questions

### [SOLVED] Zonal average weighted by distance from point

**2015-08-07 09:28:55****Ant1990on****215**View**2**Score**3**Answer- Tags: arcgis-desktop raster modelbuilder distance zonal-statistics

## 1 comments

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

Begin with the elevation raster (the DSM).

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

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

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

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.

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.

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 withnvertices and a DSM withNcells of cellsizecmeters, 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.