get_stac_assets: Call STAC API

View source: R/get_stac_assets.R

get_stac_assetsR Documentation

Call STAC API

Description

get_stac_assets calls the STAC API on the geo-information platform of the Swiss Confederation (https://data.geo.admin.ch/api/stac/v0.9/) and returns download links to geo-specific assets.

Usage

get_stac_assets(
  collection_id,
  lon = 660158,
  lat = 183641,
  api = "https://data.geo.admin.ch/api/stac/v0.9/collections"
)

Arguments

collection_id

character string for selecting a dataset. Use get_stac_collections to obtain all available datasets.

lon

longitude of a given point. WGS84, LV03 and LV95 coordinates are possible. Default value refers to the geographical center of Switzerland.

lat

latitude of a given point. WGS84, LV03 and LV95 coordinates are possible. Default value refers to the geographical center of Switzerland.

api

link to the latest query endpoint of the STAC API.

Details

The acquisition and use of data or services is free of charge, subject to the provisions on fair use (see https://www.geo.admin.ch/terms-of-use).

Value

A tibble with a set of metadata for including download links for the requested asset (dataset and point).

Examples

# Get link to the aerial photograph of the old town of Aarau (LV03 coordinates)
get_stac_assets(
    collection_id = "ch.swisstopo.swissimage-dop10",
    lon = 645685,
    lat = 249287
    )


zumbov2/swissgd documentation built on Nov. 22, 2022, 9:30 p.m.