get_area: Get DTM or DSM data for an Area

View source: R/get_lidar.R

get_areaR Documentation

Get DTM or DSM data for an Area

Description

This function downloads Raster data from the DEFRA portal https://environment.data.gov.uk/DefraDataDownload/?Mode=survey. It retrieves all available data within the requested area defined by poly_area and offers some additional functionality to merge and crop the raster if desired. This function uses the get_tile function to extract all tiles that intersect the desired region.

Usage

get_area(
  poly_area,
  resolution,
  model_type,
  chrome_version = NULL,
  merge_tiles = TRUE,
  crop = FALSE,
  dest_folder = NULL,
  out_name = NULL,
  ras_format = "GTiff",
  headless_chrome = TRUE,
  check_selenium = TRUE
)

Arguments

poly_area

Either an sf object or an sf-readable file. See sf::st_drivers() for available drivers

resolution

a numeric value (in meters) of either: 0.25, 0.5, 1 or 2. <1m data has generally low coverage.

model_type

A character of either 'DTM' or 'DSM' referring to Digital Terrain Model and Digital Surface Model respectively.

chrome_version

The chrome version that best matches your own chrome installation version. Choose from binman::list_versions("chromedriver")

merge_tiles

Boolean with default TRUE. If TRUE a single raster object is returned else a list of raster is produced.

crop

Boolean with default FALSE. If TRUE data outside the bounds of the requested polygon area are discarded.

dest_folder

Optional character string for output save folder. If not provided rasters will be stored in tempfile()

out_name

Character required when saving merged raster to dest.folder.

ras_format

Character for Raster format. Default is 'GTiff'. for available formats run terra::gdal(drivers=T)

headless_chrome

Boolean with default TRUE. if FALSE chrome is run with GUI activated.

check_selenium

Boolean with default TRUE. If FAlSE Rselenium will not check for updated drivers.

Value

A SpatRaster (from terra) object when merge.tiles = TRUE or a list of rasters when merge.tiles = FALSE


h-a-graham/EAlidaR documentation built on Feb. 6, 2024, 2:27 p.m.