[gdal-dev] "RFC 75: Multidimensional arrays" available for preliminary review

Even Rouault even.rouault at spatialys.com
Wed May 29 09:04:32 PDT 2019


Hi Edzer,

Thanks for the feedback

> - what would be the advantage to GDAL users using this interface, as
> opposed to reading/writing directly using the HDF or NetCDF4 interfaces?

libnetcdf only handle netCDF datasets (and compatible HDF5 files). libhdf4 
only handles HDF4 files. libhdf5 only handles HDF5 files, etc. So the idea is 
to have an abstract data model, like the 2D raster side, so that users do not 
need to deal with the particular API of each underlying library.

> Will it for instance be able to figure out coordinate reference systems,
> and identify which dimensions are spatial dimensions?

When possible (like with netCDF CF conventions), yes

One feedback I got was that the GDALDimension object should have some metadata 
to indicate the nature of the dimension, when it is known, like X, Y, 
Elevation, Time., that's a goal

> - will this interface also give access to e.g. irregular dimensions (for
> rectlinear grids), bounds of dimensions,

What do you mean exactly by irregular dimensions / bounds of dimensions ? Can 
you link to dataset samples ?

> or two-dimensional dimension
> values like longitude values for each grid cell (for curvilinear grids)?

Yes, the link from the dimension to the variable 
(GDALDimenson::indexing_ariable) should also support two-dimensional 
variables.

> 
> - will handling of time values follow the netcdf pattern (e.g. integer
> values, along with a udunits2 time unit), or be like a double
> representing seconds since 1970-01-01, or be something more higher level
> like it is in OGR's OFTDateTime?

I guess that we will reflect the choice of the data producer / format 
constraints. Not sure if we can / must always convert to Unix epoch (with 
double precision). Perhaps we could have an open option where we would 
normalize to Unix epoch when possible, or otherwise preserve the raw values.

> 
> - will it also be possible to read e.g. spatial raster bands on a lower
> than native spatial resolution, like RasterIO() does?

Yes, that's the purpose of the array_stride argument of 
GDALAbstractMDArray::Read(). If set to something different from NULL or [1, 1, 
1...], subsampling will occur. I don't intend to provide other than nearest 
neighbour resampling at that point.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list