View source: R/reservoir_outlet.R
reservoir_outlet | R Documentation |
Takes a flow accumulation raster (or DEM for computation) and reservoir vector
file from a GRASS location and estimates the outlet coordinates of each reservoir
polygon. Can be run before reservoir_strategic
to produce the required input. May also be used to provide outlet points for subbasin delineation.
reservoir_outlet(flowacc = NULL, dem = NULL, res_vct = NULL,
outlets_vect = NULL, keep_temp = FALSE, overwrite = FALSE,
silent = F)
flowacc |
Flow accumulation raster in GRASS location used for determination
of reservoir outlets (= highest accumulation value). Set to |
dem |
Digital elevation model in GRASS location used for calculation of
flow accumulation if no flow accumulation raster is given. Default: |
res_vct |
Reservoir vector file (polygon) in GRASS location. For each polygon coordinates
of the outlet (cell with highest flow accumulation) are determined. Needs
at least the column |
outlets_vect |
Output: Name of vector file of outlet locations to be exported
to GRASS location. Same fields as |
keep_temp |
|
overwrite |
|
silent |
|
Function returns nothing, but produces outlets_vect
. WARNING: Up to version 2.5.0 this function
returned a SpatialPoints
object with the outlet coordinates.
Prepare GRASS location and necessary files in advance and start GRASS
session in R using initGRASS
. Location should not
contain any maps ending on *_t as these will be removed by calling the
function to remove temporary maps.
Internal operations require a non-dbf datatabes driver (SQLite, PostgreSQL, MySQL, ODBC, ...). Automatic switiching to sqlite will be attempted.
res_vct
must not contain a column cat_new
as this will be the new identifier
column for outlets_vect
.
Check the results by investigating vector file with outlet points written to GRASS location. Due to small projection inaccuracies between the DEM / flow accumulation raster and the reservoir vector file, calculated outlet locations might more or less deviate from true locations!
Can be run before reservoir_strategic
.
Tobias Pilz tpilz@uni-potsdam.de
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.