Skip to content

covariate_river run time #6

Description

@tanharri

Hi,

I am trying to use the function covariate_river to attach the values of a covariate to a river network. The runtime of this function seems to be exceptionally long. I was wondering if this would be expected given the size and structure of the river network, and whether there is a faster solution.

For example, given the way the covariates are attached in the edith vignette https://cran.r-project.org/web/packages/eDITH/vignettes/eDITH.html

Could I extract an average along the aggregated vertices and attach them similarly to how elev is incorporated? And in that sense, is SC equivalent to AG, given that the river object must be aggregated to run covariate_river?

Cheers

rivnet::covariate_river(my_covar, river, categorical = categorical)

my_covar
class : SpatRaster
dimensions : 1074, 1345, 1 (nrow, ncol, nlyr)
resolution : 100.2776, 100.2776 (x, y)
extent : 277070.7, 411944.2, 753964.1, 861662.3 (xmin, xmax, ymin, ymax)
coord. ref. : OSGB36 / British National Grid
source(s) : memory
name : landcover
min value : 111
max value : 523

river
Class : river
Type : Real river
No. FD nodes : 1224671
Dimensions : 2685 x 1113
Cell size : 41.65
Has elevation : TRUE
Aggregated : TRUE
Threshold area : 4249300.54
Max reach length: Inf
No. RN nodes : 14893
No. AG nodes : 265
Has paths : FALSE
River geometry : TRUE

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions