`get_dist_focus()` generates a distance map from focus locations.
get_dist_focus(
window,
lon,
lat,
resolution = NULL,
ndim = NULL,
mile = FALSE,
preprocess = FALSE,
input_crs = 4326,
unit_scale = 1000
)an im object
owin object
vector of longitudes
vector of latitudes
resolution of raster (distance map) (in km; by default, 1). Ignored if npixel is set.
number of pixels for both dimensions (e.g., 256 for 256x256). If set, resolution is ignored.
logical. `mile` specifies whether to return the output in miles instead of kilometers (by default, FALSE).
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.
the CRS of the focus points (defaults to 4326). These points are internally projected to match the window CRS to ensure isotropic distance calculations.
set to the same value as the parameter in `get_window()` function. This parameter converts the coordinate values so that they alingn with the unit (km) of the owin object