gen_basinElevationBands: Generate basin elevation bands from DEM

View source: R/gen_basinElevationBands.R

gen_basinElevationBandsR Documentation

Generate basin elevation bands from DEM

Description

This function takes a DEM and generates altitude bands according to the interval spacing chosen. It also applies different clean up operations that require user specified values for the smoothr::drop_crumbs() and smoothr::fill_holes() functions. These sub-basins, once stored as a shape file can then be further edited in QGIS.

Usage

gen_basinElevationBands(
  dem_PathN,
  dem_FileN = "DEM.tif",
  demAggFact,
  band_interval,
  holeSize_km2,
  smoothFact,
  dem_crs = "+proj=utm +zone=42 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"
)

Arguments

dem_PathN

Path to original stored DEM file. Can be path to directory containing the DEM file or the path to the DEM file directly. Can also be a raster object.

dem_FileN

DEM file name (optional, defaults to DEM.tif)

demAggFact

Aggregation factor to down-sample DEM (greatly improves computational efficiency)

band_interval

Elevation bands interval / spacing (in meters)

holeSize_km2

Minimum Size of holes that will be kept during cleaning operation (in square kilometers)

smoothFact

smoothness of final elevation bands (smoothness parameter of smoothr::smooth() function)

dem_crs

crs of the dem as proj string. The default crs in this function is UTM 42N (EPGS: 32642).

Value

Simple feature (sf) multi-polygon. Returns NULL if not successful.

Note

Note that the DEM should be in UTM coordinates because the code works on the units of the projection of the DEM (for example meters in UTM and degrees in lat/long coordinates). We highly recommend to work in UTM.

See Also

Other Pre-processing: convert2HYY(), doQuantileMapping(), gen_HRU_Climate_CSV_RSMinerve(), loadTabularData(), plotNormDevHYY()


hydrosolutions/riversCentralAsia documentation built on Feb. 7, 2023, 4:50 p.m.