`get_dist_line()` generates a distance map from lines and polygons.
get_dist_line(
window,
path_to_shapefile,
line_data = NULL,
mile = FALSE,
resolution,
preprocess = TRUE
)
an im object
owin object
path to shapefile
sfc_MULTILINESTRING file (If available. If not, `get_dist_line()` creates it from a shapefile.)
logical. `mile` specifies whether to return the output in miles instead of kilometers (by default, FALSE).
resolution of raster objects
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.