[gdal-dev] C# Read Raster slow

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] C# Read Raster slow

tval
I am reading a raster to an IntPtr buffer in c#:

band.ReadRaster(256, 256, 128, 128, buf, 128, 128, band.DataType, 6, stride)

I loop through the size of the raster I am retrieving (say 500x500) pixels
and read each 128 block of the raster. The problem is, this can take up to 6
seconds just to read a 500x500 portion of the image! I notice that the very
first read method can often take the longest (4 sec or so). I am trying to
understand why this is so slow and if there is something I can do to resolve
it. I have tried with and without overviews and it does not seem to matter.
The image is .jp2 and the image sizes are only 2800x2000 in total pixel
size.

Any help would be appreciated.
Travis



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev