Skip to content

No driver registered on load_gdal #171

@jerome-colin

Description

@jerome-colin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions