<div dir="ltr">

<p class="">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<br></p>

<p class="">I am trying to work with NAIP 2012 jp2 files downloaded
from the <a href="http://tnris.org">tnris.org</a> site.</p>

<p class="">You can see the announcement here. I am working with the
DOQQs that are about 20-30MB in size and number about 17,000.</p>

<p class=""><a href="http://www.tnris.org/node/199">http://www.tnris.org/node/199</a> <br></p>

<p class="">I am running Ubuntu and gdal version 1.9.<span style>  </span>The problem is that when I run gdalinfo on
one of the jp2 files I get this error. <br></p>

<p class="">"ERROR 1: The number of components indicated in the
IHDR box (4) mismatch the value specified in the code stream (1)" <br></p>

<p class="">Gdalinfo listing</p>

<p class="">******************</p><p class="">ubuntu@ip-10-147-199-162:/mnt/tx$ gdalinfo
naip12_nc-cir_1m_3603_64_4_20120809.jp2</p>

<p class="">Driver: JPEG2000/JPEG-2000 part 1 (ISO/IEC 15444-1)</p>

<p class="">Files: naip12_nc-cir_1m_3603_64_4_20120809.jp2</p>

<p class="">Size is 6400, 7680</p>

<p class="">Coordinate System is:</p>

<p class="">PROJCS["NAD83 / UTM zone 13N",</p>

<p class=""><span style>   
</span>GEOGCS["NAD83",</p>

<p class=""><span style>       
</span>DATUM["North_American_Datum_1983",</p>

<p class=""><span style>           
</span>SPHEROID["GRS 1980",6378137,298.2572221010002,</p>

<p class=""><span style>               
</span>AUTHORITY["EPSG","7019"]],</p>

<p class=""><span style>           
</span>AUTHORITY["EPSG","6269"]],</p>

<p class=""><span style>       
</span>PRIMEM["Greenwich",0],</p>

<p class=""><span style>       
</span>UNIT["degree",0.0174532925199433],</p>

<p class=""><span style>       
</span>AUTHORITY["EPSG","4269"]],</p>

<p class=""><span style>   
</span>PROJECTION["Transverse_Mercator"],</p>

<p class=""><span style>   
</span>PARAMETER["latitude_of_origin",0],</p>

<p class=""><span style>   
</span>PARAMETER["central_meridian",-105],</p>

<p class=""><span style>   
</span>PARAMETER["scale_factor",0.9996],</p>

<p class=""><span style>   
</span>PARAMETER["false_easting",500000],</p>

<p class=""><span style>    </span>PARAMETER["false_northing",0],</p>

<p class=""><span style>   
</span>UNIT["metre",1,</p>

<p class=""><span style>       
</span>AUTHORITY["EPSG","9001"]],</p>

<p class=""><span style>   
</span>AUTHORITY["EPSG","26913"]]</p>

<p class="">Origin = (674180.000000000000000,3993050.000000000000000)</p>

<p class="">Pixel Size = (1.000000000000000,-1.000000000000000)</p>

<p class="">Corner Coordinates:</p>

<p class="">Upper Left<span style>  </span>(<span style>  </span>674180.000, 3993050.000) (103d
3'57.23"W, 36d 3'59.22"N) Lower Left<span style> 
</span>(<span style>  </span>674180.000, 3985370.000) (103d
4' 3.32"W, 35d59'50.09"N) Upper Right (<span style>  </span>680580.000, 3993050.000)
(102d59'41.53"W, 36d 3'55.02"N) Lower Right (<span style>  </span>680580.000, 3985370.000) (102d59'47.84"W,
35d59'45.90"N)</p>

<p class="">Center<span style>      </span>(<span style>  </span>677380.000, 3989210.000) (103d
1'52.48"W, 36d 1'52.58"N)</p>

<p class="">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</p>

<p class="">************** <br></p>

<p class="">Checking to see what jpeg 2000 formats my apt-get install
of gdal supports I get.</p>

<p class=""> ubuntu@ip-10-147-199-162:/mnt/tx$ gdalinfo --formats
Supported Formats:</p>

<p class=""><span style>  </span>VRT (rw+v):
Virtual Raster</p>

<p class="">.................</p>

<p class=""><span style>  </span>ERS (rw+v):
ERMapper .ers Labelled</p>

<p class=""><span style>  </span>JPEG2000 (rwv):
JPEG-2000 part 1 (ISO/IEC 15444-1)</p>

<p class=""><span style>  </span>L1B (rov): NOAA
Polar Orbiter Level 1b Data Set</p><p class=""> .................</p>

<p class=""></p>

<p class="">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?</p>

<p class=""> You can download a sample file using this link (19MB).</p>

<p class=""><a href="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">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</a></p>


<p class=""> Any pointers would be much appreciated.</p>

<p class=""></p>

<p class="">Mark <br></p> 

<p class=""> </p>

<p class=""> </p>

</div>