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 <http://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.
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to