[gdal-dev] Problems using JP2KAK library with Python Bindings

Jeffrey Johnson ortelius at gmail.com
Tue Jan 20 16:52:26 EST 2009


Hi All,

I am attempting to read JPEG 2000 compressed data inside NITF files
using the python bindings.

My test python script is as follows

import os
os.environ['CPL_DEBUG'] = r'on'
os.environ['GDAL_DRIVER_PATH'] = r'c:\gdal\bin\gdalplugins'
print os.environ['GDAL_DRIVER_PATH']
from osgeo import gdal
gdal.AllRegister()
gdal.Open(r'c:\wis_images\005740758010_08\005740758010_08_P001_PAN\08SEP18064000-P1BS-005740758010_08_P001.NTF')


And the output is as follows.

c:\>python test.py
c:\gdal\bin\gdalplugins
GDAL: Auto register c:\gdal\bin\gdalplugins\gdal_JP2KAK.dll using
GDALRegister_JP2KAK.
GDAL: Auto register c:\gdal\bin\gdalplugins\gdal_JP2KAK.dll using
GDALRegister_JP2KAK.
ERROR 4: `J2K_SUBFILE:3884,478667830,c:\wis_images\005740758010_08\005740758010_08_P001_PAN\08SEP18064000-P1BS-005740758010_08_P001.NTF'
does not exist in the file system,
and is not recognised as a supported dataset name.

ERROR 1: Unable to open JPEG2000 image within NITF file.
Is the JP2KAK driver available?

It appears as if the dll is being loaded properly, but I still receive
this error. I have tried setting the environment variables like this
in the script, as well as with a normal set command on the command
like, and also with windows GUI tools. Anything I am doing wrong?

FWIW, I have no problem reading this same image with something like
gdal_translate.

Thanks,

Jeff


More information about the gdal-dev mailing list