[gdal-dev] JPEG2000 issues

Stephen Woodbridge woodbri at swoodbridge.com
Fri Nov 7 12:32:21 EST 2008


Stephen Woodbridge wrote:
> Hi Frank, et al,
> 
> I'm working with GDAL 1.5.3, released 2008/09/09 built with libjasper so 
> I can process some DOQQ composites and chop them into smaller tiles.
> 
> Below is a typical image but I get a bunch of errors in gdalinfo. The 
> system has like 6 GB of memory and only about 1.5GB of swap. The 
> compressed image is huge at 538MB. I tried 3-4 images in the directory 
> and got the same report on all of them.
> 
> Any thoughts on this?
> Is this a real problem, ie. I will not be able to access these images.
> Other options solutions?
> 
> We also have JP2MrSID support, is there a way to force it to use this 
> driver instead of the JPEG2000 driver and see if that works any better?
> 
> Thanks,
>   -Steve
> 
> $ ls -lh /var/data/raw_data/indiana/ortho_1-1_1m_j_in175_2008_1.jp2
> -rw-rw-r--  1 dallen users 563M Oct 20 16:17 
> /var/data/raw_data/indiana/ortho_1-1_1m_j_in175_2008_1.jp2
> 
> $ gdalinfo /var/data/raw_data/indiana/ortho_1-1_1m_j_in175_2008_1.jp2
> Driver: JPEG2000/JPEG-2000 part 1 (ISO/IEC 15444-1)
> Files: /var/data/raw_data/indiana/ortho_1-1_1m_j_in175_2008_1.jp2
> Size is 44462, 49524
> Coordinate System is:
> PROJCS["NAD83 / UTM zone 16N",
>     GEOGCS["NAD83",
>         DATUM["North_American_Datum_1983",
>             SPHEROID["GRS 1980",6378137,298.2572221010042,
>                 AUTHORITY["EPSG","7019"]],
>             AUTHORITY["EPSG","6269"]],
>         PRIMEM["Greenwich",0],
>         UNIT["degree",0.0174532925199433],
>         AUTHORITY["EPSG","4269"]],
>     PROJECTION["Transverse_Mercator"],
>     PARAMETER["latitude_of_origin",0],
>     PARAMETER["central_meridian",-87],
>     PARAMETER["scale_factor",0.9996],
>     PARAMETER["false_easting",500000],
>     PARAMETER["false_northing",0],
>     UNIT["metre",1,
>         AUTHORITY["EPSG","9001"]],
>     AUTHORITY["EPSG","26916"]]
> Origin = (559388.000000000000000,4296871.000000000000000)
> Pixel Size = (1.000000000000000,-1.000000000000000)
> Corner Coordinates:
> Upper Left  (  559388.000, 4296871.000) ( 86d18'57.27"W, 38d49'7.03"N)
> Lower Left  (  559388.000, 4247347.000) ( 86d19'12.47"W, 38d22'20.43"N)
> Upper Right (  603850.000, 4296871.000) ( 85d48'13.79"W, 38d48'52.19"N)
> Lower Right (  603850.000, 4247347.000) ( 85d48'40.36"W, 38d22'5.82"N)
> Center      (  581619.000, 4272109.000) ( 86d 3'45.98"W, 38d35'37.38"N)
> error: cannot decode code stream
> Band 1 Block=256x256 Type=Byte, ColorInterp=Undefined
> error: expecting signature box
>   Metadata:
>     LAYER_TYPE=athematic
> error: cannot get box
> <GDALRasterAttributeTable/>
> 
> error: cannot get box
> Band 2 Block=256x256 Type=Byte, ColorInterp=Undefined
> error: cannot get box
>   Metadata:
>     LAYER_TYPE=athematic
> error: cannot get box
> error: cannot get box
> Band 3 Block=256x256 Type=Byte, ColorInterp=Undefined
> error: cannot get box
>   Metadata:
>     LAYER_TYPE=athematic
> error: cannot get box
> error: cannot get box
> Band 4 Block=256x256 Type=Byte, ColorInterp=Undefined
>   Metadata:
>     LAYER_TYPE=athematic
> error: cannot get box
> 
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

I must be a Zen thing that I always find answers after a give up looking 
and post to the list. So, to reply to myself, I was about to use the 
JP2MrSID driver like the following and without any error. So, I'll try 
to move forward using this more of access. I'm still interested in any 
other thoughts you have on the above issues.

Thanks,
   -Steve

$ GDAL_SKIP=JPEG2000  gdalinfo 
/var/data/raw_data/indiana/ortho_1-1_1m_j_in175_2008_1.jp2
Driver: JP2MrSID/MrSID JPEG2000
Files: /var/data/raw_data/indiana/ortho_1-1_1m_j_in175_2008_1.jp2
Size is 44462, 49524
Coordinate System is:
PROJCS["NAD83 / UTM zone 16N",
     GEOGCS["NAD83",
         DATUM["North_American_Datum_1983",
             SPHEROID["GRS 1980",6378137,298.2572221010002,
                 AUTHORITY["EPSG","7019"]],
             AUTHORITY["EPSG","6269"]],
         PRIMEM["Greenwich",0],
         UNIT["degree",0.0174532925199433],
         AUTHORITY["EPSG","4269"]],
     PROJECTION["Transverse_Mercator"],
     PARAMETER["latitude_of_origin",0],
     PARAMETER["central_meridian",-87],
     PARAMETER["scale_factor",0.9996],
     PARAMETER["false_easting",500000],
     PARAMETER["false_northing",0],
     UNIT["metre",1,
         AUTHORITY["EPSG","9001"]],
     AUTHORITY["EPSG","26916"]]
Origin = (559388.000000000000000,4296871.000000000000000)
Pixel Size = (1.000000000000000,-1.000000000000000)
Metadata:
   IMAGE__ENCODING_APPLICATION=GeoExpress 7.0.0.2052
   IMAGE__INPUT_FILE_SIZE=9095986793.000000
   IMAGE__INPUT_FORMAT=TIFF w/ World File
 
IMAGE__INPUT_NAME=O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\BECKS 
MILL NE.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\BECKS 
MILL NW.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\BECKS 
MILL SE.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\BECKS 
MILL SW.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\BORDEN 
NW.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\BORDEN 
SW.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\CAMPBELLSBURG 
NE.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\CAMPBELLSBURG 
SE.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\FREDERICKSBURG 
NE.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\FREDERICKSBURG 
NW.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\FREDERICKSBURG 
SE.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\FREDERICKSBURG 
SW.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\HARDINSBURG 
NE.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\HARDINSBURG 
SE.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\HENRYVILLE 
NW.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\HENRYVILLE 
SW.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\KOSSUTH 
NE.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\KOSSUTH 
NW.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\KOSSUTH 
SE.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\KOSSUTH 
SW.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\LITTLE 
YORK NE.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\LITTLE 
YORK NW.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\LITTLE 
YORK SE.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\LITTLE 
YORK SW.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\LIVONIA 
NE.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\LIVONIA 
SE.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\MEDORA 
SE.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\MEDORA 
SW.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\PALMYRA 
NE.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\PALMYRA 
NW.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\PALMYRA 
SE.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\PALMYRA 
SW.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\SALEM 
NE.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\SALEM 
NW.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\SALEM 
SE.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\SALEM 
SW.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\SMEDLEY 
NE.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\SMEDLEY 
NW.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\SMEDLEY 
SE.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\SMEDLEY 
SW.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\SOUTH 
BOSTON NE.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\SOUTH 
BOSTON NW.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\SOUTH 
BOSTON SE.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\SOUTH 
BOSTON SW.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\TAMPICO 
SE.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\TAMPICO 
SW.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\TUNNELTON 
SE.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\VALLONIA 
SE.tif, 
O:\DMC_Output\13a\projects\5835-031_IN08\South_sheets_4edit\new_QQs\2-7_10-13_16-18\gtif\finals\Washington_IN_18175_49\VALLONIA 
SW.tif
   IMAGE__X_ROTATION=0.000000
   IMAGE__Y_ROTATION=0.000000
   GEOTIFF_NUM__1024__GTModelTypeGeoKey=1
   GEOTIFF_CHAR__GTModelTypeGeoKey=ModelTypeProjected
   GEOTIFF_NUM__1025__GTRasterTypeGeoKey=1
   GEOTIFF_CHAR__GTRasterTypeGeoKey=RasterPixelIsArea
   GEOTIFF_NUM__2050__GeogGeodeticDatumGeoKey=6269
   GEOTIFF_CHAR__GeogGeodeticDatumGeoKey=Datum_North_American_Datum_1983
   GEOTIFF_NUM__2056__GeogEllipsoidGeoKey=7019
   GEOTIFF_CHAR__GeogEllipsoidGeoKey=Ellipse_GRS_1980
   GEOTIFF_NUM__3072__ProjectedCSTypeGeoKey=26916
   GEOTIFF_CHAR__ProjectedCSTypeGeoKey=PCS_NAD83_UTM_zone_16N
   GEOTIFF_NUM__3073__PCSCitationGeoKey=Universal Transverse Mercator; 
North American 1983; GRS80
   GEOTIFF_NUM__3076__ProjLinearUnitsGeoKey=9001
   GEOTIFF_CHAR__ProjLinearUnitsGeoKey=Linear_Meter
   GEOTIFF_NUM__3080__ProjNatOriginLongGeoKey=-87.000000
   GEOTIFF_NUM__3081__ProjNatOriginLatGeoKey=0.000000
   GEOTIFF_NUM__3082__ProjFalseEastingGeoKey=500000.000000
   GEOTIFF_NUM__3083__ProjFalseNorthingGeoKey=0.000000
   GEOTIFF_NUM__3092__ProjScaleAtNatOriginGeoKey=0.999600
   IMAGE__BITS_PER_SAMPLE=8
   IMAGE__WIDTH=44462
   IMAGE__HEIGHT=49524
   IMAGE__COLOR_SCHEME=10
   IMAGE__DATA_TYPE=0
   IMAGE__DYNAMIC_RANGE_WINDOW=256.000000
   IMAGE__DYNAMIC_RANGE_LEVEL=127.500000
   IMAGE__NO_DATA_VALUE=0,0,0,0
   IMAGE__TRANSPARENT_DATA_VALUE=0,0,0,0
   IMAGE__XY_ORIGIN=559388.500000,4296870.500000
   IMAGE__X_RESOLUTION=1.000000
   IMAGE__Y_RESOLUTION=1.000000
   IMAGE__WKT=PROJCS["NAD83 / UTM zone 
16N",GEOGCS["NAD83",DATUM["North_American_Datum_1983",SPHEROID["GRS 
1980",6378137,298.2572221010002,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4269"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26916"]]
Corner Coordinates:
Upper Left  (  559388.000, 4296871.000) ( 86d18'57.27"W, 38d49'7.03"N)
Lower Left  (  559388.000, 4247347.000) ( 86d19'12.47"W, 38d22'20.43"N)
Upper Right (  603850.000, 4296871.000) ( 85d48'13.79"W, 38d48'52.19"N)
Lower Right (  603850.000, 4247347.000) ( 85d48'40.36"W, 38d22'5.82"N)
Center      (  581619.000, 4272109.000) ( 86d 3'45.98"W, 38d35'37.38"N)
Band 1 Block=1024x128 Type=Byte, ColorInterp=Undefined
   Minimum=0.000, Maximum=194.000, Mean=83.074, StdDev=36.912
   Overviews: 22231x24762, 11116x12381, 5558x6191, 2779x3096, 1390x1548, 
695x774, 348x387, 174x194, 87x97, 44x49, 22x25, 11x13, 6x7, 3x4
   Metadata:
     LAYER_TYPE=athematic
<GDALRasterAttributeTable/>

Band 2 Block=1024x128 Type=Byte, ColorInterp=Undefined
   Minimum=0.000, Maximum=187.000, Mean=99.809, StdDev=40.469
   Overviews: 22231x24762, 11116x12381, 5558x6191, 2779x3096, 1390x1548, 
695x774, 348x387, 174x194, 87x97, 44x49, 22x25, 11x13, 6x7, 3x4
   Metadata:
     LAYER_TYPE=athematic
Band 3 Block=1024x128 Type=Byte, ColorInterp=Undefined
   Minimum=0.000, Maximum=166.000, Mean=102.323, StdDev=40.042
   Overviews: 22231x24762, 11116x12381, 5558x6191, 2779x3096, 1390x1548, 
695x774, 348x387, 174x194, 87x97, 44x49, 22x25, 11x13, 6x7, 3x4
   Metadata:
     LAYER_TYPE=athematic
Band 4 Block=1024x128 Type=Byte, ColorInterp=Undefined
   Minimum=0.000, Maximum=225.000, Mean=165.243, StdDev=63.705
   Overviews: 22231x24762, 11116x12381, 5558x6191, 2779x3096, 1390x1548, 
695x774, 348x387, 174x194, 87x97, 44x49, 22x25, 11x13, 6x7, 3x4
   Metadata:
     LAYER_TYPE=athematic



More information about the gdal-dev mailing list