[gdal-dev] GDALRasterBand to NSImage

Patrick Cannon patrick.cannon at barcosoft.com
Wed Apr 23 13:22:45 PDT 2014


Hello Everyone,

I have been trying to get a few raster files loaded via GDAL but it seems that all I get back from GDALRasterIO is a bunch of 1’s which then get set as 255 or white.

The call I am using is:
    GDALRasterIO(ds->GetRasterBand(1), GF_Read,
                 0, 0, pixWide, pixHigh,
                 fileData, pixWide, pixHigh, GDT_Byte, 0, 0);

The meta data for the chart looks valid:
BSB_KNP=SC=458596,GD=NAD83,PR=MERCATOR,PP=28.867,PI=30.000,SP=,SK=0.0021196,TA=90.0021196,UN=FATHOMS,SD=MEAN LOWER LOW WATER,DX=45.86,DY=45.86

So I would expect the data to be getting filled correctly.

OS X 10.9 with Xcode 5.1.1.

If anyone has a suggestion or could point me to a working Objective-C example that would be great.

Thanks,
Patrick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20140423/29cffe61/attachment.html>


More information about the gdal-dev mailing list