Description Usage Arguments Details Value Author(s) See Also
This function accepts as input the DEM and sub-catchments boundaries and pre-process this data to extract the tables that are used to calculate the hypsographic curves and integral of these sub-catchments.
1 | generateHypsoTables(x, y)
|
x |
An object of class SpatialPolygonsDataFrame or simple features (sf). For instance, you can use RGDAL package's "readOGR()" function to create such an object from Shapefiles saved on disk. Alternatively, you can use sf's st_read() function to get a simple features object from the shapefile. NB: at least one column (attribute) named 'Name' should be present in the shapefile or input data frame. |
y |
An object of class RasterLayer. You can use the raster package to read GeoTIFF and other raster formats from disk. |
The raster package's "crop()" and "mask()" functions are used to iteratively clip the DEM to each sub-catchment. For each sub-cacthment, the elevation range is divided into 30 equidistant contours. Then, the "area()" function is used to calculate the areas between each contour.
A list of length 2. The 1st element is a list of data frames, each representing the hypsometric tables for each sub-catchment. The 2nd element is a data frame with min & max elevation values for each sub-catchment.
Faustin Gashakamba gashakamba@gmail.com
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.