Learn R Programming

geocausal (version 0.3.2)

get_dist_line: Get distance maps from lines and polygons

Description

`get_dist_line()` generates a distance map from lines and polygons.

Usage

get_dist_line(
  window,
  path_to_shapefile,
  line_data = NULL,
  mile = FALSE,
  resolution,
  preprocess = TRUE
)

Value

an im object

Arguments

window

owin object

path_to_shapefile

path to shapefile

line_data

sfc_MULTILINESTRING file (If available. If not, `get_dist_line()` creates it from a shapefile.)

mile

logical. `mile` specifies whether to return the output in miles instead of kilometers (by default, FALSE).

resolution

resolution of raster objects

preprocess

logical. `preprocess` specifies whether to first pick the potentially closest point. It is recommended to set `preprocess = TRUE` if users need to obtain distances from many points.