Euclidean Distance
A raster giving, for every cell, the straight-line distance to the nearest target cell.
Pitfall. Engines disagree on what a target is (any cell with a value, any non-zero cell, or listed values), so a background of zeros instead of nodata can make every cell a target.
Pitfall. Some engines give distances in cells unless told to use the CRS's units.
Pitfall. In a geographic CRS the distance is in degrees unless the engine measures on the ellipsoid.
| Also called | proximity, distance raster, Euclidean Distance (Spatial Analyst), proximity raster, distance accumulation |
|---|---|
| Group | raster/distance |
| Checks | crs.measure, raster.nodata |
| Pitfalls | 3 listed above |
| Columbus tool | Not stated |
| Notes | Not stated |
| Status | active |
| Broader | Not stated |
| Narrower | Not stated |
| Related |
Parameters
Not stated
Inputs and outputs
| Direction | Name | Type | Geometry | Note |
|---|---|---|---|---|
| Input | raster | raster | Not stated | Target cells hold a value; every other cell is nodata. |
| Output | output | raster | Not stated | Not stated |
In each engine
| Engine | Tool | Parameters | Differences |
|---|---|---|---|
gdal | gdal raster proximity |
|
Preset: {"distance-units":"geo"} |
grass | r.grow.distance |
|
|
qgis | gdal:proximity |
|
Preset: {"UNITS":0} |
terra | terra::distance |
|
|
whiteboxtools | EuclideanDistance |
|
|
xarray-spatial | xrspatial.proximity |
|
|