How To Create an Inside Buffer Based on Elevation


This post describes how to create a buffer inside a polygon, of a variable-width, that is based on an increase or decrease in elevation from the perimeter of the polygon. One of the potential uses for this technique, though there are others, is flood modeling.

1) Prepare the elevation data by converting to an integer grid. Most elevation data is in floating point while the Euclidean allocation algorithm usually needs an integer grid to work properly. To retain specificity of vertical units, multiply by an appropriate amount such as 100 to retain two decimal places. Remember to re-divide by the same amount before subtracting or adding from the elevation grid again (step 6) – or just subtract/add by the elevation integer grid.

2) Convert the polygon to polylines. Here is an example of a portion of a polygon that needs buffering:

3) Convert the polylines to a raster grid using the same cell size and extent as the elevation data that you’ll eventually be using. For now it doesn’t matter what the values of the cells are.

4) Use the raster from step 3 as a mask on the integer elevation data so that you have a one-pixel wide raster of the elevations at the perimeter of the polygon.

5) Fill in all the cells inside the perimeter with the value of the nearest perimeter elevation by running a Euclidean allocation. You get a bonus for 70’s style colors.

6) If the aim is to decrement by a certain elevation, do an overlay calculation comparing your original elevation data with the Euclidean allocation data. Pixels where the elevation data are less than the Euclidean allocation data by a specified amount (1 meter, for example) would be assigned to an output dataset while the other pixels would be null. If you are using ArcGIS, you can do a CON raster calculator expression, followed by a reclassification to achieve this. Note that in this example you can see that the original polygon perimeter must not have followed an isoline and therefore the result is not a mostly parallel line. If the original perimeter was an isoline then it would have been easier to use contours instead.

Note: to create a raster grid showing cells that emanate out from a location to a certain elevation, as opposed to filling inward, a cost distance calculation is needed. See Simulate a Flood for more information.

Comments are closed.