Instructions for use
The Generate Line Distance Raster function generates the corresponding Line Distance Raster, line direction grid, and line distribution grid according to the Source Dataset.
Line Distance Raster: It is used to express the distance from each cell to the nearest source. The grid value is the Straight-line Distance (Euclidean Distance) between the current cell and the nearest source. The closest source is the source from which the current cell has the shortest Straight-line Distance among all sources. For each cell, the straight-line connecting its center and the center of the source is the distance from the cell to the source. The calculation method is to calculate the straight-line distance through the two right-angled sides of the right-angled triangle formed by the two. Therefore, the calculation of the straight-line distance is only related to the size of the cell (that is, the resolution). The following figure shows a line Measure Distance where the source grid has a cell size (CellSize) of 10.
Then the distance L from the cell in the third row and third column to the source is:
Linear direction grid: It is used to determine the orientation of the nearest source in the cell. The grid value is the azimuth angle between the current cell and the nearest source. The unit is degrees. The due east direction is 90 degrees, the due south direction is 180 degrees, the due west direction is 270 degrees, and the due north direction is 360 degrees. The range of clockwise rotation is 0-360 degrees. Where 0 degrees is used as the value of the cell corresponding to the source.
Line Distribution 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). The following figure shows how the Line Distance Raster is generated. The cell sizes are all 2.
For example, in the following figure, the source data is a vector Point Dataset, where the point represents the location of the hospital within the range. The data is executed to generate a Straight-line Distance, and three Datasets are obtained, as shown in the following figure:
- Line Distance Raster: the distance from each pixel in Result Dataset to the nearest Source Dataset (point), namely, the distance from each pixel to the nearest hospital.
- Linear direction grid: the direction of each pixel in the Result Dataset to the nearest Source Dataset (point), that is, the direction of each pixel to the nearest hospital.
- Linear distribution grid: according to the distribution of hospitals, other pixels are distributed to the point data in the source data. If there are eight point data currently, eight areas are divided.
In practice, the Line Distance Raster is mostly used when there is no obstacle or the same cost in the route, for example, when the rescue plane flies to the nearest hospital, there is no obstacle in the air, so the cost of any route is the same. At this time, the distance from the location of the rescue aircraft to the surrounding hospitals can be determined through the Line Distance Raster; the nearest hospital to the location of the rescue aircraft can be obtained according to the linear distribution grid; and the orientation of the nearest hospital at the location of the rescue aircraft can be determined by the linear direction grid. However, in the case of a rescue car driving to the nearest hospital, because there are various types of obstacles on the surface, the cost of taking different routes is not the same, at this time, the use of Straight-line Distance can not accurately solve the actual problem.
Function entrance
- Spatial Analysis tab-> Raster Analysis group-> Distance Raster Drop-down Button-> Generate Distance Raster.
- Toolbox-> Distance Raster-> Generate Distance Raster.
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.
- Parameter Settings: Set the Distance Raster parameter, including Max Distance and resolution.
Max Distance: It is used to set the Max Distance of the generated Distance Raster. If the distance is greater than Max Distance, there is no value in the Result Dataset. The default value is 0, which means that the result is not limited by distance. This parameter is optional.
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, Distance Raster Data, Direction Raster Data, and Assign Raster Data Result Name. By default, the generated Distance Dataset Name is result _ StraightDistance, and the Direction Dataset is result _ StraightDirection. Allocation Dataset is a result _ StraightAllocation.
- 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 OK button to execute the Generate Distance Raster. Click the Cancel button to exit the current dialog box.
Application example
For the existing Raster Data of a river in a certain area, calculate the Straight-line Distance from other positions in the area to the river, the direction of the straight line and the distribution of the straight line, the Max Distance is 0, and the resolution is set to the default resolution 25 of the current source Raster Data. The result is three Datasets, including a Line Distance Raster, a line direction grid, and a line assignment grid:
- Line Distance Raster: refers to the Closest Distance from each pixel in the grid range to the river (valued area) in the source data.
- Straight-line direction grid: refers to the direction in which each pixel in the grid range reaches the nearest pixel of the river (area with value) in the source data.
- Line assignment grid: assign other pixels to the source grid river (value area) data according to the distribution of the river.
Related topics
Generate Surface Distance Raster.
Build Custom Cost Distance Raster