[Gdal-dev] Java bindings and wkb support, a patch for gdal

Andrea Aime aaime at openplans.org
Wed Feb 14 10:41:34 EST 2007

Hi all,
as some of you may know, I had some issues with the java bindings
with wkb export (memory management issues breaking the jvm).

I have prepared a patch that makes wkb export work and attached it
to this mail. I sent the same mail to Benjamin Collins a few days
ago, but got no answer so far, so I'm addressing this to the
mailing list as well. Who's mantaining the java bindings, btw?

In the patch I make java allocate the byte buffer (in the same spirit as 
the C++ API) and added a typemap, taking inspiration from the C# 
mappings that already worked around the wkb memory management issues.

Works nice, and the speedup compared to WKT is significant, 4 times on 
my full shapefile load test (compared to reading geometries with WKT, 
that did not tear down the jvm).

If the patch has issues, let me know, I'll try to work them out.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: wkbPatch.patch
Type: text/x-diff
Size: 2937 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20070214/5ae704da/wkbPatch.bin

More information about the Gdal-dev mailing list