Hi,<br><br> I think it is possibile using the swig's director feature: Calling back non c/c++ from c/c++ code.<br><br>Basically you have to develop your driver as a C++ class declared in a swig interface file (.i) declaring virtual functions that have to implements the features of your driver. This driver should be viewed as an abstract driver.<br>
The "concrete" driver is implemented by a swig generated class that calls you java code implementing the virtual functions you declared in you ".i file".<br><br>Regards,<br>Stefano<br><br><div style="margin:0 0 8px 0">
Dr.Eng. Stefano Moratto<br><a href="mailto:stefano.moratto@gmail.com">stefano.moratto@gmail.com</a><br><a href="mailto:stefano.moratto@csiat.it">stefano.moratto@csiat.it</a><br><a href="http://www.csiat.it/">http://www.csiat.it</a> - Traffic Optimization Software</div>
                        <br><br><div class="gmail_quote">On Wed, Feb 22, 2012 at 4:13 PM, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@mines-paris.org">even.rouault@mines-paris.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Selon Michael Speth <<a href="mailto:spethm@landcareresearch.co.nz">spethm@landcareresearch.co.nz</a>>:<br>
<div class="im"><br>
> Greetings GDAL devs,<br>
> I am interested in developing a GDAL driver that calls out to a Java<br>
> library that accesses a database that we are developing using SWIG's<br>
> Java Bindings. Are there any examples of existing GDAL drivers using<br>
> the SWIG bindings?<br>
<br>
</div>Not that I am aware of, and not in GDAL source tree for sure.<br>
<div class="im"><br>
> If not, how might I use the SWIG library from a new<br>
> GDAL driver?<br>
><br>
> I've noticed there are 2 usages of Java from a GDAL driver. Frank<br>
> pointed out to me (ogr/ogrsf_frmts/ili) and mdb (ogr/ogrsf_frmts/mdb).<br>
> Both of these driver's use JNI. The reason I want to use SWIG is to<br>
> avoid having to deal with the added configuration of JNI (since SWIG<br>
> handles that already).<br>
<br>
</div>I'm not sure if you can call Java code with SWIG. Perhaps, but that's perhaps<br>
more a question for a SWIG mailing list. I don't see how the code of the GDAL<br>
SWIG bindings could help you since you will use a dedicated API for your Java<br>
library.<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
> Thanks!<br>
><br>
> --<br>
> Michael Speth<br>
> Research Systems Developer<br>
> Landcare Research<br>
><br>
> _______________________________________________<br>
> gdal-dev mailing list<br>
> <a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
><br>
<br>
<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><br><br>
<br><div id="WISESTAMP_SIG_775"><div style="font-size:13.3px;font-family:Verdana,Arial,Helvetica,sans-serif"><img src="http://p1.wisestamp.com/pixel.png?p=mozilla&v=3.9.12&t=1329994776541&u=4abac03f0c4ca423" height="1" width="1"></div>
</div>