[Gdal-dev] Re: Fwd: gdal swig interface Band.i Updated
Daniele Romagnoli
dany.geotools at gmail.com
Sat Aug 5 18:05:39 EDT 2006
On 8/5/06, Charlie Savage <cfis at savagexi.com> wrote:
>
> In gdal.i add
>
> %include "typemaps.i"
>
> *before* the code you pasted below (so it is loaded before
> gdal_typemaps.i)
Done, but the problem was not resolved :(
I think that the use of JAVA as target Language prevent the "include" of
gdal_typemaps.i as defined by the "if-elif-if-elif..." chain previously
shown.
I also think (maybe I'm wrong) that when using Java, gdal.i will include
gdal_java.i which includes typemaps_java.i which includes typemaps.i.
Here, some parts of code:
gdal.i:
...
#elif defined(SWIGJAVA)
%include "gdal_java.i"
#else
%include "gdal_typemaps.i"
#endif
...
Chapter 7.3 of Swig-1.3 Documentation says:
SWIGJAVA Defined when using Java
gdal_java.i:
...
%include typemaps_java.i
...
typemaps_java.i:
...
%include "arrays_java.i";
%include "typemaps.i"
...
Thus, the result should be the same.
I'm not really familiar with swig but are you sure that the %APPLY directive
is not required?
(excuse me for my stupid question... :-( )
Thanks for your continuous aid,
Daniele
Charlie
>
> Daniele Romagnoli wrote:
> > gdal.i include band.i (band.i contains "our" getBlockSize method)
> >
> > furthermore, gdal.i contains this code:
> >
> > #if defined(SWIGPYTHON)
> > %include "gdal_python.i"
> > #elif defined(SWIGRUBY)
> > %include "gdal_ruby.i"
> > #elif defined(SWIGPHP4)
> > %include "gdal_php.i"
> > #elif defined(SWIGCSHARP)
> > %include "gdal_csharp.i"
> > #elif defined(SWIGPERL)
> > %include "gdal_perl.i"
> > #elif defined(SWIGJAVA)
> > %include "gdal_java.i"
> > #else
> > %include "gdal_typemaps.i"
> > #endif
> >
> >
> > and gdal_java.i contains this code:
> >
> > %include typemaps_java.i
> > (while other languages include the proper typemaps_language.i)
> >
> > This "include" mechanism should work?
> > Or I explicitly need to include something else somewhere?
> >
> > Thanks again.
> >
> > Cheers
> > Daniele
> >
> >
> > On 8/5/06, *Charlie Savage* < cfis at savagexi.com
> > <mailto:cfis at savagexi.com>> wrote:
> >
> > Sorry, typemaps.i is what I meant. I don't see it included anywhere
> > except in the csharp.i file.
> >
> > Try putting it in gdal.i instead - that will cause all languages to
> use
> > it. If that works, it probably should be removed from csharp.i. And
> > added to ogr.i (not sure if there is one central .i file it go into,
> > doesn't look like it).
> >
> > Charlie
> >
> > Daniele Romagnoli wrote:
> > > I'm sorry Charlie...
> > > Please, throw away my previous email (which contains a typo)...
> > >
> > > This one is corrected:
> > > ----
> > > There is no sign of templates.i in my code (neither in the gdal
> > and swig
> > > subfolders).
> > > Furthermore, there is no trace of templates.i in the suggested
> > http link :(
> > >
> > > Maybe are you talking about typemaps.i?
> > > I'm sure that typemaps.i is included.
> > >
> > > --
> > > Best Regards,
> > > Daniele
> > >
> > > ---------- Forwarded message ----------
> > > From: *Daniele Romagnoli* < dany.geotools at gmail.com
> > <mailto:dany.geotools at gmail.com>
> > > <mailto:dany.geotools at gmail.com <mailto:dany.geotools at gmail.com
> >>>
> > > Date: Aug 5, 2006 8:03 PM
> > > Subject: Re: gdal swig interface Band.i Updated
> > > To: Charlie Savage < cfis at savagexi.com <mailto:cfis at savagexi.com>
> > <mailto:cfis at savagexi.com <mailto:cfis at savagexi.com>>>
> > >
> > > On 8/5/06, *Charlie Savage* <cfis at savagexi.com
> > <mailto:cfis at savagexi.com>
> > > <mailto:cfis at savagexi.com <mailto:cfis at savagexi.com>>> wrote:
> > >
> > > Check to see if templates.i is included.
> > >
> > > See:
> > >
> > > http://www.swig.org/Doc1.3/Arguments.html#Arguments_nn5
> > > <http://www.swig.org/Doc1.3/Arguments.html#Arguments_nn5>
> > >
> > >
> > >
> > > There is no sign of templates.i in my code (neither in the gdal
> > and swig
> > > subfolders).
> > > Furthermore, there is no trace of typemaps.i in the suggested
> > http link :(
> > >
> > > Maybe are you talking about typemaps.i?
> > > I'm sure that typemaps.i is included.
> > >
> > > --
> > > Best Regards,
> > > Daniele
> > >
> > >
> > >
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20060806/31bb3344/attachment.html
More information about the Gdal-dev
mailing list