<div dir="ltr"><div>I am using gdal_translate and a .vrt to take 115 .jp2 files from the USGS, pull them together and then export a lower resolution .jp2.  <br><br></div><div>This is with GDAL 1.10 on OSX.<br>gdalinfo --version<br>
GDAL 1.10.1, released 2013/08/26<br><br></div><div>When I run gdal_translate, it gets about 30% of the way through the process and errors out saying that it can't open one of the .j2w files.  When I run gdalinfo on the file, I can open it, and if I run gdal_translate on just that file, I can successfully export a reduced resolution copy.<br>
<br></div><div>The output of gdalinfo is here:  <a href="https://gist.github.com/fawcett/beead31741e24394b38e">https://gist.github.com/fawcett/beead31741e24394b38e</a><br></div><div><br></div><div>I can also load the .vrt image into QGIS 2.2 and it loads (slowly of course).<br>
<br>gdal_translate img_index.vrt mpls34.jp2 -outsize 10% 10% -of JP2OpenJPEG -co QUALITY=25 -epo<br>Input file size is 45000, 65000<br>0...10...20.ERROR 4: CSLLoad2("/Users/david/projects/mpls_watersheds/data/15TVK830815_201203_0x3000m_CL_1/15TVK830815_201203_0x3000m_CL_1.j2w") failed: unable to open file.<br>
ERROR 4: `/Users/david/projects/mpls_watersheds/data/15TVK830830_201203_0x3000m_CL_1/15TVK830830_201203_0x3000m_CL_1.jp2' not recognised as a supported file format.<br><br>gdalinfo 15TVK830815_201203_0x3000m_CL_1.jp2<br>
Driver: JP2OpenJPEG/JPEG-2000 driver based on OpenJPEG library<br>Files: 15TVK830815_201203_0x3000m_CL_1.jp2<br>       15TVK830815_201203_0x3000m_CL_1.j2w<br>Size is 5000, 5000<br>Coordinate System is:<br>PROJCS["NAD83 / UTM zone 15N",<br>
    GEOGCS["NAD83",<br>        DATUM["North_American_Datum_1983",<br>            SPHEROID["GRS 1980",6378137,298.2572221010002,<br>                AUTHORITY["EPSG","7019"]],<br>
            AUTHORITY["EPSG","6269"]],<br>        PRIMEM["Greenwich",0],<br>        UNIT["degree",0.0174532925199433],<br>        AUTHORITY["EPSG","4269"]],<br>    PROJECTION["Transverse_Mercator"],<br>
    PARAMETER["latitude_of_origin",0],<br>    PARAMETER["central_meridian",-93],<br>    PARAMETER["scale_factor",0.9996],<br>    PARAMETER["false_easting",500000],<br>    PARAMETER["false_northing",0],<br>
    UNIT["metre",1,<br>        AUTHORITY["EPSG","9001"]],<br>    AUTHORITY["EPSG","26915"]]<br>Origin = (483000.000000000000000,4983000.000000000000000)<br>Pixel Size = (0.300000000000012,-0.300000000000186)<br>
Image Structure Metadata:<br>  INTERLEAVE=PIXEL<br>Corner Coordinates:<br>Upper Left  (  483000.000, 4983000.000) ( 93d12'56.50"W, 45d 0' 0.87"N)<br>Lower Left  (  483000.000, 4981500.000) ( 93d12'56.32"W, 44d59'12.26"N)<br>
Upper Right (  484500.000, 4983000.000) ( 93d11'47.99"W, 45d 0' 1.00"N)<br>Lower Right (  484500.000, 4981500.000) ( 93d11'47.82"W, 44d59'12.39"N)<br>Center      (  483750.000, 4982250.000) ( 93d12'22.16"W, 44d59'36.63"N)<br>
Band 1 Block=1024x1024 Type=Byte, ColorInterp=Red<br>  Overviews: 2500x2500, 1250x1250, 625x625, 312x312, 156x156<br>  Overviews: arbitrary<br>Band 2 Block=1024x1024 Type=Byte, ColorInterp=Green<br>  Overviews: 2500x2500, 1250x1250, 625x625, 312x312, 156x156<br>
  Overviews: arbitrary<br>Band 3 Block=1024x1024 Type=Byte, ColorInterp=Blue<br>  Overviews: 2500x2500, 1250x1250, 625x625, 312x312, 156x156<br>  Overviews: arbitrary<br><br></div><div>The .vrt file contents are here:  <a href="https://gist.github.com/fawcett/c8cd5d271b0a89e67779">https://gist.github.com/fawcett/c8cd5d271b0a89e67779</a><br>
<br></div><div>Does anyone have a suggestion on how to troubleshoot this?  I am wondering if I am just running out of memory.  <br><br>Thanks, <br><br>David.<br></div><div><br> <br></div></div>