[gdal-dev] Dimension with unlimited length

Even Rouault even.rouault at spatialys.com
Tue Jul 5 12:13:46 PDT 2022


Luisa,

the answer is a mixed yes/no

The implementation of the CreateDimension() method in the netCDF 
supports a UNLIMITED creation option. Cf 
https://github.com/OSGeo/gdal/blob/664fae6ed14d77501c4f0a796f0fb371bae3bf3e/autotest/gdrivers/netcdf_multidim.py#L586 
to instruct it to be created as such at the netCDF level. But GDAL still 
needs a fixed size for such dimensions. I guess that could potentially 
be enhanced to be able to expand the dimension size, but that remains to 
be coded (there would be implications in GDAL generic multidim code that 
does for example checks on indices in GDALMultiDim::Write() operations)

Even

Le 05/07/2022 à 20:06, andAllWasWell at web.de a écrit :
> Hi,
>
> i am interested in using GDAL for writing a multi-dimensional array in 
> a NetCDF file.
> Is it possible in GDAL to create a dimension (time in my case) without 
> knowing/ restricting the size of it at the beginning?
> I would like to create a MDArray with first only one timestep and then 
> expand this by adding an unknown amount of timesteps to it afterwards.
> The other two dimensions are fixed in my case.
> In NetCDF I think it's possible through a dimension with unlimited 
> length (NC_UNLIMITED) - is there also a way in GDAL?
>
> I am using C++ if that's important to know.
>
> Thank you,
> Luisa
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
http://www.spatialys.com
My software is free, but my time generally not.



More information about the gdal-dev mailing list