Location can be:
Usage
location_filter(
data,
location = NULL,
dist = NULL,
diag_ratio = NULL,
asp = NULL,
unit = "meter",
crs = NULL,
trim = FALSE,
crop = TRUE,
...
)
Arguments
- data
Data to filter by location.
- location
A sf, sfc, or bbox object or a character string that is an address, county GeoID, state name, abbreviation, or GeoID (dist parameters are ignored if location is a character string).
- dist
buffer distance in units. Optional.
- diag_ratio
ratio of diagonal distance of area's bounding box used as buffer distance. e.g. if the diagonal distance is 3000 meters and the "diag_ratio = 0.1" a 300 meter will be used. Ignored when
dist
is provided.- asp
Aspect ratio of width to height as a numeric value (e.g. 0.33) or character (e.g. "1:3"). If numeric,
get_asp()
returns the same value without modification.- unit
Units for buffer. Supported options include "meter", "foot", "kilometer", and "mile", "nautical mile" Common abbreviations (e.g. "km" instead of "kilometer") are also supported. Distance in units is converted to units matching GDAL units for x; defaults to "meter"
- crs
Coordinate reference system of bounding box to return
- trim
If
TRUE
, data is trimmed to area with sf::st_intersection. This option ignores anydist
,diag_ratio
, orasp
parameters. DefaultFALSE
.- crop
If
TRUE
, data is cropped to location or bounding box sf::st_crop adjusted by thedist
,diag_ratio
, andasp
parameters provided. Default TRUE.- ...
Additional parameters; bbox (used instead of location or adjusted location), county and state (used with get_counties or get_states), join (passed to sf::st_filter)