# How to create a field with a specified slope projecting from a 3D polygon

Im trying to figure out how to create a elevation raster from a known location (3D polygon) that projects at a specified slope (1%) for a specified distance(1-2 km). Does anyone have any idea how to do this?

-

Multiply the polygon's Euclidean distance grid by 1/100. This slope will increase away from the polygon. To make the slope decrease downwards from the polygon, multiply by -1/100 rather than +1/100. An illustration (for a polyline rather than a polygon, but the method is identical) is given in another thread at http://gis.stackexchange.com/a/17805.

To obtain the specified limiting distance, you will get a lot of control by creating a mask for the Euclidean Distance calculation. For instance, use a 2000 m buffer of the polygon as the mask.

To place the polygon at a fixed elevation, add that elevation to the previous result. Thus, for example, a Map Algebra expression might look like

``````Slope = 300 - (1/100) * [Euclidean distance to polygon]
``````

### Edit

When the polygon boundary is at varying elevations, convert those elevations to a categorical (integer) grid if necessary. (Reduce the discretization effect by rounding to the nearest 1/10 or 1/100 of a meter if you like.)

As before, compute the Euclidean distance grid.

Also compute the Euclidean allocation grid for the boundary: the values in this grid give the elevations of the nearest polygon cell.

Now perform the same subtraction as before, as in

``````Slope = [Euclidean allocation] - (1/100) * [Euclidean distance]
``````

(The color breakpoints have changed slightly to accommodate the greater range of elevations in the resulting grid.)

You can see the problems with a varying elevation along the boundary. They are akin to what is observed in a complicated sloping roof: although the roof may have constant slope everywhere, the ridges and valleys have lower slopes. Therefore you cannot (usually) obtain a surface of constant slope emanating from the original polygon (unless that polygon's boundary behaves like the intersection of a cone of the desired slope and a right prism based on the polygon).

-
If the polygon boundary does not have a constant elevation, you cannot usually get a solution at all. An approximate solution can be obtained but it's a little involved so I have refrained from specifying it. Let me know if you need that refinement. –  whuber Dec 20 '11 at 0:18
Hi William - Thanks for responding to this. The polygons I have are not constant elevation but I think approximate solutions will be fine. I was thinking of creating a raster field with the known elevations at the center and then using a multi-buffer with widths set at the same increment as the pixel size (10m). I would then somehow use a nearest neighbor window and calculation (similar to what you have recommended for 2D) to determine incrementally as a person moves through the buffers the new elevations at the prescibed gradient. The polygons are within larger polygons as a mask. –  Ben Smith Dec 20 '11 at 23:57
I have illustrated one solution, @Ben. –  whuber Dec 21 '11 at 3:04
Thanks, this works quite well. –  Ben Smith Dec 23 '11 at 15:58