| an_near | R Documentation |
Find placenames near a given location
an_near(gaz, loc, max_distance)
gaz |
data.frame or SpatialPointsDataFrame: as returned by |
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 |
data.frame of results
https://data.aad.gov.au/aadc/gaz/scar/, https://www.scar.org/data-products/place-names/
an_read
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.