[PROJ] PROJ7 in JavaScript
Richard Greenwood
richard.greenwood at gmail.com
Fri Oct 2 18:21:00 PDT 2020
I am mistaken regarding web assembly support in Node.
https://www.joyent.com/blog/improved-wasm-support-coming-to-node
On Fri, Oct 2, 2020 at 1:43 PM Richard Greenwood <
richard.greenwood at gmail.com> wrote:
> Proj 6 and 7 don't really add any new functionality. Proj does forward in
> inverse projections and it does datum transformations with 3 & 7 parameters
> transforms and grid shift transforms. Proj4js supports most of the commonly
> used projections and the 3 & 4 param datum transforms. It doesn't support
> grid shift transforms and grid shift transforms are what are "heavy" in
> terms of the size of the required data. I thought a lot about adding grid
> shift support and considered a server-side option like Javier mentions, but
> it's a lot of moving parts for pretty limited use cases. Like how many web
> mapping apps need the precision of a grid shift transform? And for those
> that do, how do you build a generic enough mechanism to cover the
> variations in scale, platform, online/offline, etc.?
>
> Bringing the proj4js code more inline with Proj 7 sounds like a nice goal.
> It was never really even in sync with Proj4, it was just cobbled together
> enough to work, not to maintain.
>
> Web assembly sounds cool if you're thinking in a web browser context only
> but modern JavaScript is often trying to support browsers and Node,
> which web assembly would not do, or at least not in my very limited
> knowledge of web assembly.
>
> Rich
>
>
> On Fri, Oct 2, 2020 at 7:58 AM Howard Butler <howard at hobu.co> wrote:
>
>>
>>
>> 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 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
>> _______________________________________________
>> PROJ mailing list
>> PROJ at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/proj
>>
>
>
> --
> Richard W. Greenwood, PLS
> www.greenwoodmap.com
>
--
Richard W. Greenwood, PLS
www.greenwoodmap.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20201002/6250e1a2/attachment.html>
More information about the PROJ
mailing list