calc_dist_mat_shp: Calculates the distance matrix (Shapefile)

Description Usage Arguments Details Value

View source: R/calc_dist_mat_shp.R

Description

Calculates the distance between all areas in a Shapefile object.

Usage

1

Arguments

shp

The Shapefile object to use to calculate the distance matrix.

Details

This function calculates the distance matrix once to avoid doing it for every generation during an epidemic simulation. This is essential to later speed up the epidemic simulation. Note that this function assumes that the distances are in meters in the dataset! If that is not the case, you might want to either convert these, or adjust the output of this function.

Value

Returns one matrix object containg the distances between all populated areas.


qleclerc/efficientspatial documentation built on May 23, 2019, 1:24 p.m.