-
Notifications
You must be signed in to change notification settings - Fork 27
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
Import rasters to a julia array #45
Comments
Assuming you have a
The following should work: img = ArchGDAL.registerdrivers() do
ArchGDAL.read("RGB.byte.tif") do dataset
ArchGDAL.read(dataset)
end
end and yield 791×718×3 Array{UInt8,3}:
[:, :, 1] =
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 … 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00
... |
Ok thanks somehow I missed that using read twice would return an array. |
Yeah it's not particularly obvious, and It'll be nice to provide a better set of documentation for working with rasters (issue #40). The first |
Decoupling that makes sense. But it might be useful to have another package that further wraps ArchGDAL for these simple cases, so people doing basic IOcan totally avoid GDAL and just get a raster array with one command. |
Yeah, ArchGDAL is not meant to be end-user facing. It's meant for other packages to build on top of, see e.g.
I agree with you. Does |
Sure. I was thinking about writing something simple but I'm really not knowledgeable enough about raster data. Unfortunately Imagemagic mangles some non-standard raster inputs on import, so its not really ok for production work. |
Thanks for putting this package together.
I have a simple need of import tiff rasters with something better than imagemagic. It seems I can do that with this package but I'm not sure of the simplest way to just get a tiff into some kind of Julia Array. My GDAL experience is limited.
The text was updated successfully, but these errors were encountered: