Open
Conversation
weiji14
approved these changes
May 5, 2025
Member
weiji14
left a comment
There was a problem hiding this comment.
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!
| @@ -15,7 +15,7 @@ geo-index = { version = "0.1", optional = true } | |||
| geo-types = { version = "0.7" } | |||
| num_enum = "0.7" | |||
| num-traits = "0.2" | |||
Member
There was a problem hiding this comment.
Since we're not using num_traits::FromPrimitive anymore, I guess this dependency can be removed?
Suggested change
| num-traits = "0.2" |
|
I appreciate you adding a |
Member
|
@vini-fda, ok if I push changes directly here to resolve the merge conflict, and then merge this PR in? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).