Learn R Programming

galah (version 1.4.0)

galah_geolocate: Narrow a query using a WKT string

Description

Restrict results to those from a specified area. Areas must be polygons and be specified as either an sf object, or a 'well-known text' (wkt) string.

Usage

galah_geolocate(...)

Arguments

...

a single wkt string or sf object

Value

length-1 object of class character and atlas_locations, containing a WKT string representing the area provided.

Examples

Search for records using a shapefile

galah_config(email = "your-email@email.com")

location <- galah_geolocate(st_read(path/to/shapefile)) atlas_occurrences(geolocate = location)

Search for records using a Well-known Text geometry (WKT)

wkt <- "POLYGON((142.36228 -29.00703,142.74131 -29.00703,142.74131 -29.39064,142.36228 -29.39064,142.36228 -29.00703))"

atlas_counts(geolocate = galah_geolocate(wkt)) #> # A tibble: 1 x 1 #> count #> <int> #> 1 3300

Details

WKT strings longer than 10000 characters will not be accepted by the ALA- so the sf object or WKT string may need to be simplified.

See Also

search_taxa(), galah_filter() and galah_select() for other ways to restrict the information returned by atlas_occurrences() and related functions.