List, <div><br></div><div>I am attempting to open a multi-band image using the PDS driver. I have a working, GDAL readable label that I can run gdalinfo and gdal_translate on without error. I am attempting to access a number of bands and operate on them using NumPy.</div>
<div><br></div><div>band.ReadAsArray() is failing silently in process, returning None. I am able to get band.XSize, band.YSize, band.GetNoDataValue() and the total band count without error.</div><div><br></div><div><br></div>
<div>ReadAsArray via IPython returns the following:</div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
ERROR 3: Failed to read scanline 4.<br>ERROR 1: frt0000859f_07_if166l_trr3_fixed.lbl, band 1: IReadBlock failed at X offset 0, Y offset 4<br>ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 4</blockquote></div>
<div><br></div><div><br></div><div><br></div><div>I next tried:</div><div>array = band.ReadRaster(0,0,band.XSize, band.YSize, 1, GDT_Float64)</div><div><br></div><div>Here are the pertinent portions of the stack trace.</div>
<div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> File "csas.py", line 50, in load<br>
array = band.ReadRaster(0,0,band.XSize, band.YSize, 1, GDT_Float64)<br> File "/Library/Frameworks/GDAL.framework/Versions/1.9/Python/2.7/site-packages/osgeo/gdal.py", line 1069, in ReadRaster<br> buf_pixel_space, buf_line_space)<br>
RuntimeError: frt0000859f_07_if166l_trr3_fixed.lbl, band 236: IReadBlock failed at X offset 0, Y offset 34</blockquote></div><div><br></div><div><br></div><div>Note that a conversion to GTiff prior to operating on the image returns the array as anticipated.</div>
<div><div><br></div></div><div>Is this an issue with the PDS driver, a label reading issue, or a dataset / driver interaction?</div><div>Thanks, </div><div>Jay</div>