[PROJ] PROJ7 in JavaScript

Howard Butler howard at hobu.co
Fri Oct 2 06:58:16 PDT 2020



> On Oct 1, 2020, at 3:58 PM, Javier Jimenez Shaw <j1 at jimenezshaw.com> wrote:
> 
> Hi
> 
> As far as I know, there is no JavaScript version PROJ6 or 7. The last is  https://github.com/proj4js/proj4js <https://github.com/proj4js/proj4js> based on PROJ4. Am I right?
> 
> Is there any plan to have anything like proj7js? Even more, does it make sense?

Not as far as I know. Maybe you could put something forward. I think the path to explore is compilation of PROJ to WebAssembly and then build JavaScript wrappers over that. The SQLite database makes it a bit more challenging, but there are implementations of SQLite on WebAssembly too. 

Don't hand roll a port. 

> Somebody mentioned that PROJ6 was too heavy for a web page, and making constant requests to a server was not feasible (when the user moves the mouse over a map and the coordinates are updated instantly, for instance).

The download of proj.db would be a bit of a hit, but it's conveniently cacheable per-page and doesn't change after it is fetched. Once it is local, a JavaScript PROJ implementation based on WebAssembly could use it do its queries just as C-language PROJ does today.

Howard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20201002/3dd61af4/attachment.html>


More information about the PROJ mailing list