We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If indices were returned as CartesianIndex then they can be used to directly index info a geoarray when dealing with Vector of points
indices
CartesianIndex
geoarray
Vector
The text was updated successfully, but these errors were encountered:
This is what I'm doing now:
ind = indices.(Ref(ga0), xy);
ind = [CartesianIndex((ij[1], ij[2])) for ij in ind] val = ga0[ind]
Sorry, something went wrong.
I think it's a fair point that we should accept and return CartesianIndices, although it would be breaking. Note you can rewrite your code to:
CartesianIndex.(Tuple.(indices.(Ref(ga), xy)))
And you can actually index into the GeoArray directly with floating point numbers: getindex.(Ref(ga), SVector{2}.(xy)).
getindex.(Ref(ga), SVector{2}.(xy))
In GeoArrays 0.8, indices(::GeoArray, x, y) are now returned as CartesianIndex.
indices(::GeoArray, x, y)
Successfully merging a pull request may close this issue.
If
indices
were returned asCartesianIndex
then they can be used to directly index info ageoarray
when dealing withVector
of pointsThe text was updated successfully, but these errors were encountered: