Calc Cost Map

Description

This functor calculates an accumulated cost surface from source features using a friction map.

Inputs

Name	Type	Description
Source	Map	Source feature map. A map of non-null cells representing source features. If null value is not defined, an error will be reported.
Cost	Map	Map expressing the difficulty to cross each cell. Difficulty is proportional to the cell value. An insurmountable cell can be represented by very high value. Null value cells will be passed to the cost map. Friction values must be positive, otherwise an error will be reported.

Optional Inputs

Name	Type	Description	Default Value
Cell Type	Cell Type	Data cell type of the cost map must be compatible to the source feature and friction data cell types, otherwise an error will be reported.	Signed 32 Bit Integer
Null Value	Null Value	Null value of the cost map. This value cannot be equal to zero because zero value represents source features on the cost map. If it is set to zero, an error will be reported.	.default
Diagonals Cost More	Bool	If true, diagonal movements are more expensive than orthogonal movements (horizontal / vertical). In this case, the cost of a diagonal movement is multiplied by 1.414213562.	True
Maximum Number Of Passes	Non Negative Int	Maximum number of passes that are used to calculate the cost map. The value 0 (zero) indicates that this functor will execute as many steps as needed in order to produce the best cost (optimized) map. Usually two passes are enough to produce optimized cost maps.	0
Friction Is Relative	Bool	If true, the friction values are relative to map resolution and represent friction units per meter. In this case, the friction values are automatically multiplied by the cell resolution (in meters).	False

Outputs

Name	Type	Description
Cost	Map	Accumulated cost surface map from each feature source. Output map has the same dimensions of the source feature map.

Group

Map Algebra

Notes

The algorithm that calculates the cost map is general type of “Pushbroom”. However, its spatial performance approximates to the so called “Pushgrow” algorithm, especially when using two or more passes.

Penalization for diagonal movements is effective only when the cell dimensions (width and height) are considered in the calculation of cost, friction values are high, or the cost map is represented using real numbers.

A friction map with cells represented by real numbers requires a cost map with cells represented by real numbers or an error will be reported.

Each pass used to calculate the cost map corresponds to four map passes originating from opposite directions.

Unreachable places on the friction map are excluded on the cost map and thus represented as null value cells. Costs are not accumulated across null value cells, thus regions surrounded by null value cells will not have their cell costs calculated, unless there is a source feature inside this region.

An informal study showing the performance of the current implementation can be found here.

Internal Name

CalcCostMap