Not sure if this is a bug or if I'm feeding it in wrong, but the prime meridian of EPSG:4807 (NTF Paris), which is defined in grads, seems to come out as if it were degrees.
const proj4 = require('proj4'); // 2.20.9
const wkt = 'GEODCRS["NTF (Paris)",DATUM["Nouvelle Triangulation Francaise (Paris)",ELLIPSOID["Clarke 1880 (IGN)",6378249.2,293.466021293627,LENGTHUNIT["metre",1]]],PRIMEM["Paris",2.5969213,ANGLEUNIT["grad",0.015707963267949]],CS[ellipsoidal,2],AXIS["latitude",north,ORDER[1],ANGLEUNIT["grad",0.015707963267949]],AXIS["longitude",east,ORDER[2],ANGLEUNIT["grad",0.015707963267949]],ID["EPSG",4807]]';
console.log(new proj4.Proj(wkt).from_greenwich * 180 / Math.PI); // 2.5969213
PROJ/pyproj reads the same value as grads and ends up at 2.33722917° (i.e. 2.5969213 × 0.9, +pm=paris):
from pyproj import CRS
CRS.from_epsg(4807).prime_meridian # longitude=2.5969213, unit_name='grad' -> 2.33722917 deg
So the two differ by ~0.26°. Is the ANGLEUNIT["grad"] on the PRIMEM supposed to be applied here? At a glance it looks like index.js:98 uses the raw value via d2r(...), but I haven't dug in and could be misreading.
Not sure if this is a bug or if I'm feeding it in wrong, but the prime meridian of EPSG:4807 (NTF Paris), which is defined in grads, seems to come out as if it were degrees.
PROJ/pyproj reads the same value as grads and ends up at 2.33722917° (i.e. 2.5969213 × 0.9,
+pm=paris):So the two differ by ~0.26°. Is the
ANGLEUNIT["grad"]on thePRIMEMsupposed to be applied here? At a glance it looks likeindex.js:98uses the raw value viad2r(...), but I haven't dug in and could be misreading.