[Gdal-dev] ReadBlock in C#

Tamas Szekeres szekerest at gmail.com
Tue Mar 27 18:12:36 EDT 2007


Richard,

>From the C#'s perspective it would not be so difficult to implement
this feature. The 'void * pData' should probably be mapped to various
types of arrays or the generic IntPtr type.

However I have some doubts why would it be more efficient than calling
the ReadRaster/WriteRaster functions in exchange for the additional
problems may occur due to the possible errors when passing incorrect
parameters.
In addition I cannot see how to avoid the extra array copy when
marsaling the code between the C and the C# memory. Or would you
possibly use the native pointer with the fixed statement inside an
unsafe block?

Generally I have no objection implementing this functionality if you
guys could explain some use cases when it was really useful, and
submit a ticket with a brief description of the the desired operation.
This applies also to the other kind of the requested features as well.
I think we would not want to intentionally restrict the fuctionality
of the API and the user who really uses the interface could eventually
denote functionality that is missing but should exist.


Best regards,

Tamas




2007/3/27, Richard Matsunaga <richard.matsunaga at waypointinfo.com>:
>
>
> Why is the ReadBlock (and WriteBlock for that matter) method not included in
> the SWIG wrapper?
>
> Equivalent functionality is possible with ReadRaster, but this is not as
> elegant as using ReadBlock, especially since there is such a nice example in
> the ReadBlock documentation. Is there a list of methods that are not
> supported by SWIG (and why they are not supported)?
>
> Regards,
> Richard
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/gdal-dev
>



More information about the Gdal-dev mailing list