-
Notifications
You must be signed in to change notification settings - Fork 95
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
support for adding a dictionary of layer-specific metadata tags? #1071
Comments
I've figured out a workaround to use the {reticulate} interface to Python's {rasterio} package. The following will add a tag called
|
file level tags can now be set with |
Awesome, thanks @rhijmans! |
I took me a while, but with e069502 it is now possible to add user defined layer specific tags and write/read them to/from GTiff. Note that "time" variables are handled automatically so that they are recognized and recovered as such.
Please let me know if this is not flexible enough for you (by opening a new issue). |
I'm following up on this StackOverflow answer (https://stackoverflow.com/questions/71367060/write-rasterstack-and-preserve-metadata-in-r) and the request to make a feature request here if this is functionality that we might find useful.
It's my understanding that python's
rasterio
can write arbitrary metadata to the layers of multiband raster as a dictionary when writing a GTIFF to disk. E.g., to include a "start_date" tag for each layer of a 6-band raster that each represents a new year, we might write:I know that we can now write band names on disk (which is great!) and I think the extra tagging functionality would also add to metadata management.
The text was updated successfully, but these errors were encountered: