find_region: Find region for a location

Description Usage Arguments Details Examples

View source: R/google.R

Description

Find region for a location

Usage

1
2
3
find_region(location, map, ...)

find_region_point(point, map)

Arguments

location

vector of string locations

map

SpatialPolygon object

point

numeric vector of latitude and longitude

...

additional parameters passed to geocode

Details

Checks each region in map to determine with it contains the specified point. Returns as list of the ids of each region containing the point.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
coord <- geocode("64 Reservoir St Surry Hills", "longlat")
ssd <- get_mapaus("SSD")


region <- find_region_point(coord, ssd)
ssd@data[region,]

find_region("64 Reservoir St Surry Hills", ssd)

rm(coord, ssd)

## End(Not run)

seancarmody/rmapaus documentation built on May 29, 2019, 4:26 p.m.