Distance calculation

Functionality

The Distance operation assigns to each pixel the smallest distance in meters towards user-specified source pixels, for example distance to schools, to roads etc. The output is called a distance map.

Input for a distance calculation is a source map and optionally a weight map.

By using weight factors that are inversely proportional to the possible speed that can be obtained in different mapping units, a so-called time travel map can be calculated. Through a distance calculation, also a Thiessen map can be calculated.

Input source map for a distance calculation:

A source map is obligatory input for a distance calculation. In the Distance calculation dialog box, a source map can be any raster map with a class or ID domain. On the command line, you can also use raster maps with a value domain.

All pixels in the source map that have a class name, ID or value are considered as sources. For all pixels that have the undefined value, a distance value is calculated.

As a source map, you can thus directly use any rasterized point, segment, or polygon map.

Of course, you can also use one or more MapCalc statements to prepare a source map from existing raster maps.

 

For ILWIS 1.41 users: the input map for a distance calculation is no longer a map in which value 0 is used for sources and value 1 is used for accessible pixels.

Input weight map for a distance calculation:

A weight map is optional input for a distance calculation.

Domain and georeference of output map:

In the output distance map: value 0 is assigned to source pixels, the shortest distance value towards the nearest source is assigned to all accessible pixels, and the undefined value is assigned to inaccessible pixels.

By default, the distance map obtains system domain Distance; the value range and precision for the output map can be adjusted each time you perform the Distance operation. You can also create or use a value domain of your own.

The output distance map uses the same georeference as the input map.

When displaying a distance output map, by default System Gray or System Pseudo representations can be selected. You can also create a representation of your own, e.g. by clicking the create representation button in the Display Options dialog box of the output distance map.

Tip:

If line barriers are used with a width of only one pixel (e.g. rasterized segments), these barriers should be broadened before performing a distance calculation. This is because in the distance program, pixels are regarded to be 8-connected: each pixel has access to its eight neighbours (horizontally, vertically, and diagonally). Line barriers that are 8-connected can thus still be surpassed: only 4-connected lines cannot be surpassed.

To make a raster map with line barriers 4-connected instead of 8-connected, you can use use the Dilate4 filter or the Conn8to4 filter.

See also: