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

slope_xyz #23

Closed Robinlovelace closed 3 years ago

Robinlovelace commented 3 years ago

Looking at the docs I don't think there is a function to get slopes directly from linestrings with xyz geometries, e.g.:

slope_xyz(slopes::lisbon_road_segment_3d)

should work.

temospena commented 3 years ago

Looking at the docs I don't think there is a function to get slopes directly from linestrings with xyz geometries, e.g.:

slope_xyz(slopes::lisbon_road_segment_3d)

should work.

This is working.

library(slopes)
slope_xyz(slopes::lisbon_road_segment_3d)
#>          1 
#> 0.09501323
Robinlovelace commented 3 years ago

Great to see! We should now be able to continue with the evaluation based on the Seattle data (in addition to the existing data from Lisbon/Arc). Something like the following should work...

magnolia_3d = slope_3d(magnolia)
slope_xyz(magnolia_3d)
Robinlovelace commented 3 years ago

Plus more tests #18... Can find time these eve after ideas + :beers: !

Robinlovelace commented 3 years ago

Assuming you're happy with this @temospena, closing for now. We can always change function names.