On 8/5/06, <b class="gmail_sendername">Charlie Savage</b> <<a href="mailto:cfis@savagexi.com">cfis@savagexi.com</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
In gdal.i add<br><br>%include "typemaps.i"<br><br>*before* the code you pasted below (so it is loaded before gdal_typemaps.i)</blockquote><div><br><br>Done, but the problem was not resolved :( </div>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.
<br><div> <br>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. <br>Here, some parts of code:<br><br><span style="font-weight: bold;">
gdal.i:</span><br>...<br>#elif defined(SWIGJAVA)<br>%include "gdal_java.i"<br>#else<br>%include "gdal_typemaps.i"<br>#endif<br>...<br><br>Chapter 7.3 of Swig-1.3 Documentation says:<br><span style="font-style: italic;">
SWIGJAVA Defined when using Java</span><br><br><span style="font-weight: bold;">gdal_java.i:<br></span>...<span style="font-weight: bold;"><br></span>%include typemaps_java.i<br>...<br><br><span style="font-weight: bold;">
typemaps_java.i:<br></span>...<br>%include "arrays_java.i";<br>%include "typemaps.i"<br>...<br><span style="font-weight: bold;"></span><br>Thus, the result should be the same.<br><br>I'm not really familiar with swig but are you sure that the %APPLY directive is not required?
<br>(excuse me for my stupid question... :-( )<br></div><br>Thanks for your continuous aid,<br>Daniele<br><br><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Charlie<br><br>Daniele Romagnoli wrote:<br>> gdal.i include band.i (band.i contains "our" getBlockSize method)<br>><br>> furthermore, gdal.i contains this code:<br>><br>> #if defined(SWIGPYTHON)<br>
> %include "gdal_python.i"<br>> #elif defined(SWIGRUBY)<br>> %include "gdal_ruby.i"<br>> #elif defined(SWIGPHP4)<br>> %include "gdal_php.i"<br>> #elif defined(SWIGCSHARP)<br>
> %include "gdal_csharp.i"<br>> #elif defined(SWIGPERL)<br>> %include "gdal_perl.i"<br>> #elif defined(SWIGJAVA)<br>> %include "gdal_java.i"<br>> #else<br>> %include "gdal_typemaps.i"
<br>> #endif<br>><br>><br>> and gdal_java.i contains this code:<br>><br>> %include typemaps_java.i<br>> (while other languages include the proper typemaps_language.i)<br>><br>> This "include" mechanism should work?
<br>> Or I explicitly need to include something else somewhere?<br>><br>> Thanks again.<br>><br>> Cheers<br>> Daniele<br>><br>><br>> On 8/5/06, *Charlie Savage* < <a href="mailto:cfis@savagexi.com">
cfis@savagexi.com</a><br>> <mailto:<a href="mailto:cfis@savagexi.com">cfis@savagexi.com</a>>> wrote:<br>><br>> Sorry, typemaps.i is what I meant. I don't see it included anywhere<br>> except in the
csharp.i file.<br>><br>> Try putting it in gdal.i instead - that will cause all languages to use<br>> it. If that works, it probably should be removed from csharp.i. And<br>> added to ogr.i (not sure if there is one central .i file it go into,
<br>> doesn't look like it).<br>><br>> Charlie<br>><br>> Daniele Romagnoli wrote:<br>> > I'm sorry Charlie...<br>> > Please, throw away my previous email (which contains a typo)...
<br>> ><br>> > This one is corrected:<br>> > ----<br>> > There is no sign of templates.i in my code (neither in the gdal<br>> and swig<br>> > subfolders).<br>> > Furthermore, there is no trace of
templates.i in the suggested<br>> http link :(<br>> ><br>> > Maybe are you talking about typemaps.i?<br>> > I'm sure that typemaps.i is included.<br>> ><br>> > --
<br>> > Best Regards,<br>> > Daniele<br>> ><br>> > ---------- Forwarded message ----------<br>> > From: *Daniele Romagnoli* < <a href="mailto:dany.geotools@gmail.com">
dany.geotools@gmail.com</a><br>> <mailto:<a href="mailto:dany.geotools@gmail.com">dany.geotools@gmail.com</a>><br>> > <mailto:<a href="mailto:dany.geotools@gmail.com">dany.geotools@gmail.com</a>
<mailto:<a href="mailto:dany.geotools@gmail.com">dany.geotools@gmail.com</a>>>><br>> > Date: Aug 5, 2006 8:03 PM<br>> > Subject: Re: gdal swig interface Band.i Updated<br>> > To: Charlie Savage <
<a href="mailto:cfis@savagexi.com">cfis@savagexi.com</a> <mailto:<a href="mailto:cfis@savagexi.com">cfis@savagexi.com</a>><br>> <mailto:<a href="mailto:cfis@savagexi.com">cfis@savagexi.com</a> <mailto:<a href="mailto:cfis@savagexi.com">
cfis@savagexi.com</a>>>><br>> ><br>> > On 8/5/06, *Charlie Savage* <<a href="mailto:cfis@savagexi.com">cfis@savagexi.com</a><br>> <mailto:<a href="mailto:cfis@savagexi.com">cfis@savagexi.com
</a>><br>> > <mailto:<a href="mailto:cfis@savagexi.com">cfis@savagexi.com</a> <mailto:<a href="mailto:cfis@savagexi.com">cfis@savagexi.com</a>>>> wrote:<br>> ><br>> > Check to see if
templates.i is included.<br>> ><br>> > See:<br>> ><br>> > <a href="http://www.swig.org/Doc1.3/Arguments.html#Arguments_nn5">http://www.swig.org/Doc1.3/Arguments.html#Arguments_nn5
</a><br>> > <<a href="http://www.swig.org/Doc1.3/Arguments.html#Arguments_nn5">http://www.swig.org/Doc1.3/Arguments.html#Arguments_nn5</a>><br>> ><br>> ><br>> ><br>> > There is no sign of
templates.i in my code (neither in the gdal<br>> and swig<br>> > subfolders).<br>> > Furthermore, there is no trace of typemaps.i in the suggested<br>> http link :(<br>> ><br>
> > Maybe are you talking about typemaps.i?<br>> > I'm sure that typemaps.i is included.<br>> ><br>> > --<br>> > Best Regards,<br>> > Daniele<br>> >
<br>> ><br>> ><br>><br>><br><br></blockquote></div>