get_airport_dist: Estimate distance to nearest Australian international airport

View source: R/get_airport_dist.R

get_airport_distR Documentation

Estimate distance to nearest Australian international airport

Description

Generates a raster proximity map indicating the distance from the center of each pixel to the centre of the nearest pixel containing a major airport. Airport coordinates are in the source raster.

Usage

get_airport_dist(
  vector_data,
  outfile,
  template_raster,
  extent,
  res,
  crs,
  airport_codes,
  return_rast = FALSE,
  overwrite = FALSE
)

Arguments

vector_data

Character. Path to airport data (available here).

outfile

Character. Output raster file path. Directory will be created recursively if it does not exist.

template_raster

Optional. Raster* object or a file path to template raster. If this is provided, extent, res, and crs will be taken from this raster unless they are also passed to this function. If template_raster is not provided, then extent and res must be provided. The template raster will also be used to mask the output raster so that NA cell values will be propagated.

extent

Either a character path to a raster file, an Extent object (or an object from which such an extent can be extracted), or a numeric vector with four elements giving xmin, xmax, ymin, ymax.

res

Numeric or integer vector giving the horizontal and vertical spatial resolution, in units of crs. If a single value is given, it will be used for both horizontal and vertical resolution.

crs

Target coordinate reference system as a PROJ string (character) or an object of class CRS.

airport_codes

Numeric. Airport codes to be used as targets in order to estimate cell proximity.

return_rast

Logical. Return RasterLayer to R?

overwrite

Logical. Should outfile be removed if it already exists?

Value

A proximity raster is written to outfile. If return_rast is TRUE, the raster object is also returned to R, otherwise NULL is returned invisibly. This function assumes that crs is either an unprojected coordinate system, or that the units of crs are metres. Resulting distances are expressed in kilometres.


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