-
Notifications
You must be signed in to change notification settings - Fork 88
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
self-correcting error in polygon2GRIDobj #39
Comments
(potentially we also just have different definitions of how |
Hi @oejwing |
In
getmask
,getextent
is called with the order of the arguments being row/lat/y first and col/lon/x second.topotoolbox/@GRIDobj/polygon2GRIDobj.m
Line 240 in 21c93eb
However,
getextent
requires the order to the opposite.topotoolbox/@GRIDobj/polygon2GRIDobj.m
Lines 272 to 275 in 21c93eb
This means
getmask
has swapped X and Y dimensions. Fortunately, theext(1:2)
refers to Y andext(3:4)
refers to X, so the error corrects itself. But I suggest returningext = [min(y) max(y) min(x) max(x)];
ingetextent
and callgetextent(c,r)
ingetmask
.The text was updated successfully, but these errors were encountered: