The following question was recently posted to GeoNet:
“I want to add wind direction and strength to a cost distance surface. How do I create a raster surface which incorporates these two factors…?“
In this blog post, the spatial analyst team responds to this user’s question.
The Path Distance tool in the Spatial Analyst toolbox can do part of this. It can be used to create an accumulative cost surface from costs that are determined by the direction of the wind. Unfortunately, Esri doesn’t yet have a way to make cost of motion vary based on both the direction and speed of the wind.
Also, when using Path Distance, it is extremely important to know in advance whether you intend to move from source cells to other cells, or vice versa. You will see that changing this intent changes the result dramatically.
If you decide to use Path Distance to incorporate only wind direction into your accumulative cost surface, here is what we recommend:
You can encode wind direction azimuths (clockwise 0-360 from north, both 0 and 360 are treated as “north”) in the input horizontal raster. In figure 1 below, a 10 x 10 horizontal raster is shown. It has a constant cell value of 90 and represents wind blowing to the east with some uniform speed over the study area.
You should not use wind speed as the friction cost surface, because that cost is paid regardless of which direction you travel through a cell. In fact, Path Distance doesn’t need a cost friction surface at all (nor do the other Path Distance tools: allocation, backlink).
Case 1: Motion from source
Let’s first assume that
- You are sitting on the single source point (the selected blue point in the center of the raster in figure 2).
- That its easiest to move with the wind and impossible to move either against it or at right angles to it.
- That you want to calculate accumulated cost from your source cell to every other cell in the study area.
For this case, you could use a horizontal_factor parameter value of Horizontal Forward Function AND (this is important) a source_direction parameter value of “FROM_SOURCE”. The result is shown in figure 2. You can see that your accumulated cost surface is only defined in areas that can be reached travelling with (or somewhat with) the wind.
Lets go into a bit of detail on how Path Distance turns wind direction into a travel cost (also called a weight). We zoom in on the single source cell and its 8 neighbors:
From that source, we can move in 8 directions to reach a neighbor cell and we need to figure out what the step cost for that move will be.
In our case, the only thing that affects the step cost is wind direction. Each of those 8 step directions makes some angle with the preferred moving direction, which in this case is the wind direction.
We call this angle the horizontal relative moving angle (HRMA) because it is your direction of motion relative to an azimuth value stored in your horizontal raster. Each horizontal factor function turns this HRMA into a weight. In this case, we’ve used the Horizontal Forward Function. See this help topic for more details on HRMA.
The HRMA and horizontal factor function are evaluated twice for each of the 8 possible steps: once for the wind direction at the source cell and once for the direction at the neighbor cell. The two results are then averaged to get the horizontal weight to be used when calculating the cost of a step into the neighbor cell.
Case 2: Motion To Source
Now let’s assume that the single source point represents a location that you want to reach from other points in the study area. In this case, all inputs to Path Distance remain the same, except you now choose a source _direction parameter value of “TO_SOURCE”. Figure 5 shows the result. As you can see, the results are very different.
Why are these results so different? In both cases, the accumulative cost surface is grown outward starting from the source and visiting all other cells; but in the TO_SOURCE case, the calculation of the HRMA is different, so the output of the horizontal factor function applied to that HRMA will also be different. In the TO_SOURCE case the HRMA is the geometric supplement of the HRMA calculated in the FROM_SOURCE case, as shown in figure 6.
To summarize:
Path distance can adjust the cost of motion through a cell based on input data that describes, for each cell, the easiest direction to move through the cell. This calculation can produce very different results, based on whether you want to move from a source to other cells, or from other cells back to the source.
We haven’t explicitly talked about the vertical raster and vertical factor functions, but the reasoning process is basically the same as described above. However, instead of accounting for horizontal influences, the vertical factor determines the cost to overcome the changes in elevations (the slopes) between the cells.
Commenting is not enabled for this article.