-
Notifications
You must be signed in to change notification settings - Fork 26
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
transposed rasters #37
Comments
I'm also in preference of having the third option as the default. Should we
? |
I'm not sure whether it is worth the extra code/maintenance/complexity to have a Other options are But for geospatial rasters small arrays may not be as common? And if we want to write the results back to GDAL again, there is no need to copy a second time if we use |
Let's just go with |
I agree with |
Sorry I'm a little overwhelmed by work at the moment. But I'll be happy to take PRs |
Yeah no pressure! Was just the result of a little private discussion we had about the pros and cons of doing this :) |
Anything we should note? Might this be related to the discussion on AbstractRasters in GeoInterface? |
No I don't think it directly relates to that discussion. See also #57 (comment) |
After a discussion in #57, @yeesian, summarizing my viewpoint:
I closed the PR. I would opt for a new PR, implementing the documentation in discussed in (a) and leave it at that. We can leave this issue open for a week or two(? @visr), so others can state their views. |
Documenting the order of the dimensions is definitely a good idea. I also agree a kind of in-between solution might also cause more confusion, it's best to have a consistent and easy to explain interface. It still bothers me a bit that with (col, row, band) we will have a different order than users may expect based on most other julia packages, but also don't see an easy way out, other than permuting on every io. If we don't permute, users will likely have to do it themselves depending on what they are doing. One way out, but not quite there yet is explicitly naming the axes NamedIndexing.jl or AxisArrays.jl. That way we can at least always know what the order is. Knowing the order will probably be important for JuliaGeo/GeoInterface.jl#16. No direct rush for closing this issue, though perhaps good not to hold things up based on this, and just register ArchGDAL. If we change our mind about permuting we can do a breaking release. But that's probably still better than breaking on master of an unregistered package that quite a few are already using, so people cannot pin it easily. |
It might be a good idea to have a package (building upon GDAL/ArchGDAL) that plays with all these ideas (including the |
Yeah indeed. Perhaps we can use https://github.com/evetion/GeoRasters.jl for that. |
Added documentation in #60 |
Closed by #60 |
@evetion you closed this issue with comment below in
But actual return size seems to be still
outputheight (rows): 1024 |
Thanks for checking and the feedback. I've just checked now and you're right. I'll make a PR. |
If a complete band is read into an array, the x and y dimensions are flipped:
This is because GDAL is row-based and Julia column-based.
Some options regarding this:
permutedims
(docs) before returning the array. Makes a copy of the whole dataset.PermutedDimsArray
(docs). This does not create a copy, but a permuted view.I haven't really worked with
PermutedDimsArray
yet, but to me it seems like the best choice right now. Thoughts?The text was updated successfully, but these errors were encountered: