-
Notifications
You must be signed in to change notification settings - Fork 83
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
Add ability to describe color interpretation #191
Comments
When reading the raster, the Without modifying rioxarray, you can use the rds.rio.to_raster(...,photometric="RGB") Otherwise, you will have to use |
Another option would be to add a rds.rio.to_raster(...,colorinterp=[rasterio.enums.ColorInterp.gray] * len(band_descriptions)) |
Hi there 👋, I'm interested in adding the color interpretation feature too. We're thinking of integrating If it's just a matter of applying pydata/xarray#3136 to the But to open a can of worms, is it ok to just store the color table in the |
Hi @weiji14, it would definitely be great if you would like to add the functionality. The main changes that need to happen are:
If you are feeling extra motivated, you could add methods to the |
Side note, to plot RGB bands, here is an example ref rds.astype("int").plot.imshow(rgb="band") |
Ability to handle color interpretation as enabled by Rasterio
Primarily ability to read existing color with
Dataset.colorinterp
, return the sequence ofColorInterp.<enum>
, and the modify a Dataset by overriding it, similar to how descriptions work.Put example of opening a dataset in
r+
just to change description of bands and their respective color implementations:Probably a minor priority issue given that if you have
rioxarray
you haverasterio
as well, but combining them both might be more readable/polished.To be honest, have not looked as the source code to see if it is easy to implement, but would consider doing it if relatively minor.
For reference, I assume it would be similar for how descriptions work, by modifying the xarray
attrs['long_name']
.Not sure if an alternative approach exists (recently started using rioxarray).
Could not find a related issue in either the issues page nor on gis stackexchange
The text was updated successfully, but these errors were encountered: