download_stac_assets: Download assets from STAC API

View source: R/download_stac_assets.R

download_stac_assetsR Documentation

Download assets from STAC API

Description

download_stac_assets downloads assets from the STAC API on the geo-information platform of the Swiss Confederation (https://data.geo.admin.ch/api/stac/v0.9/).

Usage

download_stac_assets(response, path, type)

Arguments

response

response object of a get_stac_assets call to the STAC API.

path

the directory to download files to.

type

selects the type of file to download. If not specified, all assets are downloaded. Use type = "image" to download GeoTIFF only.

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).

Examples

## Not run: 
# Download the aerial photograph of the old town of Aarau (LV03 coordinates)
call_res <- get_stac_assets(
    collection_id = "ch.swisstopo.swissimage-dop10",
    lon = 645685
    lat = 249287
    )

download_stac_assets(call_res, type = "image")


## End(Not run)


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