Open Aariq opened 2 months ago
Yeah, looks like units are store in an aux.json file. varnames()
aren't read back in by rast()
so I guess that one isn't our problem. Related to #37
I've tried a half dozen or so differente GDAL drivers and they all create an aux.json file when a SpatRaster has units. Ideas:
1) always zip files after writing and use vsizip to read back in (cons to this approach in comments on #37)
2) have tar_terra_rast(my_map)
create two targets: my_map_rast
and my_map_meta
. Not sure how reading this back in would work though
3) don't support units???
Found this: https://github.com/rspatial/terra/blob/master/NEWS.md#new-18
aux.json file is written for all drivers except when using writeCDF()
Thanks for this! I'll take a look later this week on my geotargets day.
I suspect this is because those metadata are stored in a "sidecar file" when
filetype = "GeoTIFF"
, but I haven't investigated further.Created on 2024-04-25 with reprex v2.1.0