njtierney / geotargets

Targets extensions for geospatial data
https://njtierney.github.io/geotargets/
Other
49 stars 4 forks source link

Implement tar_stars_* family of targets #14

Closed njtierney closed 1 month ago

njtierney commented 4 months ago

Related to #4

We need to list the datatypes from {stars} that we want to support

brownag commented 3 months ago

In #33 I started by implementing a function tar_stars() based on stars::write_stars() to support targets based on stars objects. I also added an extension to the tar_format() read function to support stars_proxy objects after @Aariq's suggestion

It is possible to store both raster and vector data in stars objects. For multidimensional arrays, which can be derived from vector data, a driver needs to be chosen that will support multidimensional array output (e.g. netCDF, Zarr).

stars::write_mdim() can be used to write using the GDAL Multidimensional Raster Data Model. https://gdal.org/user/multidim_raster_data_model.html.

I implemented a sketch of this in https://github.com/njtierney/geotargets/pull/33/commits/f74fe91d48f6c6fdab5ffb13e6895bfb555c9a6c which implements the mdim argument to toggle the multidimensional API in tar_stars() and tar_stars_proxy()

We could add options specifically for "mdim"-related processing such as "gdal.mdim.driver", since the user may wish to be able to handle their multidimensional datasets differently than other 2D raster data or vector data.

Aariq commented 1 month ago

Would this be closed by #33 or are there other tar_stars*() functions we're imagining?

Aariq commented 1 month ago

I'm going to close this. Feel free to open a follow-up issue if there are other tar_stars_* functions that are needed.