[gdal-dev] gdaldataset not created

Even Rouault even.rouault at spatialys.com
Sat Jan 11 02:45:33 PST 2020


> I would like to dig deeper to solve my problem. I
> didn't find any useful information for "error: Could not create
> GDALDataset", I hope you can help me, if you need more information about
> the images let me know.

$ hg clone https://bitbucket.org/petebunting/rsgislib rsgislib-code

$ grep -r "Could not create GDALDataset"  rsgislib-code
rsgislib-code/src/img/RSGISImageUtils.cpp:            std::string message = std::string("Could not create GDALDataset.");
rsgislib-code/src/img/RSGISImageUtils.cpp:            std::string message = std::string("Could not create GDALDataset.");
rsgislib-code/src/img/RSGISImageUtils.cpp:                std::string message = std::string("Could not create GDALDataset.");
rsgislib-code/src/img/RSGISImageUtils.cpp:                std::string message = std::string("Could not create GDALDataset.");
rsgislib-code/src/img/RSGISImageUtils.cpp:                std::string message = std::string("Could not create GDALDataset.");

On quick look in the source, the error comes after GDALDriver::Create() returns an error.
So one of the input argument provided is certainly wrong (dimension, number of bands, data type...).
You'll have to add debug traces. Or perhaps look before also if GDAL has not emitted an error
message on stderr as from what I can see rgislib doesn't seem to install a custom error handler
that would capture them.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list