Closed JosiahParry closed 9 months ago
Amazing. Will check it out now!
Straight back at ya, minor changes suggested including exposing use_rsgeo
, will be useful for benchmarking: https://github.com/JosiahParry/stplanr/pull/1/files
For some reason I get this note, not sure if it's new, but should add to the global allowed names I'm thinking to make checks happier:
Undefined global functions or variables:
segment
That's after my changes...
For some reason I get this note, not sure if it's new, but should add to the global allowed names I'm thinking to make checks happier:
Undefined global functions or variables: segment
This is likely because there is a variable declared an unused? I won't be able to review for a few more hours.
Merged :+1:
Closes #522.
This PR speeds up
line_segment()
by utilizingrsgeo
. This only occurs when the package is installed (there is no prompting introduced in this PR as might be done usingrlang::check_installed()
), and the input geometry either has a missing CRS or is not a geographic CRS this is because rsgeo utilizes euclidean distance to segmentize. If there is a desire to use geodesic / haversine distance in a line_segmentize function, theres potential to add that upstream. However, its my understanding that most road network anlaysis is done on a fairly localized level which should be done using a projected CRS anyways! :)Further, this PR converts
line_segment()
into an S3 generic with ansf
andsfc_LINESTRING
method enabling people to work with only their geometries and not always have to have a data frame.rsgeo is added to the DESCRIPTION's
Suggests
field.Benchmark: