calc_point_distance: Find point certain duration away in a straight line

Description Usage Arguments Details Value Author(s)

View source: R/drivetime.R

Description

Function takes a starting point and end point to make a line, then finds a point on that line that would take a certain amount of time to drive to.

Usage

1

Arguments

start

starting point in the form of a geocode list, index 1 is longitude, index 2 is latitude

end

end point in the form of a geocode list, index 1 is longitude, index 2 is latitude

duration

drive duration we are looking to find, in minutes

Details

Creates a list of geocodes along a line between the start and end point, and uses a binary search algorithm to find the point that is closest to the correct distance.

Value

geocode of the point that is approximately 'duration' minutes away

Author(s)

Martin Boros


mboros1/drivetime documentation built on May 25, 2019, 9:34 p.m.