[PROJ] PROJ-JNI (binding to Java) preview

Martin Desruisseaux martin.desruisseaux at geomatys.com
Fri Oct 18 03:21:56 PDT 2019


Hello all

A working version of JNI bindings for Java is available at [1]. Those 
bindings are not yet complete; missing parts are recorded as GitHub 
issues [2]. But current functionalities cover geographic, geocentric, 
projected, vertical, temporal and compound CRS, operations between those 
CRS with the control provided by PROJ API (e.g. how to make decision 
based on geographic extents), exports as WKT 2, WKT 1, PROJ or JSON 
strings, instantiation from strings or authority codes (EPSG or IAU).

The main work was to manage interaction between C++ shared pointers and 
Java garbage collector, and to support multi-threading automatically. 
After those two tasks were done, mapping the C++ API was quite 
straightforward. Mapping the C API would have been much more difficult 
however, and would have required significant work in PROJ itself since a 
lot of information are currently available only through C++ API.

Javadoc is available at [3]. The "kortforsyningen" name is temporary; a 
final name will be selected later on project completion. The Javadoc is 
relatively small because it contains only PROJ-JNI specific API; after 
user got a factory, a CRS or coordinate operation, from that point the 
remaining API is defined by GeoAPI interfaces.

Comments are welcome!

     Martin

[1] https://github.com/Kortforsyningen/PROJ-JNI
[2] https://github.com/Kortforsyningen/PROJ-JNI/issues
[3] https://kortforsyningen.github.io/PROJ-JNI/org/kortforsyningen/proj/package-summary.html

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20191018/daa26b24/attachment-0001.html>


More information about the PROJ mailing list