Calculate Euclidean Distance (Spatial Analyst Tools)
Summary
Calculates, for each cell, the Euclidean distance to the nearest source.
Usage
The input source data can be a feature class or a raster. The feature class can be point, line, or polygon.
When the input source data is a raster, the set of source cells consists of all cells in the source raster that have valid values. Cells that have NoData values are not included in the source set. Zero is a valid value. A source raster can be created using the extraction tools.
When the input source data is a feature class, the source locations are converted internally to a raster before performing the analysis. The resolution of the raster can be controlled with the Cell Size environment. By default, if no other rasters are specified in the tool, the resolution will be determined by the longer of the width or height of the extent of the input feature, in the input spatial reference, divided by 1,000.
When using feature data for the input source data, care must be taken with how the output cell size is handled when it is coarse, relative to the detail present in the input. The internal rasterization process uses the same default Cell assignment type value as the Feature to Raster tool, which is the cell center method. This means that data that is not located at the center of the cell will not be included in the intermediate rasterized source output, so it will not be represented in the distance calculations. For example, if the sources are a series of small polygons (such as building footprints) that are small relative to the output cell size, it is possible that only a few will fall under the centers of the output raster cells, seemingly causing most of the others to be lost in the analysis.
To avoid this situation, as an intermediate step, you can rasterize the input features directly with the Feature to Raster tool and set the Field parameter. Then use the resulting output as input to the particular distance tool you want to use. Alternatively, you can select a small cell size to capture the appropriate amount of detail from the input features.
Barriers are obstacles that must be routed around.
For the Input Raster or Feature Barrier parameter, barriers can be represented either by cells that have a valid value or by feature data that is converted to a raster. Where barriers are connected only by diagonal cells, the barriers will be thickened to make them impermeable.
If a source falls on a barrier, it will be ignored in the analysis, and no distance from that source will be calculated.
The Maximum Distance parameter value is specified in the same map units as the input source data.
To properly handle the edge of the projection at a global extent when performing distance analysis at a global scale, ensure that either a cylindrical projection or a geographic output coordinate system is used in conjunction with the Geodesic option for the Distance Method parameter.
When no Extent environment setting is specified, the processing extent is determined in the following way:
If only the Input Raster or Feature Source parameter value is specified, the output extent will be the same as the Input Raster or Feature Source parameter value extent.
If both the Input Raster or Feature Source and Input Raster or Feature Barrier parameter values are specified, the union of the inputs, expanded by two cell widths on each side, will be used as the processing extent. To use the extent as an implicit barrier, you must explicitly set the Extent value in the environment settings.
The analysis Mask environment can be set to a feature or a raster dataset. If the mask is a feature, it will be converted to a raster. The cells that have a value define the locations that are within the mask area. NoData cells define the locations that are outside the mask area and will be treated as a barrier.
When the Cell Size or Snap Raster environment settings are not specified, and there are two rasters specified as inputs, the Cell Size and Snap Raster environments are set based on the Input Raster or Feature Source parameter value.
This tool supports parallel processing. If your computer has multiple processors or processors with multiple cores, better performance may be achieved, particularly on larger datasets. See the Parallel processing with Spatial Analyst help topic for details about this capability and how to configure it.
When using parallel processing, temporary data will be written to manage the data chunks being processed. The default temp folder location will be on your local
C:drive. You can control the location of this folder by setting up a system environment variable named TempFolders and specifying the path to a folder to use (for example,E:\RasterCache). If you have administrative privileges on your machine, you can also use a registry key (for example, [HKEY_CURRENT_USER\SOFTWARE\ESRI\ArcGISPro\Raster]).By default, this tool will use 50 percent of the available cores. If the input data is smaller than 5,000-by-5,000 cells in size, fewer cores may be used. You can control the number of cores the tool uses with the Parallel processing factor environment.
When the output raster format is a
.crffile, this tool supports the Pyramid raster storage environment. Pyramids will be created in the output by default. For any other output format, this environment is not supported, and pyramids will not be created.See Analysis environments and Spatial Analyst for additional details about the geoprocessing environments that apply to this tool.
Parameters
| Label | Explanation | Data type |
|---|---|---|
|
Input Raster or Feature Source |
The input source locations. This is a raster or feature (point, line, or polygon) identifying the cells or locations that will be used to calculate the least accumulated cost distance for each output cell location. For rasters, the input type can be integer or floating point. |
Raster Layer; Feature Layer |
|
Input Raster or Feature Barrier (Optional) |
The dataset that defines the barriers. The barriers can be defined by an integer or a floating-point raster, or by a point, line, or polygon feature. For a raster barrier, the barrier must have a valid value, including zero, and the areas that are not barriers must be NoData. |
Raster Layer; Feature Layer |
|
Maximum Distance (Optional) |
The threshold that the accumulative distance values cannot exceed. If an accumulative Euclidean distance value exceeds this value, the output value for the cell location will be NoData. The default distance is to the edge of the output raster. |
Double |
|
Distance Method (Optional) |
Specifies whether the distance will be calculated using a planar (flat earth) or a geodesic (ellipsoid) method.
|
String |
Return value
| Label | Explanation | Data type |
|---|---|---|
|
Output Distance Raster |
The output Euclidean distance raster. The distance raster identifies, for each cell, the Euclidean distance to the closest source cell, set of source cells, or source location. The output raster is of floating-point type. |
Raster |
Environments
Auto Commit, Cell Size, Cell Size Projection Method, Compression, Current Workspace, Extent, Geographic Transformations, Mask, Output CONFIG Keyword, Output Coordinate System, Parallel Processing Factor, Pyramid, Scratch Workspace, Snap Raster, Tile Size
Licensing information
- Basic: Requires Spatial Analyst
- Standard: Requires Spatial Analyst
- Advanced: Requires Spatial Analyst