[Gdal-dev] Dataset.BuildOverviews signature in C# bindings

Tamas Szekeres szekerest at gmail.com
Tue Apr 3 11:44:28 EDT 2007


Hi,

I think it can be fixed easily, the callback function can be
implemented through the concept of delegates in C# as well. However we
should decide the C# equivalent type of 'void *   	 pProgressData'
would the C# string type sufficient?
Please create a ticket on it and assign to the CSharpBindings component.


Best regards,


2007/4/3, Frank Warmerdam <warmerdam at pobox.com>:
> Jason Beverage wrote:
> > All,
> >
> > I'm playing with the C# bindings and I noticed that the BuildOverviews
> > method in Dataset has the signature:
> >
> > int BuildOverviews(string resampling, int overviewlist)
> >
> > The C++ signature has many more arguments, and it seems like at the very
> > least you have to pass in an array of overview levels instead of just a
> > single int for the overviewlist to have the method do anything
> > meaningful.
> >
> > I would imagine the SWIG files need updating to correct the signature,
> > but I'm not sure where the change would need to be made exactly.
> >
> > Just wanted to bring this to your attention before the 1.4.1 release if
> > its just a quick fix.
>
> Jason,
>
> Please file a bug now, and it might be correctable in time for 1.4.1.
>
> Looking at the generic swig declaration it should at least have the
> overview list as an array so perhaps there is a typemapping issue.
>
>    // The (int,int*) arguments are typemapped.  The name of the first argument
>    // becomes the kwarg name for it.
> %feature("kwargs") BuildOverviews;
> %apply (int nList, int* pList) { (int overviewlist, int *pOverviews) };
>    int BuildOverviews( const char *resampling = "NEAREST",
>                        int overviewlist = 0 , int *pOverviews = 0 ) {
>      return GDALBuildOverviews( self, resampling, overviewlist, pOverviews, 0,
> 0, 0, 0);
>    }
> %clear (int overviewlist, int *pOverviews);
>
> The swig bindings don't support the callback interface for progress on this or
> other methods with progress callacks (unfortunately).
>
> 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    | President OSGeo, http://osgeo.org
>
> _______________________________________________
> 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