[Gdal-dev] compression CCITTFAX4 ?

Frank Warmerdam warmerdam at pobox.com
Tue Jan 31 09:17:39 EST 2006


On 1/31/06, Ivan Mjartan <ivan.mjartan at geovap.cz> wrote:
> 1) Get intersection of raster and window of application
> 2) Compute coordinate of intersection
> 3) Call createSubImage function
> 4) Load result image (bitmap) from disk and display it in window.
> 5) Delete tempimage

Ivan,

Do you need to have a BMP on disk in order to display it
in your window?  If you can short circuit things so that
the "load result image from disk" step actually loads directly
from the original file with one GDALDatasetRasterIO() call
you will get much better performance.  Skipping all the temp
BMP file copying to disk.  I would add the VRT mechanism isn't
always that efficient as a way of accessing data.

> createSubImage function looks like follow, this function is fragment of
> gedal_translate.exe and returns small subwindow of input raster.
>
> But problem is when I get on input this large raster.
>
> It is possible use something else then createcopy? I am not sure but
> mapserver is working properly on this raster.

I'm not sure why mapserver works on this raster.

> Is my function createSubImage correct ?

As far as I can see, it is correct though an inefficient approach.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list