Skip to content

Commit

Permalink
r.carve manual: fix example for stream vector (#968)
Browse files Browse the repository at this point in the history
The example used the `streams` map which is not in the extent of the elevation map `elev_lid792_1m` at all.
The updated example uses a newly digitized line.
  • Loading branch information
neteler committed Sep 21, 2020
1 parent 33e8396 commit 12b5c94
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions raster/r.carve/r.carve.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,20 @@ <h2>EXAMPLE</h2>
# 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 streams
d.vect ditch

# carve
r.carve rast=elev_lid792_1m vect=streams out=carved_dem width=3 depth=0.5
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
Expand All @@ -48,6 +55,12 @@ <h2>EXAMPLE</h2>
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
</pre></div>

<center>
Expand Down

0 comments on commit 12b5c94

Please sign in to comment.