[Gdal-dev] C# Bindings
szekerest at gmail.com
Sun Nov 5 14:57:27 EST 2006
2006/11/5, Simon Perkins <sy at perkins.net>:
> Simon Perkins wrote:
> > OK, I see how this would work now. As you might guess, I still don't
> > like the extra copying just to use a typesafe version of the method
> > and to avoid the /UNSAFE keyword, but that's a personal preference. As
> > long as the high performance IntPtr version of Read/WriteRaster() is
> > available, I'll be happy...
> Just to play devil's advocate a little, I'm going to point out that the
> extra cost involved with allocating an intermediate buffer and copying
> data for the typesafe versions of Read/WriteRaster() might actually not
> be that significant...
> GDAL already does some intermediate copying of data since internally it
> reads blocks of data, stores those in a cache, and then copies from
> there to the user's buffer. In addition, if the block data has to be
> fetched from disk, the cost of the disk I/O is certain to dwarf the cost
> of a few extra memory copies...
Would it mean that the requirement about the unsafe methods is obsoleted?
More information about the Gdal-dev