[gdal-dev] State and future of GDAL's Java interface
Even Rouault
even.rouault at spatialys.com
Wed Feb 21 13:08:02 PST 2018
Kurt,
A "refresh" of the GDAL Java API, with its current Java 1.4 taste, would probably not be a bad
idea for newcomers, but for already existing users, this would probably be more an
annoyance. So we should probably treat it as we would do with a C++ API breakage. Probably
material for a GDAL 3.0
Feedback from users could be interested in that respect.
Even
> Another area for improvements would seem to be returning List<String>
> rather than Vector for things that only return a list of strings. Yes?
>
> e.g. The @SuppressWarnings("unchecked") is a bummer:
>
> @Test
> public void fileSystemsPrefixes() throws Exception {
> @SuppressWarnings("unchecked")
> // Convert from Vector.
> List<String> prefixes = gdal.GetFileSystemsPrefixes();
> assertThat(prefixes)
> .containsAllOf(
> "/vsicrypt/",
> "/vsigzip/",
>
> On Wed, Feb 21, 2018 at 10:32 AM, Kurt Schwehr <schwehr at gmail.com> wrote:
> > Hi all,
> >
> > What are peoples thoughts on the SWIG/JNI interface to GDAL? In using it
> > a little bit, I have some questions for the community.
> >
> > 1. Many functions drop type safety and go with raw int. e.g. gdalconst...
> > Would people be open to using Enums?
> >
> > 2. There are many useful functions that are not SWIG wrapped for Java.
> >
> > e.g. I don't see a way to get bytes to or from /vsimem (or others)
> >
> > directly (without using a raster or vector driver). Are there thoughts on
> > adding those?
> >
> > 3. There is no java in autotest. Are folks up for the addition of some
> > testing? I've been working on JUnit 4 tests that I can contribute (and
> > switch to the GDAL license). I will start putting what I have in
> > autotest2
> > soon so at least folks can see what I have
> >
> > 4. What is the minimum version of Java that we must support? Can we
> > safely add to the java side using features from newer versions? e.g. try
> > with resources in https://gist.github.com/schwehr/
> > 481dfbfad98815c6d45c3d22f12c41d0
> >
> > Thanks,
> > -kurt
--
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20180221/25c6cc4f/attachment.html>
More information about the gdal-dev
mailing list