Instructions for use
Straight-line Distance is a kind of idealized distance, which can not meet the requirements in practical applications. For example, the Straight-line Distance from B to the nearest source A is the same as the Straight-line Distance from C to the nearest source A. If the traffic in the BA section is congested and the traffic in the CA section is smooth, the time consumption must be different; In addition, it is often not feasible to reach the nearest source through the path corresponding to the Straight-line Distance. For example, when encountering obstacles such as rivers and mountains, it is necessary to make a detour. At this time, it is necessary to consider the cost distance.
The cost distance is the actual cost value required to reach the nearest source according to the weighting of one or several attribute factors of each cell, such as the time spent, the money spent, etc. The Generate Cost Distance Raster function generates the corresponding cost Distance Raster, cost direction grid and cost distribution grid according to the Source Dataset and the cost grid.
Cost Distance Raster: is used to express the minimum cost for each cell to reach the nearest source, and the grid value is the cost for the current cell to reach the nearest source. The closest source is the source that costs the least to reach from the current cell. For a valueless grid in a cost grid, the distance result is still valueless.
The Calculator Method of the cost of a cell to the source is to multiply the distance of the minimum cost path from the center of the cell to be calculated to the nearest source on each cell by the value of the corresponding cell on the cost grid, and accumulate these values to obtain the cost value of the cell to the source. Therefore, the calculation of the cost distance is related to the cell size and the cost grid. In the cost grid diagram, the Cell Size of both the source grid and the cost grid is 2, and the minimum cost route from the cell (2,1) to the source (0,0) is shown by the red line in the figure below:
Then the minimum cost (i.e., cost distance) for cell (2,1) to reach the source is:
Cost direction grid: used to express the travel direction of the minimum cost path for each cell to reach the nearest source. In the cost direction grid, there are eight possible directions of travel (due north, due south, due west, due east, northwest, southwest, southeast, and northeast), which are coded using integers from 1 to 8, as shown in the following figure. Note that the source cell has a value of 0 in the cost direction grid, and the cell with no value in the cost grid is assigned a value of 15 in the output cost direction grid.
Cost Allocation Grid: It is used to mark the nearest source of each cell, and its grid value is the value of the nearest source of the current cell (when the source is a grid, it is the grid value of the nearest source; when the source is a vector object, it is the SMID of the nearest source). Cells with no value in the cost grid remain with no value in the output cost allocation grid.
Function entrance
- Spatial Analysis Tab-> Raster Analysis Group-> Distance Raster Drop-down Button-> Generate Distance Raster (Custom Cost)”。
- Toolbox-> Raster Analysis-> Distance Raster-> Generate Distance Raster (Custom).
Operation steps
- Source Data Settings: Set the Datasource of the source data and select the Dataset where the source data is stored. The source data is the ground features or objects we are interested in, such as wells, roads or schools, which can be Vector Data or Raster Data.
- Cost Data Setting: Set the Datasource where Cost Data is stored. And select the consumption Raster Dataset in the Datasource. Raster Dataset supports empty Dataset, but Raster Dataset cannot have negative values, otherwise the program will warn " Negative values cannot exist in the consumption grid!" ”。
The Cost Data set gives the cost of each pixel, which can be height, slope, etc. For example, the journey over a mountain to reach the destination may be shorter, but the time around it may be longer.
- Parameter Settings: Set the Distance Raster parameter, including Max Distance and resolution.
- Max Distance: It is used to set the Max Distance of the generation cost grid. The default value is 0, indicating that the result is not limited by the distance. This parameter is optional. When Max Distance is set to a value other than 0, the value of a cell is set to no value in the Distance Raster, the Assignment grid, and the Direction grid when the cell's Minimum Cumulative Cost value is greater than Max Distance.
- Resolution: Set the resolution of Result Dataset. The default value uses 1/500th of the diagonal length of the rectangle corresponding to the source Dataset Bounds. This parameter is optional.
- Set Result Data. Select Result Data Datasource to save, Surface Distance Raster Data, Surface Orientation Raster Data, and Surface Assignment Raster Data result name.
- Click the Environment Settings button to set the Analysis Environment parameters. The Analysis Environment parameters supported by the Generate Distance Raster include the Geographic Range, Clip Bounds, and Default Cell Size of the Result Dataset. Please refer to the Set up the Analysis Environment page for specific operations.
Note: The environment parameter Set As Global is supported, that is, the parameter value set here is used as the total Raster Environment Analyst environment parameter. Other functions that support the environment Parameter Settings are not required to be set repeatedly. If an environment parameter is not set here, the setting of the parameter in the Raster Analysis Environment is read during analysis.
- Click the Execute button to execute the action that generates the Surface Distance Raster.
Application example
In the following example, the Source Dataset is the Point Dataset, the cost grid is the Reclass Result of the slope grid of the corresponding area, and the Cost Distance Raster, the Cost Direction Grid, and the Cost Allocation Grid are generated.
Related topics
Generate Line Distance Raster.
Generate Surface Distance Raster.