distance_map.Rd
Returns a distance map (in meters) to spatial features.
distance_map(x, boundaries, res = resolution(boundaries, max_ncells = 100))
x | Spatial* object with relevant spatial features. |
---|---|
boundaries | SpatialPolygons* object with administrative borders, or Raster* object from where to pick the resoltion. |
res | numeric. Resolution for the outcome distance map. The default divides the smallest dimension into 100 cells. |
A raster map with distances in meters to the closest spatial feature.
Distances are computed up to the given boundaries and at given resolution.
#> Warning: CRS object has comment, which is lost in output#> Warning: CRS object has comment, which is lost in output