[PROJ] proj in the browser

Will Cohen wwcohen at gmail.com
Thu Mar 5 17:54:41 PST 2026


Inspired by Javier's work on all this grid fetching, I finally got grid
working on proj-wasm too and (shamelessly!) tried to fill out the demo page
to include some of his lovely transformation web page interface as well.
Instead of doing the grid fetches through emscripten, though, it takes a
slightly different approach (
https://github.com/willcohen/clj-proj?tab=readme-ov-file#grid-fetching). In
an effort to maintain parity with the JVM FFI side of the library, I'm
still only trying to stick to the pure C api, so I can't quite get all of
the projinfo functions as cleanly, though the C API seems to provide a lot
of that info.

Parallelism and grid fetching now work on both node and browser, with paths
resolving correctly on mac/win/linux.

There's also a small console at the bottom of the demo page (still working
on the autocomplete -- it's missing some of the functions) that allows
trying to run custom PROJ functions in-browser. There's a dropdown with
examples to get started.

On Mon, Feb 23, 2026 at 3:27 PM Thomas Knudsen via PROJ <
proj at lists.osgeo.org> wrote:

> Whoa, Javier! That is utterly awesome!
>
> I needed this badly a few months back, when teaching a geodesy course for
> people who would never consider installing PROJ on their PC. Next time
> around, I will just point them to your work.
>
> Thanks for this huge effort!
>
> /Thomas Knudsen
>
> Den man. 23. feb. 2026 kl. 11.25 skrev Javier Jimenez Shaw via PROJ <
> proj at lists.osgeo.org>:
>
>> Hi
>>
>> TL;DR: go to the links below and play :)
>>
>> Finally, after a long time and learning a lot during the process, I am
>> getting a webpage that uses PROJ to perform coordinate transformations
>> (similar to cs2cs), and another that replicates projinfo:
>>
>> tranform: https://jjimenezshaw.github.io/wasm-proj/transform.html
>>
>> projinfo: https://jjimenezshaw.github.io/wasm-proj/projinfo.html
>>
>> All runs in the browser with PROJ (current master as of yesterday), no
>> server needed. It uses the wasm compilation with emscripten that is run in
>> CI (I copied the two needed files into the project).
>> It uses a very simple library to manage the memory allocation, trying to
>> make it simple for the javascript developer. The library is still in
>> development, but functional as you can see.
>>
>> The transformer is able to use grids: it downloads at execution time the
>> part of grid needed (a feature PROJ already has). For that it needs some
>> code to run in a web worker, but the library is doing that as well.
>>
>> For instance, this link
>> https://jjimenezshaw.github.io/wasm-proj/transform.html?st=combo&tt=combo&sh=EPSG%3A6318&th=EPSG%3A6539&tv=EPSG%3A6360&p3d=1&net=1&coords=40.7789978+-73.9632654+-20.5
>> uses the geoid model for NAVD88 (in this case, GEOID18)
>>
>> Tip for projinfo: add "&run=1" when you share the URL, and it will run
>> directly the query. Both pages update the URL with the data to make it easy
>> to share.
>>
>> Have fun!
>>
>> Cheers,
>> Javier.
>>
>> PS. Yes, another one. There are at least two other. This was a personal
>> challenge to efficiently use the grid files in the browser.
>> PPS. Why these two, and not other things from PROJ? well, these are the
>> two apps I use in a daily basis in the console. Now I can send a link to my
>> colleagues that do not know how to use the command line. But more things
>> can be done.
>> _______________________________________________
>> PROJ mailing list
>> PROJ at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/proj
>>
> _______________________________________________
> PROJ mailing list
> PROJ at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/proj
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20260305/499ac895/attachment-0001.htm>


More information about the PROJ mailing list