Opened 16 years ago

Last modified 13 years ago

#2344 closed defect

Weird error message when writing a JPG2000 compressed NITF. — at Version 3

Reported by: ReinerBeck Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: 1.5.1
Severity: normal Keywords: ecw jp2ecw jpg2000 nitf
Cc: Mateusz Łoskot

Description (last modified by Mateusz Łoskot)

When converting the image (http://veimages.gsfc.nasa.gov//2430/land_ocean_ice_2048.tif) to NITF, the driver reports an error (see below). However, an image is produced despite the message and can be viewed without problems.

gdal_translate -of NITF -co "IC=C8" land_ocean_ice_2048.tif out.ntf
Input file size is 2048, 1024
'''ERROR 1: An error has occurred: Error 86 "File is invalid or corrupt"  file "" line 0'''
0...10...20...30...40...50...60...70...80...90...100 - done.

Change History (3)

comment:1 by Even Rouault, 16 years ago

I can confirm. This error message seems to come from the JP2ECW driver. It's also triggered by the ecw_7 test from the autotest suite.

comment:2 by warmerdam, 16 years ago

Component: defaultGDAL_Raster
Keywords: jp2ecw added

This is a subtle problem relating to the ECW driver and the virtual layer. I think the ECW driver tries to seek somewhere silly and it more or less passes by uneventfully with real files, but results in an error with virtual files.

It was not immediately apparent to me how to resolve this problem without either reducing the error checking in the virtual file code, or altering the ecw sdk which is outside our control.

My preference for the time being is to do nothing.

comment:3 by Mateusz Łoskot, 16 years ago

Cc: Mateusz Łoskot added
Description: modified (diff)
Keywords: ecw jpg2000 nitf added
Note: See TracTickets for help on using tickets.