MyNixOS website logo
Description

A Tool Used to Conduct Hypsometric Analysis of a Watershed.

Functions for generating tables required for drawing and calculating hypsometric curves and hypsometric integrals. These functions accept as input the DEM of the region of interest (your watershed) and a spatial data frame file specifying delineation of sub-catchments within the watershed. They then generate output in the form of PNG images and HTML files contained in a folder named "HYPSO_OUTPUT" created in the current directory. S. K. Sharma, S. Gajbhiye, et al. (2018) <doi:10.1007/978-981-10-5801-1_19>. Omvir Singh, A. Sarangi, and Milap C. Sharma (2006) <doi:10.1007/s11269-008-9242-z>. James A. Vanderwaal and Herbert Ssegane (2013) <doi:10.1111/jawr.12089>.

hypsoLoop

hypsoLoop has been developed as tool to automate the drawing of hypsographic curves and the calculation of hypsometric curves for a watershed that contains several sub-catchments.

Installation

You can install the development version of hypsoLoop from GitHub with:

# devtools::install_github("fgashakamba/hypsoLoop")

and you can install the published beta version at CRAN with:

# Still in beta stage (version 0.2.0)
# Package currently under review by the CRAN team and it'll Soon be available at:
install.packages("hypsoLoop") 

Example use of hypsoLoop

The workhorse function of hypsoLoop is called drawHypsocurves(). It accepts two arguments: a watersheds boundary layer (an sf or sp object) and an digital elevation model (DEM) covering the area of interest (a rasterLayer object). Additionally, the user may specify whether they want to get an output folder created in the root directory or not. If not, the hypsometric curves are drawn in the viewer and a summary table containing the hypsometric integers and other useful information on the sub-catchments is returned.

library(hypsoLoop)
drawHypsoCurves(watersheds, DEM)

#>   SUB_CATCHMENT_CODE MIN_ELEV MAX_ELEV TOTAL_AREA H_INTEGRAL
#> 1            Mulindi     1616     2225    2576.38      0.736
#> 2          Cyonyonyo     1614     2217     3673.1      0.791
#> 3              Yanze     1368     2071    3435.65      0.857

Other two functions are exposed from this hypsoLoop. These are the generateHypsoTables() which can be used to generate area-elevation tables for the sub-catchments of a watersheds and whose input requirements are the same as drawHypsoCurves(). The calc_areas() function is a handy function that be used to calculate the areas covered by each class of a categorical raster. It accepts one input argument which has to be a categorical raster of type rasterLayer and returns a table that summarizes the areas (in Hectares) covered by each class or category defined in the input raster.

library(hypsoLoop)
calc_areas(lulcYanze)
#>   CLASS         AREA
#> 1     1 1375.4506114
#> 2     2  528.6022953
#> 3     3 6830.5717454
#> 4     5   93.0439997
#> 5     6    0.2003449
#> 6    10  422.4313268
#> 7    11  401.4568430
Metadata

Version

0.2.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows