-
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
Create attributes in rast to store metadata #1304
Comments
It would be possible to allow storing arbitrary metadata. But I am not sure what the value of that would be. Do you have a compelling use-case? |
Hi Robert,
thanks for your reply.
As example, I have created an R package to process fisheye images, it
consists of 4 functions which sequentially use raster() to process images.
After each steps, I stored the metadata of processing in slots like:
***@***.***@attributes$channel <- channel
***@***.***@attributes$stretch <- stretch
***@***.***@attributes$gamma <- gamma
where channel, stretch, gamma are examples of function arguments whose
information are then carried out to subsequent functions.
I would switch from raster::raster() to terra::rast() but I don't know to
bring the information among sequential functions using rast().
Any suggestions?
F
…On Mon, Oct 9, 2023 at 11:11 AM Robert Hijmans ***@***.***> wrote:
It would be possible to allow storing arbitrary metadata. But I am not
sure what the value of that would be. Do you have a compelling use-case?
—
Reply to this email directly, view it on GitHub
<#1304 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGX3WQE33Z6WHHDJVFKL73LX6O5TTAVCNFSM6AAAAAA5VTPVXGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJSGYYTIOBSGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Francesco CHIANUCCI
PhD Forest Ecology
CREA - Research Center for Forestry and Wood, Arezzo, Italy
<https://www.crea.gov.it/en/web/foreste-e-legno>
ORcID <http://orcid.org/0000-0002-5688-2060>
Skype: checcoar
|
Thanks. Please have a look at A next step could be to also write and read these tags when using file formats that support arbitrary tags (GeoTiff, not sure if there are others). |
The tags are now written to file (and read again) when using GeoTiff. |
Wow. that's great.
Many thanks,
Francesco
…On Tue, Oct 10, 2023 at 1:53 PM Robert Hijmans ***@***.***> wrote:
The tags are now written to file (and read again) when using GeoTiff.
—
Reply to this email directly, view it on GitHub
<#1304 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGX3WQFAFMKDMNLXSKUHIMLX6UZLRAVCNFSM6AAAAAA5VTPVXGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJVGIYDEOJRHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Francesco CHIANUCCI
PhD Forest Ecology
CREA - Research Center for Forestry and Wood, Arezzo, Italy
<https://www.crea.gov.it/en/web/foreste-e-legno>
ORcID <http://orcid.org/0000-0002-5688-2060>
Skype: checcoar
|
If anyone is looking for this function, |
I already noticed here https://stackoverflow.com/questions/71367060/write-rasterstack-and-preserve-metadata-in-r that terra::rast() can store names() and time() attributes, but what about storing additional metadata? Something likes the @DaTa@attributes in raster::raster()
The text was updated successfully, but these errors were encountered: