[mapserver-users] gdalinfo error on jp2 file
Mark Korver
mwkorver at gmail.com
Tue Dec 10 11:29:32 PST 2013
Hi, This is more a gdal question than Mapserver, but I figured others have
bumped into this problem already. My goal is to get this data working in
Mapserver
I am trying to work with NAIP 2012 jp2 files downloaded from the tnris.orgsite.
You can see the announcement here. I am working with the DOQQs that are
about 20-30MB in size and number about 17,000.
http://www.tnris.org/node/199
I am running Ubuntu and gdal version 1.9. The problem is that when I run
gdalinfo on one of the jp2 files I get this error.
"ERROR 1: The number of components indicated in the IHDR box (4) mismatch
the value specified in the code stream (1)"
Gdalinfo listing
******************
ubuntu at ip-10-147-199-162:/mnt/tx$ gdalinfo
naip12_nc-cir_1m_3603_64_4_20120809.jp2
Driver: JPEG2000/JPEG-2000 part 1 (ISO/IEC 15444-1)
Files: naip12_nc-cir_1m_3603_64_4_20120809.jp2
Size is 6400, 7680
Coordinate System is:
PROJCS["NAD83 / UTM zone 13N",
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",-105],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",500000],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AUTHORITY["EPSG","26913"]]
Origin = (674180.000000000000000,3993050.000000000000000)
Pixel Size = (1.000000000000000,-1.000000000000000)
Corner Coordinates:
Upper Left ( 674180.000, 3993050.000) (103d 3'57.23"W, 36d 3'59.22"N)
Lower Left ( 674180.000, 3985370.000) (103d 4' 3.32"W, 35d59'50.09"N)
Upper Right ( 680580.000, 3993050.000) (102d59'41.53"W, 36d 3'55.02"N)
Lower Right ( 680580.000, 3985370.000) (102d59'47.84"W, 35d59'45.90"N)
Center ( 677380.000, 3989210.000) (103d 1'52.48"W, 36d 1'52.58"N)
ERROR 1: The number of components indicated in the IHDR box (4) mismatch
the value specified in the code stream (1) Band 1 Block=256x256 Type=Byte,
ColorInterp=Undefined Band 2 Block=256x256 Type=Byte, ColorInterp=Undefined
Band 3 Block=256x256 Type=Byte, ColorInterp=Undefined Band 4 Block=256x256
Type=Byte, ColorInterp=Undefined
**************
Checking to see what jpeg 2000 formats my apt-get install of gdal supports
I get.
ubuntu at ip-10-147-199-162:/mnt/tx$ gdalinfo --formats Supported Formats:
VRT (rw+v): Virtual Raster
.................
ERS (rw+v): ERMapper .ers Labelled
JPEG2000 (rwv): JPEG-2000 part 1 (ISO/IEC 15444-1)
L1B (rov): NOAA Polar Orbiter Level 1b Data Set
.................
Is this a jpeg 2000 driver problem? Meaning is this a case of mismatch
between the jpeg 2000 driver that my gdal is compiled with and the tnris
NAIP jp2 file?
You can download a sample file using this link (19MB).
http://korver-geodata.s3.amazonaws.com/naip/tx/2012/naip12_nc-cir_1m_3603_64_4_20120809.jp2?AWSAccessKeyId=AKIAJVGZCMETHRONYTUQ&Expires=1417454616&Signature=ZKHM2%2fpmLGn%2b%2b4vXXJKZig5tptM%3d
Any pointers would be much appreciated.
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20131210/cd4a4862/attachment.htm>
More information about the MapServer-users
mailing list