[PROJ] proj in the browser
Javier Jimenez Shaw
j1 at jimenezshaw.com
Mon Feb 23 02:25:32 PST 2026
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20260223/25906fbf/attachment.htm>
More information about the PROJ
mailing list