Petr,

The GDAL API dos not contain visualization functions. So how to do it will 
dependents on the programming environment that you are working on, assuming 
that you are developing some kind of application. The pData pointer points to a 
memory array of pixels in the data type and the amount of data you requested in 
you call. You could just pass it to your GUI component or you could do some 
pixel accessing of your own if you want. 

Take a look at this example in Java 
[http://trac.osgeo.org/gdal/browser/trunk/gdal/swig/java/apps/GDALtest.java]

If all you want to do is to display a small region of a raster, you could 
simple use gdal_translate -of {JPEG,BMP,PNG} -srcwin and open the little 
picture file on the desktop visualization tool that comes with the O.S.

C:/> gdal_translate -of bmp bigfile.tif out.bmp -srcwin 0 0 1024 1024
C:/> out.bmp

Regards,

Ivan

>  -------Original Message-------
>  From: Petr Kitashov <[email protected]>
>  To: [email protected]
>  Subject: [gdal-dev] Raster visualization
>  Sent: May 10 '12 08:48
>  
>  Hi,
>  
>  I need just to display some region(any) from raster file. Seems like I
>  understand everything until rasterIO.
>  RasterIO fills(in my case) void* pData with raster info - that's
>  great, but how to display it?
>  
>  Which data is stored there when I use GDALDataset::rasterIO, and which in
>  case of GDALRasterBand::RasterIO?
>  
>  I.e. how to determine pixel values from pData?
>  
>  I'm sorry if this question is stupid, but i spent a lot of time in
>  google and didn't find any solution. 
>  
>  
>  -- 
>  Best Regards, 
>  Petr Kitashov
>  --------------------
>  _______________________________________________
>  gdal-dev mailing list
>  [LINK: [email protected]] [email protected]
>  [LINK: http://lists.osgeo.org/mailman/listinfo/gdal-dev]
>  http://lists.osgeo.org/mailman/listinfo/gdal-dev
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to