# Calc Distance Map

## Description

This functor calculates a map representing the frontage distance (in meters) between a cell and the closest cell of a certain category specified in the “Categorical Map” input.

## Inputs

Name | Type | Description |
---|---|---|

Categorical Map | Categorical Map Type | Map of classes or categories. Null value cells on this map will produce the same null value cells on the resulting distance map. Data cell type of this map must be “Signed 32 Bit Integer” or an error will be reported. |

Categories | Int Set Type | List of categories. Distance maps are calculated for these categories. Each category corresponds to a layer “distance_to_i” where i is an identifier of a category on the input map. |

## Optional Inputs

Name | Type | Description | Default Value |
---|---|---|---|

Cell Type | Cell Type Type | Data cell type. | Signed 32 Bit Integer |

Null Value | Integer Value Type | Null value of the distance map. | -2147483648 |

Truncate Distance | Boolean Value Type | If true, distance values that exceed the greatest value of the output map will be truncated, instead of informing an error. | False. |

## Outputs

Name | Type | Description |
---|---|---|

Distance | Map Type | The distance map. The distances are represented in meters. Map format has the same dimensions of the “Categorical Map”. |

## Group

## Notes

The calculated distance is the Euclidean distance and the unit used is the meter.

The output map has layers named “distance_to_X”, where X is the value of category for which the distances are being calculated. For instance, if the distance is being calculated for categories 2 and 13, the output map will have two layers named “distance_to_2” and “distance_to_13”.

## Internal Name

CalcDistanceMap