logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

r.carve - Generates stream channels.

Authors

       Bill Brown (GMSL)
       GRASS 6 update: Brad Douglas

Description

r.carve accepts vector stream data as input, transforms them to raster, and subtracts a  default-depth  +
       additional-depth  from  a  DEM. If the given width is more than 1 cell, it will carve the stream with the
       given width. With the -n flag it should eliminate all flat cells within the stream, so when  and  if  the
       water  gets  into  the stream it will flow. The points option generates x,y,z for points which define the
       stream with the z-value of the bottom of the carved-in stream. These points can  then  be  combined  with
       contours to interpolate a new DEM with better representation of valleys.

Example

       North Carolina sample dataset:
       # set computational region
       g.region raster=elev_lid792_1m -p
       # digitize a ditch for the farm pond
       echo "L  3 1
        638692.93595422 220198.90026383
        638737.42270627 220149.74706926
        638984.43306379 220148.19158842
        1     1" | v.in.ascii -n input=- output=ditch format=standard
       # visualize original data
       d.mon wx0
       d.rast elev_lid792_1m
       d.vect ditch
       # carve
       r.carve raster=elev_lid792_1m vector=ditch output=carved_dem width=3 depth=0.5
       # visualize resulting carved DEM map
       d.rast carved_dem
       # visualize
       r.relief input=elev_lid792_1m output=elev_lid792_1m_shaded
       r.relief input=carved_dem output=carved_dem_shaded
       d.rast elev_lid792_1m_shaded
       d.erase
       d.rast carved_dem_shaded
       # flow accumulation
       r.watershed elevation=elev_lid792_1m accumulation=elev_lid792_1m_accum
       r.watershed elevation=carved_dem accumulation=carved_dem_accum
       d.rast elev_lid792_1m_accum
       d.erase
       d.rast carved_dem_accum
       # differences
       r.mapcalc "accum_diff = elev_lid792_1m_accum - carved_dem_accum"
       r.colors accum_diff color=differences
       d.erase
       d.rast accum_diff
       Fig:Original1mLiDARbasedDEMwithvectorstreamsmaponFig:Original1mLiDARbasedDEMshownasshadedterraintopFig:Carved1mLiDARbasedDEMFig:Carved1mLiDARbasedDEMshownasshadedterrainFig:Flowaccumulationinoriginal1mLiDARbasedDEMFig:Flowaccumulationincarved1mLiDARbasedDEM

Keywords

       raster, hydrology

Known Issues

       The  module  does  not  operate  yet  in latitude-longitude coordinate reference system.  It has not been
       thoroughly tested, so not all options may work properly - but this was the intention.

Name

r.carve  - Generates stream channels.
       Takes vector stream data, transforms it to raster and subtracts depth from the output DEM.

Notes

r.carve  does  not  create a depressionless DEM because many depressions are in flat areas and not in the
       streams.

References

       Terrain modeling and Soil Erosion Simulations for Fort Hood and Fort Polk test areas, by Helena Mitasova,
       Lubos Mitas, William M. Brown, Douglas M.  Johnston, GMSL (Report for CERL 1999)

See Also

r.flow,r.fill.dir,r.watershed

Source Code

       Available at: r.carve source code (history)

       Accessed: Friday Apr 04 01:19:00 2025

       Main index | Raster index | Topics index | Keywords index | Graphical index | Full index

       © 2003-2025 GRASS Development Team, GRASS GIS 8.4.1 Reference Manual

GRASS 8.4.1                                                                                      r.carve(1grass)

Synopsis

r.carver.carve--helpr.carve   [-n]   raster=namevector=nameoutput=name   [points=name]    [width=float]    [depth=float]
       [--overwrite]  [--help]  [--verbose]  [--quiet]  [--ui]

   Flags:-n
           No flat areas allowed in flow direction

       --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:raster=name[required]
           Name of input raster elevation map

       vector=name[required]
           Name of input vector map containing stream(s)
           Or data source for direct OGR access

       output=name[required]
           Name for output raster map

       points=name
           Name for output vector map for adjusted stream points

       width=float
           Stream width (in meters)
           Default is raster cell width

       depth=float
           Additional stream depth (in meters)

See Also