-
Notifications
You must be signed in to change notification settings - Fork 94
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
GdalType as Pulic #48
Comments
I'm not really sure if we want GdalType to be public. Let me think about the implications :) |
Since Array2 is the obvious data-structure for raster data, i guess we should add such method directly to rust-gdal. However, we should use a feature "ndarray" to allow disabling. Do you think this would work for your use-case? |
yes... that would be really great! |
Great :) If you already have a matching method feel free to create a pull request. Otherwise i will see if i have time to write something :) |
No problem. I'll work on it. |
Not sure how great it is but I have submitted PR. Thanks! |
Great! thank you :) I will look at it as soon as possible (when i have some free time). |
I have another use case that I think would benefit from Since the GDAL data type isn't part of the fn combine<T: GdalType>(b1: &RasterBand, b2: &RasterBand, ...) -> Result<Dataset, Error> Is there an alternative that I should consider? |
Since the GdalDatatatype in gdal-sys is |
I would like to be able to write a function that loads a raster dataset into an ndarray. For instance:
fn read_as_array<T: Copy + From<GdalType>, P: AsRef<Path>>(path: P) -> Result<ndarray::Array2<T>> { ... }
This would internally coerce the GdalType values into their corresponding primitive number type. Unfortunately, GdalType is currently marked private and this is not possible. Would it be possible to mark it as
pub
or am I approaching this problem incorrectly?The text was updated successfully, but these errors were encountered: