distance.reproj: Find distances between island centroids and other polygons

Description Usage Arguments Value Author(s)

View source: R/distance.reproj_pkg.R

Description

This function calculates the distance between island centroids (input) and the nearest polygons. The function iterates through however many centroid points are given, and for each point, reprojects to an azimuthal equidistant projection that is centered around the centroid (see Weigelt and Kreft 2013). Because of the use of a for loop and reprojections, this can be a very slow script.

Usage

1
distance.reproj(pts, polys)

Arguments

pts

SpatialPointsDataFrame of island centroids. Assumed unprojected lat/long.

polys

SpatialPolygonsDataFrame of islands for which you want to calculate distances between centroids and polys. Assumed unprojected lat/long.

Value

Returns a vector of distances between each of the centroids and the closest island. The vector is in the same order as the centroid input.

Author(s)

Tyler J Tran, tylerjtran@gmail.com


mrhelmus/ieco documentation built on May 23, 2019, 7:37 a.m.