Re: [gdal-dev] replacing a dataset in C++

2025-05-10 Thread Michael Sumner via gdal-dev
Awesome, thanks so much. Cheers, Mike. On Sun, May 11, 2025 at 8:29 AM Even Rouault wrote: > > Le 11/05/2025 à 00:20, Michael Sumner via gdal-dev a écrit : > > Hello, I have a question about safely re-casting a dataset to another, I > want to use Multidim to re-orient an MDArray as a classic 2

Re: [gdal-dev] replacing a dataset in C++

2025-05-10 Thread Even Rouault via gdal-dev
Le 11/05/2025 à 00:20, Michael Sumner via gdal-dev a écrit : Hello, I have a question about safely re-casting a dataset to another, I want to use Multidim to re-orient an MDArray as a classic 2D raster. I was a bit surprised that this works (I just overwrite poSrcDS with the classic form): I

Re: [gdal-dev] replacing a dataset in C++

2025-05-10 Thread Michael Sumner via gdal-dev
Ugh, sorry made a mistake in the code, fixed for osArrayName: auto poSrcDS = std::unique_ptr( GDALDataset::Open(osFilename, GDAL_OF_RASTER | GDAL_OF_VERBOSE_ERROR, aosAllowedDrivers.List(), aosOpenOptions.List(), nullptr)); // now open i

[gdal-dev] replacing a dataset in C++

2025-05-10 Thread Michael Sumner via gdal-dev
Hello, I have a question about safely re-casting a dataset to another, I want to use Multidim to re-orient an MDArray as a classic 2D raster. I was a bit surprised that this works (I just overwrite poSrcDS with the classic form): I'm passing in 'osFilename', 'osArrayName' and two dimension indexes