Open michelk opened 3 years ago
WhiteboxTools isn't really a library, but rather an application. Specifically, it is a command-line application. As such, it's not as though one could import the WBT source into another Rust project and call functions in the same way that you could a library. Now, that said, there are actually components of the project that are set up in that way. In particular, the whitebox-common, whitebox-lidar, whitebox-raster, and whitebox-vector libraries can be treated somewhat like a library, however, these are only for low-level operations (e.g. reading/writing various data formats) and do not include any of the tools themselves.
I would like to convert a TIN into a raster. Would you accept PRs, where I move some functionality out of the TINGridding::run
-method to a location where it is accessible? What would be the preferred location? Could the library be uploaded to crates.io?
The logic creating the TIN is already contain in a library component (whitebox-common) found here:
I have an existing TIN and would like to convert that into a raster.
I would like to factor out parts of tin_gridding.hs into whitebox-common.
Background:
I have an existing triangulated surface-mesh with x,y,z nodes and would like to generate a raster, where the raster-values are interpolated from the z-value of the mesh-nodes.
Would you accept a PR for that?
Perhaps I'm confused about exactly what it is that you are asking here. The triangulate
function that you are referring to is already contained within whitebox-common, within the algorithms section. It is already factored out of the tool TINGridding
. That is, the tool just calls the function from white box-common.
Sorry for being unclear. I would like to factor out the gridding-part: I need a function which returns a raster from a set of triangles (e.g. tin_to_raster
).
Just by looking at the manual, it seems like that it is discouraged to use the Rust-library directly? Is there any reason for that? If not, it would be helpful, if there were a section on that in the manual.