an_near: Find placenames near a given location

Description Usage Arguments Value References See Also Examples

View source: R/search.R

Description

Find placenames near a given location

Usage

1
an_near(gaz, loc, max_distance)

Arguments

gaz

data.frame or SpatialPointsDataFrame: as returned by an_read, an_preferred, or an_filter

loc

numeric: target location (a two-element numeric vector giving longitude and latitude, or a SpatialPoints object)

max_distance

numeric: maximum search distance in kilometres

Value

data.frame of results

References

https://data.aad.gov.au/aadc/gaz/scar/, https://www.scar.org/data-products/place-names/

See Also

an_read

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
 g <- an_read(cache = "session")

 ## named features within 10km of 110E, 66S
 an_near(g, loc = c(110, -66), max_distance = 10)

 ## using pipe operator
 g %>% an_near(loc = c(100, -66), max_distance = 10)

 ## with sp objects
 gsp <- an_read(cache = "session", sp = TRUE)
 loc <- sp::SpatialPoints(matrix(c(110, -66), nrow = 1),
   proj4string = CRS("+proj=longlat +datum=WGS84 +ellps=WGS84"))
 an_near(gsp, loc = loc, max_distance = 10)

## End(Not run)

SCAR/antanym documentation built on Dec. 12, 2019, 9:44 a.m.