ropensci / slopes

Package to calculate slopes of roads, rivers and trajectories
https://docs.ropensci.org/slopes/
GNU General Public License v3.0
70 stars 6 forks source link

Comparison with river gradient technique #47

Open fiftysevendegreesofrad opened 2 years ago

fiftysevendegreesofrad commented 2 years ago

Question - are you doing yourselves justice by saying slopes.R uses the method outlined in https://www.sciencedirect.com/science/article/pii/S0022169418304888?via%3Dihub ? it seems to me the latter breaks rivers into lengths no more than x metres long, then for each one subtracts minimum elevation from maximum, regardless of where on the segment the min/max occur and what happens in between them (though generally you would expect max to be at the start and min at the end, because rivers flow downhill, so if they occur at any other point you can view this as a sort of error correction). This is different to slopes which from what I can tell (?) interpolates each vertex on the linestring before computing a distance weighted mean/max/harmonic mean, hence it does not ignore any vertices on linestrings, though does ignore non-vertex points on linestrings. Thus the only thing slopes.R has in common with the river paper is that some points are ignored - but different points are ignored in each case. Have I understood correctly?