arc_open: Open connection to remote resource

View source: R/arc-open.R

arc_openR Documentation

Open connection to remote resource

Description

Provided a URL, create an object referencing the remote resource. The resultant object acts as a reference to the remote data source.

Usage

arc_open(url, token = arc_token())

Arguments

url

The url of the remote resource. Must be of length one.

token

your authorization token.

Details

To extract data from the remote resource utilize arc_select() for objects of class FeatureLayer or Table. For ImageServers, utilize arc_raster().

[Experimental]

Value

Depending on the provided URL returns a FeatureLayer, Table, FeatureServer, ImageServer, or MapServer. Each of these objects is a named list containing the properties of the service.

See Also

arc_select arc_raster

Examples

## Not run: 
# FeatureLayer
furl <- paste0(
  "https://services3.arcgis.com/ZvidGQkLaDJxRSJ2/arcgis/rest/services/",
  "PLACES_LocalData_for_BetterHealth/FeatureServer/0"
)

arc_open(furl)

# Table
furl <- paste0(
  "https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/",
  "USA_Wetlands/FeatureServer/1"
)

arc_open(furl)

# ImageServer
arc_open(
  "https://landsat2.arcgis.com/arcgis/rest/services/Landsat/MS/ImageServer"
)

# FeatureServer
furl <- paste0(
  "https://services3.arcgis.com/ZvidGQkLaDJxRSJ2/arcgis/rest/services/",
  "PLACES_LocalData_for_BetterHealth/FeatureServer"
)

arc_open(furl)

# MapServer
map_url <- paste0(
  "https://services.arcgisonline.com/ArcGIS/rest/services/",
  "World_Imagery/MapServer"
)

arc_open(map_url)

## End(Not run)

arcgislayers documentation built on Sept. 30, 2024, 9:45 a.m.