-
Notifications
You must be signed in to change notification settings - Fork 4
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
get_pixel_line (or a helper) needs to truncate #339
Comments
The more I think about it, I don't think this is a bug and should not change. It's a property of the geotransform, not a grid, so it's correct, and useful 🙏 |
Right, Behavior is unchanged for |
Excellent, I agree this is a good stance, and really good addition. Thanks! I wonder if it should be a method on the class though, I haven't done a thorough check ... standalone functions tend to be independent of instances and that seems to be a style. I don't have a strong opinion, this just occurred to me, and I guess it could exist in both forms. |
Yes that makes sense for it to exist in both forms. Done in #341. That PR also allows |
A 360x180 raster has the following geotransform, in bounds -180,-90,180,90 but get_pixel_line returns values < 0 and > row/col limit.
I wonder if we should include a special case for
x == xmax, y == ymax
because they are currently out of bounds and I'm not sure that's desirable.(Also, should they both columns be set to NA when either out of bounds ?? ... maybe not).
And, I appreciate this might be a case of having a higher level wrapper function that cleans up the output for use as row/col indices, because the logic is still mathematically sound in terms of a domain that extends past an actual dataset and that is also useful (in fact that might be the way to handle global<->local index conversion mentioned in #338).
The text was updated successfully, but these errors were encountered: