Find IDs of and distances to all nearby points (e.g., schools, or EPA-regulated facilities, etc.)
Source:R/PROXIMITY_FUNCTIONS.R
getpointsnearby.Rd
Given a table of frompoints (lat lon coordinates),
find IDs of and distances to all nearby points
that could represent e.g., schools, parks, or
EPA-regulated facilities with locations in Facility Registry Services (FRS).
Like getblocksnearby()
but for nearby points of any type.
Usage
getpointsnearby(
frompoints,
topoints,
radius = 3,
maxradius = 31.07,
avoidorphans = FALSE,
retain_unadjusted_distance = TRUE,
quadtree = NULL,
quiet = FALSE,
parallel = FALSE,
updateProgress = FALSE,
report_progress_every_n = 1000,
...
)
Arguments
- frompoints
used as the sitepoints param of
getblocksnearby()
. Can be for example Census blocks (based on internal point of each block).- topoints
table of lat lon coordinates of points that may be nearby. These could be schools, parks, facilities, or any other set of points.
- radius
passed to
getpointsnearbyviaQuadTree()
- maxradius
passed to
getpointsnearbyviaQuadTree()
- avoidorphans
passed to
getpointsnearbyviaQuadTree()
- quadtree
optional index of topoints
if not provided, created by indexpoints()
- quiet
passed to
getpointsnearbyviaQuadTree()
- ...
passed to
getpointsnearbyviaQuadTree()
- quaddatatable
optional table of topoints (in format provided by internal helper function create_quaddata() as needed).
Value
sites2points data.table one row per pair of frompoint and nearby topoint,
like output of getpointsnearbyviaQuadTree()