-
Notifications
You must be signed in to change notification settings - Fork 224
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
Wrapper for grdmix #578
Comments
This would be a great feature. I have a few comments:
|
Those are some great comments! I've been putting off this feature as I wanted to see how the rest of the PyData ecosystem is storing multi-band images, notably with packages like
👍. Yes I think producting an (M,N,3) xarray.DataArray output sounds like the way to go. We should also decide on whether to use
In the short term (PyGMT v0.5.0), I would suggest doing a minimal thin wrapper around GMT For those analysis tasks, which will be a more long term goal (PyGMT v0.6.0?), we should either:
The option depends on what radiometric resolution people want to work on. Those ok with 8-bit radiometric resolution can use Option 2 (though I don't see many optical satellite products that have such a low bit resolution anymore...) while those wanting higher (e.g. 16-bit) radiometric resolution should go with Option 1. Another thing we may want to consider is whether the GMT C library should support 16-bit (0-65536) precision for
My impression was that passing RGB (M, N, 3) grids into |
Good point, I think this will take some experimentation to figure out whether xarray or rioxarray will work better for opening the resultant data and metadata.
Agreed!
As you said, the 8-bit resolution is a problem for analysis but not really for visualization since most monitors/printers are 8-10 bit depth anyways. I have only used grdmix for visualization, what would grdmix be used for that would benefit from 16-bit precision?
My understanding is that passing three (M, N) grids to |
Initial commit for wrapping the grdmix function for #578 which does blending and transforming of grids and images. Original GMT `grdmix` documentation is at https://docs.generic-mapping-tools.org/6.2/grdmix.html. Aliased non-common optional parameters construct (C), deconstruct (D) and normalize (N). Added one unit test to deconstruct the earth_day_01d.tif image into 3 bands.
Description of the desired feature
Implement grdmix which does "Blending and transforming grids and images".
Inspired by GenericMappingTools/gmt#3992 (comment) which would help resolve the longstanding PR at #370 (comment)
Implementation wise, should we output the rgb raster into an
xarray.Dataset
? Or a list ofxarray.DataArray
s? See also related discussion at #370.Are you willing to help implement and maintain this feature? Yes, but help is welcome
The text was updated successfully, but these errors were encountered: