Table of Contents

Calc Distance Map

Description

Calculates a map representing the Euclidean distance, in meters, from every cell to the nearest cell belonging to each of a set of given categories.

Inputs

Name Type Description
Categorical Map Categorical Map Type Map of classes or categories for which distances are calculated. A null cell in this map produces a null cell at the same position in the distance map.
Categories Int Set Type Categories for which distance maps are calculated. Each category produces a layer named “distance_to_i”, where i is the category's value in Categorical Map.

Optional Inputs

Name Type Description Default Value
Cell Type Cell Type Type Cell type of the distance map. Signed 32 Bit Integer
Null Value Null Value Type Null value of the distance map. -2147483648
Truncate Distance Boolean Value Type If true, a distance exceeding the largest value representable in the output map is truncated to that largest value instead of reporting an error. This is an advanced port. No

Outputs

Name Type Description
Distance Map Type Map of distances, in meters, with the same dimensions as Categorical Map, and one layer per category in Categories.

Group

Map Algebra

Notes

Raises an error if Categories is empty, or if the only category given corresponds to Categorical Map's null value.

Raises an error if Null Value is not compatible with Cell Type.

Reports a warning if Cell Type could degrade performance.

Internal Name

CalcDistanceMap

Usage examples

See practical examples of this functor in Lesson 18: Building a land-use and land-cover change simulation model