Map and Table Calculation
Predefined variable %D
Returns the distance between the central pixel and its neighbouring ones.
Syntax
%D
Notes:
- D stands for Distance.
- %D and NBDIS are aliases of each other. For more information, see Map Calculation : Neighbourhood operations & iterations.
- The distance to the central pixel is 0, the distance to pixels on positions 2, 4, 6, and 8 is 1, and the distance to pixels on positions 1, 3, 7 and 9 is √2 (i.e. ≈ 1.4).
| Position of neighbours: |
Return values: |
|
|
| 1.4 |
1 |
1.4 |
| 1 |
0 |
1 |
| 1.4 |
1 |
1.4 |
|
Tip
%D is generally multiplied by the pixel size of a raster map or a georeference, for instance like: %D * PIXSIZE(RasterMap) or %D * PIXSIZE(GeoReference.grf).
Usable in
MapCalc
Examples
See How to calculate distances using iterations.
See also: