[gdal-dev] multidim arraySpecs/GetView
Michael Sumner
mdsumner at gmail.com
Thu Aug 31 16:27:57 PDT 2023
Excellent, thanks so much, confirmed it's working.
Cheers, Mike
On Fri, Sep 1, 2023 at 6:14 AM Even Rouault <even.rouault at spatialys.com>
wrote:
> Michael,
>
> Hi, hoping to check my syntax ... or expectations ... I'm expecting this
> to subset by step the 20x20 array in this netcdf, but getting no change in
> python MultiDimTranslate or at command line:
>
> ds = gdal.OpenEx('gdrivers/data/netcdf/byte_no_cf.nc',
> gdal.OF_MULTIDIM_RASTER)
>
> nds = gdal.MultiDimTranslate("/vsimem/array_view.zarr", ds, format="Zarr",
> arraySpecs=['name=Band1,view=[::2,::4]'])
> nds.GetRootGroup().OpenMDArray("Band1").GetShape()
> # (20, 20)
>
> This was a bug. Fixed per https://github.com/OSGeo/gdal/pull/8297
>
> A way of working it around is to use scaleAxesSpecs=['x(4)', 'y(2)']
> instead
>
> Even
>
> -- http://www.spatialys.com
> My software is free, but my time generally not.
>
>
--
Michael Sumner
Software and Database Engineer
Australian Antarctic Division
Hobart, Australia
e-mail: mdsumner at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230901/6a5b7a03/attachment-0001.htm>
More information about the gdal-dev
mailing list