Skip to contents

Downloads a spatial file from url into a temporary directory and reads it with sf::st_read(). Supported direct formats are .geojson, .json, and .gpkg. A .zip URL is extracted first and the first supported file inside is read. For ambiguous extensions the function assumes a zip archive.

Usage

read_dragmapr_sf_url(url, timeout = 60)

Arguments

url

A non-empty character string pointing to a downloadable spatial file.

timeout

Download timeout in seconds. Defaults to 60.

Value

An sf object.

Examples

if(interactive()){
x <- read_dragmapr_sf_url("https://example.com/regions.geojson")
}