EnglishFrenchSpanish

OnWorks favicon

r.lakegrass - Online in the Cloud

Run r.lakegrass in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command r.lakegrass that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


r.lake - Fills lake at given point to given level.

KEYWORDS


raster, hydrology, hazard, flood

SYNOPSIS


r.lake
r.lake --help
r.lake [-no] elevation=name water_level=float [lake=name] [coordinates=east,north]
[seed=name] [--overwrite] [--help] [--verbose] [--quiet] [--ui]

Flags:
-n
Use negative depth values for lake raster map

-o
Overwrite seed map with result (lake) map

--overwrite
Allow output files to overwrite existing files

--help
Print usage summary

--verbose
Verbose module output

--quiet
Quiet module output

--ui
Force launching GUI dialog

Parameters:
elevation=name [required]
Name of input elevation raster map

water_level=float [required]
Water level

lake=name
Name for output raster map

coordinates=east,north
Seed point coordinates
Either this coordinates pair or a seed map have to be specified

seed=name
Input raster map with given starting point(s) (at least 1 cell > 0)
Either this parameter or a coordinates pair have to be specified

DESCRIPTION


The module fills a lake to a target water level from a given start point. The user can
think of it as r.grow with additional checks for elevation. The resulting raster map
contains cells with values representing lake depth and NULL for all other cells beyond the
lake. Lake depth is reported relative to specified water level (specified level = 0
depth).

This module uses a 3x3 moving window approach to find all cells that match three criteria
and to define the lake:

· cells are below the specified elevation (i.e., water level);

· cells are connected with an initial cell (seed or coordinates pair value);

· cells are not NULL or masked.

The water level must be in DEM units.

NOTES


The seed (starting) point can be a raster map with at least one cell value greater than
zero, or a seed point can be specified as an E, N coordinate pair. If the seed is
specified as a coordinate pair, an additional check is done to make sure that the target
water level is above the level of the DEM. When a raster map is used as a seed, however,
no such checks are done. Specifying a target water level below surface represented by DEM
will result in an empty map. Note: a raster lake map created in a previous run can also be
used as a seed map for a new run to simulate rising water levels.

The module will create a new map (lake=foo) or can be set to replace the input (seed=bar)
map if the -o flag is used. The user can use -o flag to create animations of rising water
level without producing a separate map for each frame. An initial seed map must be
created to start the sequence, and will be overwritten during subsequent runs with
resulting water levels maps (i.e., a single file serves for both input and output).

Negative output (the -n flag) is useful for visualisations in NVIZ. It equals the
mapcalc’s expression "negative = 0 - positive".

r.mapcalc equivalent - for GRASS hackers
This module was initially created as a script using r.mapcalc. This had some limitations
- it was slow and no checks where done to find out required iteration count. The shell
script code (using r.mapcalc) used in the original script is shown below:
${seedmap} = if( ${dem}, \
if( if( isnull(${seedmap}),0,${seedmap}>0), ${wlevel}-${dem}, \
if( \
if(isnull(${seedmap}[-1,0]),0, ${seedmap}[-1,0]>0 && ${wlevel}>${dem}) ||\
if(isnull(${seedmap}[-1,1]),0, ${seedmap}[-1,1]>0 && ${wlevel}>${dem}) ||\
if(isnull(${seedmap}[0,1]), 0, ${seedmap}[0,1]>0 && ${wlevel}>${dem}) ||\
if(isnull(${seedmap}[1,1]), 0, ${seedmap}[1,1]>0 && ${wlevel}>${dem}) ||\
if(isnull(${seedmap}[1,0]), 0, ${seedmap}[1,0]>0 && ${wlevel}>${dem}) ||\
if(isnull(${seedmap}[1,-1]),0, ${seedmap}[1,-1]>0 && ${wlevel}>${dem}) ||\
if(isnull(${seedmap}[0,-1]),0, ${seedmap}[0,-1]>0 && ${wlevel}>${dem}) ||\
if(isnull(${seedmap}[-1,-1]),0, ${seedmap}[-1,-1]>0 && ${wlevel}>${dem}),\
${wlevel}-${dem}, null() )))

The ${seedmap} variable is replaced by seed map names, ${dem} with DEM map name, and
${wlevel} with target water level. To get single water level, this code block is called
with same level numerous times (in a loop) as the lake grows by single cells during single
run.

KNOWN ISSUES


· The entire map is loaded into RAM.

· A completely negative seed map will not work! At least one cell must have a value
> 0. Output from r.lake -n cannot be used as input in the next run.

EXAMPLE


Example of small flooding along a street (North Carolina sample dataset):
g.region raster=elev_lid792_1m -p
# water accumulation next to street dam
r.lake elev_lid792_1m coordinates=638759.3,220264.1 water_level=113.4 lake=flooding
# draw resulting lake map over shaded terrain map
r.relief input=elev_lid792_1m output=elev_lid792_1m_shade
d.rast elev_lid792_1m_shade
d.rast flooding
d.vect streets_wake

Small flooding along a street (r.lake, using Lidar 1m DEM)

Use r.lakegrass online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    archlabs_repo
    archlabs_repo
    Package repo for ArchLabs This is an
    application that can also be fetched
    from
    https://sourceforge.net/projects/archlabs-repo/.
    It has been hosted in OnWorks in...
    Download archlabs_repo
  • 2
    Zephyr Project
    Zephyr Project
    The Zephyr Project is a new generation
    real-time operating system (RTOS) that
    supports multiple hardware
    architectures. It is based on a
    small-footprint kernel...
    Download Zephyr Project
  • 3
    SCons
    SCons
    SCons is a software construction tool
    that is a superior alternative to the
    classic "Make" build tool that
    we all know and love. SCons is
    implemented a...
    Download SCons
  • 4
    PSeInt
    PSeInt
    PSeInt is a pseudo-code interpreter for
    spanish-speaking programming students.
    Its main purpose is to be a tool for
    learning and understanding the basic
    concep...
    Download PSeInt
  • 5
    oStorybook
    oStorybook
    oStorybook l'outil privil�gi� des
    �crivains. ATTENTION : voir sur
    http://ostorybook.tuxfamily.org/v5/
    --en_EN oStorybook the right tool for
    writers. WARNIN...
    Download oStorybook
  • 6
    Asuswrt-Merlin
    Asuswrt-Merlin
    Asuswrt-Merlin is a third party
    firmware for select Asus wireless
    routers. Based on the Asuswrt firmware
    developed by Asus, it brings tweaks, new
    features and ...
    Download Asuswrt-Merlin
  • More »

Linux commands

  • 1
    aafigure
    aafigure
    aafigure - convert ASCII art to an
    image ...
    Run aafigure
  • 2
    aafire
    aafire
    aafire, aainfo, aasavefont, aatest -
    aalib example programs ...
    Run aafire
  • 3
    coqtop.opt
    coqtop.opt
    coqtop.opt - The native-code Coq
    toplevel ...
    Run coqtop.opt
  • 4
    coqwc
    coqwc
    coqwc - print the number of
    specification, proof and comment lines
    in Coq files ...
    Run coqwc
  • 5
    g15composer
    g15composer
    g15composer - Scriptable command
    interface to libg15render(3) drawing
    functions DESCRIPTION: G15composer is a
    scriptable command interface to the
    libg15render ...
    Run g15composer
  • 6
    g15daemon
    g15daemon
    g15daemon - provides access to extra
    keys and the LCD available on the
    logitech G15 keyboard. DESCRIPTION:
    G15Daemon allows users access to all
    extra keys by d...
    Run g15daemon
  • More »

Ad