Gdal Bug? was: Re: [gdal-dev] JP2MRSID Issues
Stephen Woodbridge
woodbri at swoodbridge.com
Fri Nov 14 13:40:09 EST 2008
Frank Warmerdam wrote:
> Stephen Woodbridge wrote:
>> Frank,
>>
>> If someone can generate a patch the prints this stuff out, I'll have
>> our guys build a version with the patch and I'll run it against one of
>> the cases that fails.
>>
>> There wouldn't happen to be a hidden debug option that might already
>> print this out?
>>
>> Thank you Michael for any assistance from your end also.
>
> Steve,
>
> Skimming through mrsiddataset.cpp, it appears there are already quite
> extensive
> debug statements. Try enabling debug output when running the failed
> operation.
>
> For GDAL commandline apps adding "--debug on" to the commandline
> (without the
> quotes) should do the trick. The debug output all goes to stderr.
>
> Best regards,
Frank,
Here is what I get from the debug output. I'm a little surprised it is
trying to extract from zoom 1 instead of zoom 0. I didn't think I was
scaling this but maybe some rounding is causing that.
Thanks,
-Steve
[swoodbridge at booboo ~]$ cd tif-test/
[swoodbridge at booboo tif-test]$ GDAL_SKIP=JPEG2000 gdal_translate -of VRT
/var/data/raw_data/minnesota/ortho_1-1_1m_j_mn161_2008_1.jp2 -b 1 -b 2
-b 3 tmp.vrt
Input file size is 36010, 49447
[swoodbridge at booboo tif-test]$ GDAL_SKIP=JPEG2000 gdalwarp -srcnodata 0
-dstnodata 0 -s_srs +init=epsg:26915 -t_srs EPSG:4326 -te -93.5 43.8125
-93.4375 43.875 -rb -wm 250 --config GDAL_ONE_BIG_READ ON -co
"TILED=YES" tmp.vrt out.tif
Creating output file that is 6029P x 6029L.
Processing input file tmp.vrt.
gdalwarp: ../compressed/compressed.cpp:1724: bool
kd_tile::read_tile_part_header(): Assertion `tpart_body_length >= 0' failed.
Aborted
[swoodbridge at booboo tif-test]$ GDAL_SKIP=JPEG2000 gdalwarp -srcnodata 0
-dstnodata 0 -s_srs +init=epsg:26915 -t_srs EPSG:4326 -te -93.5 43.8125
-93.4375 43.875 -rb -wm 250 --config GDAL_ONE_BIG_READ ON -co
"TILED=YES" --debug on tmp.vrt out.tif
MrSID: Opened zoom level 1 with size 18005x24724.
MrSID: Opened zoom level 2 with size 9003x12362.
MrSID: Opened zoom level 3 with size 4502x6181.
MrSID: Opened zoom level 4 with size 2251x3091.
MrSID: Opened zoom level 5 with size 1126x1546.
MrSID: Opened zoom level 6 with size 563x773.
MrSID: Opened zoom level 7 with size 282x387.
MrSID: Opened zoom level 8 with size 141x194.
MrSID: Opened zoom level 9 with size 71x97.
MrSID: Opened zoom level 10 with size 36x49.
MrSID: Opened zoom level 0 with size 36010x49447.
MrSID: Opened image: width 36010, height 49447, bands 4
GDAL:
GDALOpen(/var/data/raw_data/minnesota/ortho_1-1_1m_j_mn161_2008_1.aux)
succeeds as HFA.
GDAL:
GDALClose(/var/data/raw_data/minnesota/ortho_1-1_1m_j_mn161_2008_1.aux)
GDAL:
GDALOpen(/var/data/raw_data/minnesota/ortho_1-1_1m_j_mn161_2008_1.jp2)
succeeds as JP2MrSID.
GDAL: GDALOpen(tmp.vrt) succeeds as VRT.
OGRCT: Source: +proj=utm +zone=15 +ellps=GRS80 +datum=NAD83 +units=m
+no_defs
OGRCT: Target: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs
OGRCT: Source: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs
OGRCT: Target: +proj=utm +zone=15 +ellps=GRS80 +datum=NAD83 +units=m
+no_defs
GDAL: GDALClose(tmp.vrt)
GDAL: GDALClose()
GDAL: GDALClose()
GDAL: GDALClose()
GDAL: GDALClose()
GDAL: GDALClose()
GDAL: GDALClose()
GDAL: GDALClose()
GDAL: GDALClose()
GDAL: GDALClose()
GDAL: GDALClose()
GDAL:
GDALClose(/var/data/raw_data/minnesota/ortho_1-1_1m_j_mn161_2008_1.jp2)
GDAL: QuietDelete(out.tif) invoking Delete()
ERROR 4: `out.tif' not recognised as a supported file format.
GDAL: GDALDriver::Create(GTiff,out.tif,6029,6029,3,Byte,0x86d1bc0)
MrSID: Opened zoom level 1 with size 18005x24724.
MrSID: Opened zoom level 2 with size 9003x12362.
MrSID: Opened zoom level 3 with size 4502x6181.
MrSID: Opened zoom level 4 with size 2251x3091.
MrSID: Opened zoom level 5 with size 1126x1546.
MrSID: Opened zoom level 6 with size 563x773.
MrSID: Opened zoom level 7 with size 282x387.
MrSID: Opened zoom level 8 with size 141x194.
MrSID: Opened zoom level 9 with size 71x97.
MrSID: Opened zoom level 10 with size 36x49.
MrSID: Opened zoom level 0 with size 36010x49447.
MrSID: Opened image: width 36010, height 49447, bands 4
GDAL:
GDALOpen(/var/data/raw_data/minnesota/ortho_1-1_1m_j_mn161_2008_1.aux)
succeeds as HFA.
GDAL:
GDALClose(/var/data/raw_data/minnesota/ortho_1-1_1m_j_mn161_2008_1.aux)
GDAL:
GDALOpen(/var/data/raw_data/minnesota/ortho_1-1_1m_j_mn161_2008_1.jp2)
succeeds as JP2MrSID.
GDAL: GDALOpen(tmp.vrt) succeeds as VRT.
OGRCT: Source: +proj=utm +zone=15 +ellps=GRS80 +datum=NAD83 +units=m
+no_defs
OGRCT: Target: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs
OGRCT: Source: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs
OGRCT: Target: +proj=utm +zone=15 +ellps=GRS80 +datum=NAD83 +units=m
+no_defs
MrSID: RasterIO() - using optimized dataset level IO.
MrSID: Dataset:IRasterIO(25432,42149 5066x6973 -> 5066x6973 ->
5066x6973, zoom=1)
gdalwarp: ../compressed/compressed.cpp:1724: bool
kd_tile::read_tile_part_header(): Assertion `tpart_body_length >= 0' failed.
Creating output file that is 6029P x 6029L.
Processing input file tmp.vrt.
More information about the gdal-dev
mailing list