Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GDAL not registering ECW driver #1

Open
harrylloyd-cefas opened this issue Dec 20, 2022 · 1 comment
Open

GDAL not registering ECW driver #1

harrylloyd-cefas opened this issue Dec 20, 2022 · 1 comment

Comments

@harrylloyd-cefas
Copy link

Thanks for developing this, I've got some data coming in as .ecw and would be really helpful to read it direct with GDAL via rasterio.

I've pip installed this package into a conda environment but the ECW driver isn't registering. I've manually set GDAL_DRIVER_PATH as an environment variable pointing to the location of gdal_ECW_JP2ECW.dll. Are there some installation steps/config settings that I've missed? Thanks in advance.

Windows 10
GDAL = 3.4.3

import os
os.environ["GDAL_DRIVER_PATH"] = r"C:\Users\HL04\AppData\Local\mambaforge\envs\mapping_ecw\Lib\site-packages\osgeo\gdalplugins"
from osgeo import gdal
import rasterio as rs`

driver_list = []
for i in range(gdal.GetDriverCount()):
    driver = gdal.GetDriver(i)
    driver_list.append(driver.GetDescription())
driver_list.sort()
driver_list  # ECW not in the list of drivers

rs.open("..\\data\\raw\\{raster}.ecw")  # gives a RasterioIOError with .ecw as an unrecognised file type
@taoqilong
Copy link

I have encountered the same problem. Do you have a solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants