-
Notifications
You must be signed in to change notification settings - Fork 30
Added the RasterValue type
#27
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
base: main
Are you sure you want to change the base?
Conversation
weiji14
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late review @vini-fda. This PR looks ok to me, a little unfortunate that we can't use the primitive converters from num-traits to support complex numbers, but I guess we'll have to settle with more verbose code.
If you remove the num-traits dependency and re-lock the Cargo.lock file, I can merge this afterwards. Thanks again!
| geo-index = { version = "0.1", optional = true } | ||
| geo-types = { version = "0.7" } | ||
| num_enum = "0.7" | ||
| num-traits = "0.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we're not using num_traits::FromPrimitive anymore, I guess this dependency can be removed?
| num-traits = "0.2" |
|
I appreciate you adding a |
|
@vini-fda, ok if I push changes directly here to resolve the merge conflict, and then merge this PR in? |
This PR proposes to replace the
unwrap_primitive_typemacro with aRasterValueenum, which makes it easier to add more types later. It also adds the convenience methodssample_type,get_value_atandget_value_at_pixelto theGeoTIFFstruct.The reasoning behind this change is to make a more ergonomic API to add the
CInt32andCInt32data types in another PR (see #24).