[Proj] Natural Earth projection
OvV_HN
ovv at hetnet.nl
Fri Mar 9 03:23:20 PST 2012
[Proj] Natural Earth projection
Bernhard Jenny jennyb at geo.oregonstate.edu
Thu Mar 8 18:46:20 EST 2012
Hi Berhard,
Regarding a possible error in the inverse projection function Natural Earth:
Thanks for looking into this problem!
Luckily it was my fault, excuses for that.
The problem was not quite standard (JavaScript) code in the original, which
I cleaned up. In this process a small typographic error was made, with large
consequences.
Your code will undoubtedly pass many JavaScript interpreters, but not all.
Especially the following two constructs are likely to give somewhere a
problem:
for(; ; )
and
yc -= tol = f / fder;
My corrected code now goes all the way up to the poles, for instance:
R = 6371008.7714;
lat = 90.0d, lon = 120.0d
gives x = 6394608.652918302, y = 9062062.394736718
back to lat, lon: 90.00000000000014, 120.00000000000055 d
in 7 Newton iteration steps.
If someone could check the provided PROJ C-code, the Natural Earth
projection code could be added to the PROJ package, if so desired!
Oscar van Vlijmen
More information about the Proj
mailing list