port_weights: Create raster giving the establishment likelihoods relating...

View source: R/port_weights.R

port_weightsR Documentation

Create raster giving the establishment likelihoods relating to ports.

Description

Creates spatial port establishment likelihood raster as a function of port container volumes and distance from port.

Usage

port_weights(template_raster, port_data, beta, outfile, return_rast = FALSE)

Arguments

template_raster

A RasterLayer or path to supported raster file.

port_data

Character. Path to csv file containing port container volumes and named Latitude and Longitude (in WGS84) for each port of interest.

beta

Numeric. The beta coefficient exponential function of how risk changes with distance from port. beta should be in units per 1km.

outfile

Character. Output raster file path. Directory will be created if it does not exist.If not provided, object will be returned to R.

return_rast

Logical. Should the resulting raster be returned to R? Ignored if outfile is not provided.

Value

If outfile is specified, the resulting raster is saved as a geotiff to that path. If return_rast is TRUE or outfile is not specified the resulting raster is returned, otherwise NULL is returned invisibly.


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