Re: [gdal-dev] Create a GDAL VRT for a 3D image that transposes the image dimensions

2023-06-02 Thread Even Rouault
You may use the multidimensional API for that : https://gdal.org/drivers/raster/vrt_multidimensional.html . Typically the element is relevant. Note however that on-the-fly transposing can have bad performance, but for the relatively small image you mention, that might be OK. That said, you'd m

[gdal-dev] Create a GDAL VRT for a 3D image that transposes the image dimensions

2023-06-02 Thread Daniel Scheffler
Hi! I have an image with 500 rows, 1000 columns, and 2 bands in a NetCDF file which stores the data in the following scheme: - dimension 1: rows - dimension 2: bands - dimension 3: columns If I now do gdal.Open('filepath').GetRasterBand(1).ReadAsArray(), I get a numpy array in the shape 500x2