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

add argument to allow negative slopes #20

Closed temospena closed 2 years ago

temospena commented 3 years ago

In order to know if a linestring has a positive or negative slope (considering direction), add an argument to slopes to allow retrieving slopes as negative, instead of always absolute. ..., allow_negative=T

temospena commented 3 years ago

or ..., directed = TRUE or ..., directed = "oneway" It could work with the info of an existing column of oneway - usually part of a road network.

once that we can get z0 and z1 withslopes we can say that if z0 > z1, the slope would be -1*slope and with the information of "FT" (1x) and "TF" (-1x). and for those with "both"? duplicate the segment to store both information?

This is useful for routing, and not so much for visualisation.

(I might need some help to make this happen 🔢 )