2

Question

I am simply wondering, what is the relationship between the web oriented proj4js and the PROJ C++ well known library (on which for example GDAL/OGR relies)?

Is there any link between these two libraries?

It's written on the proj4js web page that it is:

Originally a port of PROJ.4 and GCTCP C it is a part of the MetaCRS group of projects.

But what is the current situation?
How could I check what version of PROJ does proj4js rely on?

Sources repositories of each of these projets:

https://github.com/proj4js/proj4js
https://github.com/OSGeo/PROJ

2

The first one "proj4js" is an adaptation from the second but not a port (same API in a different programming language)

The second PROJ (C++) is used directly or by program like PostGIS or GDAL to manage projections

Both take as an input mostly the same definitions for projection. You can confirm it with "Export" section from website epsg.io (an example https://epsg.io/2154)

If you want a literal JavaScript port of PROJ for JavaScript, you should look at https://github.com/mbloch/mapshaper-proj instead. It can be useful to get latest projections like "eqearth" or other not supported in proj4js (see https://proj.org/operations/projections/index.html for a list).

2
  • What if I need PROJ 6.x.x, for example for direct transforms or to compute cartesian geodetic coordiantes using proj4js? Is there any port of PROJ 6.x.x to a sister JS lib? – s.k Feb 12 '20 at 13:45
  • Not really sure. Not aware of a proj 6.x.x port inJS. Only clue could be about using C++ To Web Assembly to support it or creating your own back-end webservice and call it. – ThomasG77 Feb 12 '20 at 13:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.