weight_airport_dist: Transform airport distances

View source: R/weight_airport_dist.R

weight_airport_distR Documentation

Transform airport distances

Description

Transform airport distances according to a negative exponential function.

Usage

weight_airport_dist(
  airport_dist,
  beta = log(0.5)/200,
  outfile,
  overwrite = FALSE,
  return_rast = FALSE
)

Arguments

airport_dist

Character. File path to a raster file containing proximity to airports. Map units are expected to be kilometres.

beta

Numeric. Parameter passed to the exponential function. Distance to nearest airport is multiplied by this value and exponentiated to give the relative density of tourists at a location. To generate a distribution that ensures proportion p of tourists within distance d of nearest airport, specify airport_beta=log(p)/d (e.g. to have 50% of tourists within 200 km of an airport, use log(0.5)/200).

outfile

Character. Output raster file path. If missing, object will be returned to R.

overwrite

Logical. Overwite the target raster if it already exists?

return_rast

Logical. Should the raster object be returned to R?

Value

If return_rast is TRUE, or if outfile is missing, the resulting RasterLayer object will be returned. Otherwise NULL is returned invisibly.


jscamac/edmaps documentation built on June 11, 2022, 1:26 a.m.