[PROJ] PROJ on JVM/JS via Native, WebAssembly, and Graal Interop

Will Cohen wwcohen at gmail.com
Wed Dec 11 16:43:57 PST 2024


Hello,

I am very pleased to announce clj-proj (
https://github.com/willcohen/clj-proj/), a project which provides a native
(or transpiled) version of PROJ for both the JVM and JS ecosystems.

The goal of this project is to provide a long-missing component of
geospatial analysis for these platforms: a performant version of PROJ that
can closely follow upstream development. This should dramatically improve
the suitability of the JVM and JS ecosystems for advanced open-source
geospatial uses.

This currently provides bindings to the JVM via Clojure using a package
that will eventually be published to Maven Central, and to pure Javascript
via an ES6 wrapper module over a transpiled module that will both
eventually be published on NPM. By unifying the API for all of this under a
single Clojure/Clojurescript namespace, it will be easier to maintain
parity with upstream, expand the reach of platforms to other hosted
runtimes, as well as make it easier to quickly assess in the longterm where
in the chain of interop -- actual interaction with PROJ's API, compilation
issues, webassembly issues, or other javascript or java issue -- the
wrapper mechanisms are running into difficulty during project maintenance.

Presently, this is very much a work in progress and in some ways only a
proof of concept. Clojure bindings exist on the JVM, and work on both
natively compiled PROJ and a transpiled WebAssembly version via GraalWasm.

Much work remains to be done. I've been working on this off and on for a
few years, and my native javascript work-in-progress module broke at some
point, so the project is still a bit off from being ready to publish either
to Maven Central or NPM. That said, I just learned today about the new
ability to embed the sqlite db into the library itself, which may provide a
good workaround pending better handling of WASM and additional files across
node and the web.

I welcome any and all feedback and/or contributions, and am happy to answer
any questions you may have here or on the project repository. I look
forward to getting this over the finish line for an initial release, and am
excited to continue to build it out so it can more fully represent the full
functionality of what PROJ has to offer, and to provide it to a large
portion of the computing landscape where the lack of PROJ remains a
substantial pain point for GIS.

Will
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20241211/38c5d65c/attachment.htm>


More information about the PROJ mailing list