Skip to content

Commit

Permalink
r.watersheds: Add one more example using bridges vector (#1262)
Browse files Browse the repository at this point in the history
  • Loading branch information
HuidaeCho authored Dec 8, 2024
1 parent b34ac9f commit f77724e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/raster/r.watersheds/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ int main(int argc, char *argv[])
G_add_keyword(_("watershed delineation"));
module->description = _("Delineates a large number of watersheds using the "
"Memory-Efficient Watershed Delineation (MESHED) "
"OpenMP parallel algorithm by Cho (2024).");
"OpenMP parallel algorithm by Cho (2025).");

opt.dir = G_define_standard_option(G_OPT_R_INPUT);
opt.dir->key = "direction";
Expand Down
20 changes: 18 additions & 2 deletions src/raster/r.watersheds/r.watersheds.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ <h2>NOTES</h2>

<h2>EXAMPLES</h2>

This example uses the North Carolina sample dataset.
These examples use the North Carolina sample dataset.

<p>Calculate flow accumulation using <em>r.watershed</em> and delineate all
watersheds from draining cells using <em>r.watersheds</em>:
Expand Down Expand Up @@ -64,7 +64,23 @@ <h2>EXAMPLES</h2>
</pre></div>

<div align="center">
<img src="r_watersheds_nc_example.png">
<img src="r_watersheds_wsheds.png">
</div>

<p>Perform the same analysis for 10,938 bridges in North Carolina:
<div class="code"><pre>
# set computational region
g.region -ap raster=elev_state_500m

# calculate drainage directions using r.watershed
r.watershed -s elevation=elev_state_500m drainage=drain_state

# delineate all watersheds using r.watersheds
r.watersheds dir=drain_state outlets=bridges output=bridge_wsheds nproc=$(nproc)
</pre></div>

<div align="center">
<img src="r_watersheds_bridge_wsheds.png">
</div>

<h2>SEE ALSO</h2>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/raster/r.watersheds/r_watersheds_nc_example.png
Binary file not shown.
Binary file added src/raster/r.watersheds/r_watersheds_wsheds.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f77724e

Please sign in to comment.