Skip To Content

Euclidean Direction function

Available with Spatial Analyst license.

Overview

Calculates, for each cell, the direction, in degrees, to the nearest source.

The direction is calculated from each cell center to the center of the source cell that's nearest to it.

The range of values is from 0 degrees to 360 degrees, with 0 reserved for the source cells. Due east (right) is 90 and the values increase clockwise (180 is south, 270 is west, and 360 is north).

Euclidean Direction function illustration

Learn more about Euclidean distance analysis

Notes

The input source data must be a raster layer.

The NoData values that exist in the Source Raster are not included as valid values in the function. The value 0 is considered a legitimate value in the source raster. A Source Raster can be created using the extraction tools or the Clip function.

If you have source features, you can first convert them to a raster dataset using the Rasterize Features function. Use a consistent input for the Raster input to that function. This will ensure that the features are properly converted to a raster dataset using the same cell size, extent, and spatial reference.

The Maximum Distance is specified in the same map unit as the Source Raster.

If the Mask has been set in the geoprocessing environments, and the pixels to be masked will cover a source location, the Euclidean calculations will occur on the remaining source locations. The source pixels that are masked will not be considered in the computations; these pixels will be assigned a value of NoData. Any pixel location that is assigned NoData on the input surface will receive NoData on all the output rasters. See Analysis environments and Spatial Analyst for additional details on the geoprocessing environments that apply to this function.

Parameters

ParameterDescription

Source Raster

(Required)

A raster dataset that identifies the cells or locations to which the Euclidean direction for every output cell location is calculated..

The input type can be an integer or a floating-point type.

Maximum Distance

Defines the threshold distance within which the direction to the closest source will be calculated. If the distance to the nearest source exceeds this, the output for that cell will be NoData.

The default distance is to the extent of the output raster.

Cellsize

The pixel size at which the output raster will be created.

If the cell size was explicitly set in Environments, that will be the default cell size. If it was not set, the output cell size will be the same as the Source Raster.

Distance Method

Determines whether to calculate the distance using a planar (flat earth) or a geodesic (ellipsoid) method.

  • Planar—Planar measurements use 2D Cartesian mathematics to calculate length and area. The option is only available when measuring in a projected coordinate system and the 2D plane of that coordinate system will be used as the basis for the measurements.
  • Geodesic—The shortest line between two points on the earth's surface on a spheroid (ellipsoid). Therefore, regardless of input or output projection, the results do not change.
    Note:

    One use for a geodesic line is when you want to determine the shortest distance between two cities for an airplane's flight path. This is also known as a great circle line if based on a sphere rather than an ellipsoid.

Environment settings

Geoprocessing environment settings for global functions are controlled at the application level. Setting processing environments in ArcGIS Pro can be done by clicking the Environments button on the Analysis tab. See Analysis environments and Spatial Analyst for additional details on environment settings.

The following environments are supported by this global function:

Related topics