xtensor-io icon indicating copy to clipboard operation
xtensor-io copied to clipboard

No driver registered on load_gdal

Open jerome-colin opened this issue 4 years ago • 0 comments

Hi, I'm new to xtensor and xtensor-io, and felt into the following error while trying to load a geotiff image with load_gdal:

ERROR 4: No driver registered. terminate called after throwing an instance of 'std::runtime_error' what(): load_gdal(): error opening GDAL dataset '/data/SENTINEL2A_20210614-105859-131_L2A_T31TCJ_C_V2-2_FRE_B3.tif'.

I couldn't see where drivers are registered in load_gdal, but found that adding a GDALAllRegister(); at line 384 of xgdal.hpp fixed this. That said, I probably did something wrong and I'd be glad to have your feedback on how I should do without tweaking your code.

Thanks ! Jerome

jerome-colin avatar Dec 07 '21 09:12 jerome-colin