<br><br><div><span class="gmail_quote">On 8/6/06, <b class="gmail_sendername">Charlie Savage</b> &lt;<a href="mailto:cfis@savagexi.com">cfis@savagexi.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hmm, in theory %apply and OUT do the same thing.&nbsp;&nbsp;Once again, 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></blockquote><div><br>
You are right...  <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Anyway, I would take the simple approach, which is add this line:
<br><br>%include &quot;typemaps.i&quot;<br><br>To gdal.i before line 441 which is:<br><br>%include &quot;Band.i&quot;<br><br>And in fact, I'd probably put it on line 192 (before the #if<br>defined(SWIGPYTHON).<br><br>Doing that simplifies the problem.&nbsp;&nbsp;If it doesn't work, then yes, it
<br>appears the OUTPUT * parameter is not working for Java in which case go<br>back to using apply (and maybe submit a bug to SWIG).</blockquote><div><br>Unfortunately, it doesn't work :(<br>I'll back to using apply... <br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">However, if you use %apply then you should also clear it after the<br>method is defined.
<br><br>%apply (int *OUTPUT){int *blockXSize, int *blockYSize}<br>&nbsp;&nbsp; void GetBlockSize(int *blockXSize, int *blockYSize){<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GDALGetBlockSize(self, blockXSize, blockYSize);<br>&nbsp;&nbsp; }<br>%clear (int *blockXSize, int *blockYSize)
</blockquote><div><br><br>Ok, Thank you. I will add the final %clear directive.<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Its probably not that important in this case, but if there happened to<br>be another method with the same 2 output parameters then this typemap<br>would be applied again (sometimes you want that, sometimes you don't).<br>
<br>Charlie<br><br><br><br></blockquote></div>Thank you very much!<br>-- <br>Best Regards,<br>Daniele