View source: R/get_airport_dist.R
get_airport_dist | R Documentation |
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.
get_airport_dist( vector_data, outfile, template_raster, extent, res, crs, airport_codes, return_rast = FALSE, overwrite = FALSE )
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. |
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 |
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 |
overwrite |
Logical. Should |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.