Dear Mr Warmerdam,<br>
Could you please update the Band.i interface resulting from our discussions (between me, you and Mr. Charlie Savage)?<br><br>The section which needs to be updated is:<br>-----------------------------------------------------------------------------------------
<br><span class="q">%apply (int *OUTPUT){int *blockXSize, int *blockYSize}<br> void GetBlockSize(int *blockXSize, int *blockYSize){<br> GDALGetBlockSize(self, blockXSize, blockYSize);<br> }<br>%clear (int *blockXSize, int *blockYSize);
<br></span>-----------------------------------------------------------------------------------------<br><span class="q"><br>instead of the actual version:<br>----------------------------------------------------------------------------------------
<br></span>void GetBlockSize(int *OUTPUT, int *OUTPUT){<br> GDALGetBlockSize(self, blockXSize, blockYSize);<br> }<br>-----------------------------------------------------------------------------------------
<br><br><br><div><span class="gmail_quote">On 8/6/06, <b class="gmail_sendername">Daniele Romagnoli</b> <<a href="mailto:dany.geotools@gmail.com">dany.geotools@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><br><br><div></div><div><span class="q"><span class="gmail_quote">On 8/6/06, <b class="gmail_sendername">Charlie Savage</b> <<a href="mailto:cfis@savagexi.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
cfis@savagexi.com</a>> 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. Once again, see:<br><br><a href="http://www.swig.org/Doc1.3/Arguments.html#Arguments_nn5" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.swig.org/Doc1.3/Arguments.html#Arguments_nn5
</a></blockquote></span></div><div><div><br>
You are right... <br></div></div><div><span class="q"><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 "typemaps.i"<br><br>To gdal.i before line 441 which is:<br><br>%include "Band.i"<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. 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></span></div><div><div><br>Unfortunately, it doesn't work :(<br>I'll back to using apply...
<br>
<br></div></div><div><span class="q"><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> void GetBlockSize(int *blockXSize, int *blockYSize){<br> GDALGetBlockSize(self, blockXSize, blockYSize);<br> }<br>%clear (int *blockXSize, int *blockYSize)
</blockquote></span></div><div><div><br><br>Ok, Thank you. I will add the final %clear directive.<br></div></div><div><span class="q"><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></span></div><div></div></div><div><span class="e" id="q_10ce082e8a8bbe2a_9">Thank you very much!<br>-- <br>Best Regards,<br>Daniele
</span></div></blockquote></div><br><br clear="all"><br>-- <br>Best Regards,<br>Daniele