-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update with method for Spatrasters #26
base: master
Are you sure you want to change the base?
Conversation
Adapted the code to work with SpatRaster from the terra package and added the possibility to output the lines as an sf object. There's a horrible workaround to solve a transpostion of the data along the second axi but couldn't find a better alternative. Overall, it works smoothly and fast even with high resolution aerial images (tested on 1km tiles with 0.15 cm pixels)
Update line_segment_detector.R
Thanks for the changes, I think this requires adding R package terra and R package sf in the Suggests in the DESCRIPTION file as well as some examples in the @examples section, conditional on the availability of terra and sf. |
ok, great: if the changes I proposed are good for you, I'll push also the other updates as soon as possible. I might have some issues with the material for the example, but let's see |
added SpatRaster method
Hi, I added an example (the same one from I realised that all pull requests pushed to my master ended up to this commit: be patiant, I'm not that much used to github and versioning :) |
Thanks, looks already nice, if you could rewrite the code such that we don't have dplyr as Suggest dependency and rename the argument to |
changed "export_sf" parameter to "as_sf"
changed "export_sf" parameter to "as_sf"
by now, I only renamed the parameter but I don't have time in these days to find/test an alternative in plain R to |
If summarize is just a union. Wouldn't this just be using sf::st_union |
|
In order to add your functions to the NAMESPACE file, you can run Document in RStudio and also don't forget to run R CMD check. As I see the examples failed. Can you further document your output structures + have a minimally reproducible example for image_contour_detector.RasterLayer |
- added curve_ID - fixed '@return' description - fixed minor issues
- refined sf objects creation - removed dependency on sp and moving it to sf - updated plot.lsd
few more small updates. the example for rasterlayer is the same as terra, but with I added small updates to the output description but, now tht the package supports spatial data, I think it may be important to documene "better" some parameters. For example, I would add something like ; expressed in pixels at the end of the descriptions for |
Adapted the code to work with
SpatRaster
from theterra
package and added the possibility to output the lines as ansf
object. There's a horrible workaround to solve a transposition of the data along the second axis (upper right to lower left) but couldn't find a better alternative. Overall, it works smoothly and fast even with high resolution aerial images (tested on 1km tiles with 0.15 cm pixels).If I'll have time, I might work on some other tools