[Gdal-dev] Java bindings and wkb support, a patch for gdal
szekerest at gmail.com
Thu Feb 15 06:14:21 EST 2007
2007/2/15, Andrea Aime <aaime at openplans.org>:
> Sure. I would just feel a little more comfortable if someone could
> have a look at the patches at the beginning, since I've absolutely
> no experience with SWIG. Making a patch that works for me doesn't make
> it right :-)
That's not a problem. Many of the developers can give suggestions
about the uncertain problems. I would also be happy to have an active
java maintainer who uses this interface frequently in practice and can
take care of the upcoming problems related to that language. There are
many similarities between C# and Java SWIG approach, but the way of
mapping some of the datatypes may differ.
> I'll keep on creating patches as I need them, learning new technology is
> entertaining :-)
> When and if you feel comfortable givin me commit access, I'll accept it
> Btw, how does it work vs managing changes?
> For example, this patch changes the exportToWkb interface compared to
> other languages (not much of an issue on the java side, since it wasn't
> working before).
> Next step for me will be to try and add a method to retrive a full
> Feature attribute set in a single call, to reduce the JNI overhead
> (rumor says a JNI call is 10 times more expensive than a regular java
> method call). This will be a new method in the Swig java binding.
> Are these kind of modifications ok? How many people are using the
> java bindings, and how to relate with them?
In general, we should keep the various bindings aligned as much as we
can. However there are some cases where making some different is
inevitable. Here are some issues from the C# side requiring to make
- Altering the default memory allocation sceme (required by the target
language or related to performance issues)
- Handling some target language dependent memory management issues
(like the early garbage collection problem)
- Adding language dependent type mappings.
- Using more convenient data types for a particular language (for
example using class type instead of array like GDALColorEntry for C#).
Adding new methods for a particular language is definitely not a
problem, however we should negotiate whether that method should also
be added for the other bindings or not.
More information about the Gdal-dev