[gdal-dev] Java API: how to find dimensions of MDArray
Even Rouault
even.rouault at spatialys.com
Sat Jun 3 04:09:28 PDT 2023
Barry,
This method is indeed not available currently in the Java bindings. It
is only available currently in the Python bindings (see
https://github.com/OSGeo/gdal/blob/master/swig/include/MultiDimensional.i#L159
) , since it requires writing a specific SWIG typemap for each binding
language when a method returns (or takes as argument) a new
non-primitive type such as here, with an array of dimensions. The
closest existing Java typemap I found that can be used to take
inspiration from is
https://github.com/OSGeo/gdal/blob/master/swig/include/java/typemaps_java.i#L235
but there would be changes to call the "Dimension(long cPtr, boolean
cMemoryOwn)" constructor. Whether you want to try to tackle that
yourself or not, you may create a ticket about that
Even
Le 03/06/2023 à 09:09, Barry DeZonia a écrit :
> On a related note is the Java api code in a public repo somewhere? It
> would be helpful to look at that code sometimes. (Like is
> GetDimensions() present in the Java code but not exposed as a public
> method?)
>
> On Sat, Jun 3, 2023 at 12:18 AM Barry DeZonia <bdezonia at gmail.com> wrote:
>
> Hi all,
>
> I have access to an MDArray. I am trying to find its dimensions.
> In the C++ API I can see that GDALMDArray has a method called
> GetDimensions() to find the info I need. But I am programming in
> Java and the Java API does not show such a call for MDArray. Is
> there some way in Java to find the info I need?
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
--
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230603/58b63bef/attachment.htm>
More information about the gdal-dev
mailing list