[GIS] gdal missing jp2 driver files how to install them

gdaljpeg 2000rasterio

Am operating on OSX(latest) have gdal installed and rasterio (both from conda versions 2.1.3 and 1.0xxx. I can read tiff perfectly but jp2 files (aka from Sentinel-2 sat).

When I search for installed gdal drivers the ones for jp2 are on the list. I have attempted to remove gdal via conda and reinstall with no luck. Am not looking to use brew as it has a pre 2.0 version and i need 2.1 functionality.

How can i install this driver?

Best Answer

The GDAL installed by conda is broken and does not include the OpenJPEG JPEG2000 driver. You need to install the GDAL packaged by conda-forge Either uninstall GDAL and then reinstall using the conda-forge channel or create a fresh environment. If you choose to uninstall/reinstall, you will almost certainly get lots of dependency conflicts and have to mess around resolving them. It's much easier to create a fresh conda environment:

conda create -n mynewenv -c conda-forge gdal rasterio