Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Off-by-one in Robinson projection? #1172

Closed
QuLogic opened this issue Nov 13, 2018 · 1 comment
Closed

Off-by-one in Robinson projection? #1172

QuLogic opened this issue Nov 13, 2018 · 1 comment

Comments

@QuLogic
Copy link
Contributor

QuLogic commented Nov 13, 2018

In Robinson, i is limited by:
/~https://github.com/OSGeo/proj.4/blob/330e8bf686f9c4524075ca1ff50cbca6c9e091da/src/PJ_robin.c#L87-L91
to 0 <= i <= NODES - 1 and i + 1 is never used in s_forward. Here, NODES is set to 18, but there are 19 entries in X and Y. In s_inverse, i + 1 is used.

So, is the last entry in the X and Y tables supposed to be applied in s_forward (and accidentally not), or is it only there for s_inverse? If this is intentional, I guess a comment would be helpful to make this clear. Of am I just misreading something here?

@kbevers
Copy link
Member

kbevers commented Nov 13, 2018

I have no idea, to be honest. It does seem plausible that there's been made a mistake here. Usually when these types of problems show up I have a look in the original papers that describe the projection. I haven't got the time for that at the moment so I would suggest you do that yourself if you need a quick answer to this :-)

rouault added a commit to rouault/PROJ that referenced this issue Feb 24, 2019
kbevers added a commit that referenced this issue Feb 24, 2019
Robinson: fix wrong values for forward path for latitudes >= 87.5 (fixes #1172), and fix inaccurace inverse method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants