get_esri_data: Use esri2sf to get data from an ArcGIS FeatureServer or...

View source: R/get_esri_data.R

get_esri_dataR Documentation

Use esri2sf to get data from an ArcGIS FeatureServer or MapServer for a location

Description

Wraps the esri2sf::esri2sf and esri2sf::esri2df function to download an ArcGIS FeatureServer or MapServer. Supports spatial filtering with bounding box based on location and filtering by location name (if location name column is provided).

Usage

get_esri_data(
  location = NULL,
  url,
  dist = getOption("overedge.dist"),
  diag_ratio = getOption("overedge.diag_ratio"),
  unit = getOption("overedge.unit"),
  asp = getOption("overedge.asp"),
  crs = getOption("overedge.crs"),
  where = NULL,
  coords_col = NULL,
  name_col = NULL,
  name = NULL,
  clean_names = TRUE,
  ...
)

get_esri_layers(location = NULL, layers, service_url = NULL, nm = NULL, ...)

get_esri_metadata(url, meta = "name", clean = TRUE)

Arguments

location

sf, sfc, or bbox object (or other object convertible with as_bbox(). Optional.

url

FeatureServer or MapServer url to retrieve data from. Passed to url parameter of esri2sf::esri2sf or esri2sf::esri2df functions.

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.

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"

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.

crs

coordinate reference system to use for query; default 4326

where

where query string passed to esri2sf, Default: NULL

coords_col

coordinate columns, e.g. c("longitude", "latitude")

name_col

name of ArcGIS FeatureServer or MapServer column with location names for features

name

location name

...

Additional arguments passed to esri2sf::esri2df or esri2sf::esri2sf

layers

Either a vector with URLs, a named list of urls, or a numeric vector.

service_url

Base service URL with layers are located.

nm

Name or vector of names to add to the layers; defaults to NULL.

meta

Name of metadata list value to return from esri2sf::esrimeta.

clean

If TRUE, use janitor::make_clean_names on the returned metadata value (typically used for name values).

See Also

esri2sf::esri2sf()


elipousson/overedge documentation built on Aug. 13, 2022, 7:41 p.m.