-
Notifications
You must be signed in to change notification settings - Fork 2
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
option to export cloth from cloth simulator filter #10
Comments
See jianboqi/CSF#27 It is probably doable but not trivial. I won't do it in a close future for sure. |
Right on, and thanks for the link to the issue you opened in the original CSF code. If you'd be open to creative solutions or PRs, I might try to think about how this might be achievable with the CSF code as written. Maybe writing to a temporary file is okay? Or writing to disk in a more permanent way with it being left up to the user to re-import the cloth (in whatever format it's in) as a raster/data.table/point cloud? |
It is ok but one requirement: RCSF is a standalone package with no dependency (expect In
|
Hmm, I see what you mean. That makes sense that this would be a two step process: 1) add the ability to write the cloth to disk in the What if you don't need to return a raster when calling So this line (copied below) in
If If you think this seems reasonable, I can see about implementing it. Or if you think this way would be no good, then I'm curious to hear that too! |
And how do you get back a |
Yes, that'd be my first instinct-- to leave it up to the user to deal with the file as they'd like. |
The problem with your option is that if you only want the cloth, the side effect is the classification of the points. I prefer a new function like raster = csf_cloth(las, csf()) |
Yes, that's true. For my use case, I would definitely always want the point classifications too. But that of course doesn't mean that everyone would want that. In your example above, do you imagine that the So if a user wants to classify ground/non-ground for their point cloud only, they'd use If a user wants to both classify ground/non-ground for their point cloud AND export the cloth to disk, they'd use And if a user wants to just get the cloth without modifying the point cloud at all, they'd use |
Yes
Yes if the exported file is something that can be trivially be used. Not a raw text file. I think, no matter how, it should alway write a
In that case no need to provide a path. It must be saved in a temporary file and be loaded back as a Honestly it is probably not the hardest part to export the cloth. Introducing this feature consistently is more difficult imo. |
Copy that. I agree that a consistent implementation is important. If you definitely want to use a It looks like the nodes of the cloth are written to disk as a tab delimited text file in the Cloth.cpp code: That should be easy enough to read back into R, then convert the regular grid to a raster layer using All of this hinges on first modifying Modifying
|
The distinction between |
Two comments:
Not
You will face a technical issue that you will have difficulty to solve. But it can be solved. When you will be there we will discuss about that. |
Hello,
I was directed here from an issue I opened in the {lidR} package (r-lidar/lidR#244 (comment)). I'll copy that text here:
It looks like this is possible in the C++ code (https://github.com/Jean-Romain/RCSF/blob/7de8509dbe8ec413a77a8ead1e43cc5789d6e2de/src/CSF.cpp#L176-L177. Would it be straightforward to make this an option for {RCSF} to export the cloth as a {raster} object? (Then perhaps that option could be forwarded on to the use of the
lidR::csf()
algorithm.)The text was updated successfully, but these errors were encountered: