Skip to contents

dist2nf computes the distance between the target pine plantation and all surroundings natural forests patches.

Usage

dist2nf(x, nf_value)

Arguments

x

A raster object

nf_value

The value of "Natural Forests" landscape class within the raster (default value = 2).

Value

A raster object with the minimum distance for each raster pixel

Details

This auxiliary function calculates the distance for each pixel of the target pine plantation to the edges of all surrounding natural forest patches. For each pixel, the final value considered is the minimum of all distances from that pixel to the edges of natural forests.

Author

Antonio J Pérez-Luque (ajpelu@gmail.com)