Opened 8 years ago

Closed 8 years ago

#5263 closed defect (invalid)

Failure to open JP2 file.

Reported by: EddyTheB Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: 1.9.0
Severity: normal Keywords: JP2
Cc:

Description

Hi, I initially posed this as a question on stack exchange: http://gis.stackexchange.com/questions/73849/jp2-fails-to-open-in-qgis-and-gdal, but have been convinced that the problem is a bug in either qgis or gdal. I'm not confident enough to go delving in to my gdal builds myself so I thought I'd flag the issue up with you guys.

The issue is that a JP2 file fails to open in QGIS and GDAL, the behaviour is different on each of my two laptops. The file is a HiRISE image of Gale Crater on Mars, and is available here: http://hirise-pds.lpl.arizona.edu/download/PDS/RDR/ESP/ORB_032400_032499/ESP_032436_1755/ESP_032436_1755_COLOR.JP2

On my ageing MacBook? running QGIS 1.8.0 and GDAL 1.9.2 on Mac OS 10.7.5 the file does open in QGIS, but gdal can't deal with it...

$ gdalinfo ESP_032436_1755_COLOR.JP2 ERROR 4: `ESP_032436_1755_COLOR.JP2' not recognized as a supported file format.

On my new laptop which runs GDAL 1.9.0 and QGIS 2.1.0-Master on Ubuntu 13.04 the file will not open. If I try to open the file in QGIS it freezes for 2-3 minutes, then QGIS crashes and closes with no error messages. gdalinfo works a little...

$ gdalinfo ESP_032436_1755_COLOR.JP2 Driver: JPEG2000/JPEG-2000 part 1 (ISO/IEC 15444-1) Files: ESP_032436_1755_COLOR.JP2

ESP_032436_1755_COLOR.JP2.aux.xml

Size is 9679, 44908 Coordinate System is: PROJCS["Equirectangular MARS",

GEOGCS["GCS_MARS",

DATUM["unknown",

SPHEROID["unnamed",3396190,0]],

PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433]],

PROJECTIONEquirectangular?, PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",180], PARAMETER["standard_parallel_1",0], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["metre",1,

AUTHORITY["EPSG","9001"]]]

Origin = (-2523306.125000000000000,-268608.875000000000000) Pixel Size = (0.250000000000000,-0.250000000000000) Corner Coordinates: Upper Left (-2523306.125, -268608.875) (137d25'49.08"E, 4d31'53.74"S) Lower Left (-2523306.125, -279835.875) (137d25'49.08"E, 4d43'15.60"S) Upper Right (-2520886.375, -268608.875) (137d28'16.04"E, 4d31'53.74"S) Lower Right (-2520886.375, -279835.875) (137d28'16.04"E, 4d43'15.60"S) Center (-2522096.250, -274222.375) (137d27' 2.56"E, 4d37'34.67"S) Killed

The system freezes for 2-3 minutes between the "Center" line and the "Killed" line. I've also tried using gdal_translate to convert the JP2 to a tif image; it also freezes for 2-3 minutes, then says 'Killed'. A tif file is generated, but all the values within it are zero.

Change History (1)

comment:1 Changed 8 years ago by Even Rouault

Resolution: invalid
Status: newclosed

The answers in the stack exchange seem rather good.

Regarding the first problem, file opening in QGIS but not in GDAL, it is a clear sign that your QGIS version is not using the same GDAL version as the GDAL version of the gdalinfo utility.

Regarding the second problem, it is linked to the JPEG2000 driver that can only be used on small images ( let's say < 2048 x 2048 ) due to limitations of the Jasper library. Nothing we can do about that. There are other JPEG2000 drivers available, but apart from the JP2OpenJPEG one (that works much better than JPEG2000-Jasper, but is still slow for display purposes), the other ones depend on proprietary libraries.

I don't see any action on GDAL side regarding your issues. Looks like more as packaging issues (or appropriate plugins not installed), or problems that have no real solutions (JPEG2000 driver being not production ready)... Closing at invalid then.

Note: See TracTickets for help on using tickets.