-
Notifications
You must be signed in to change notification settings - Fork 751
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
Regression in +proj=merc with shifted central meridian #941
Comments
I would argue that this was a bug in PROJ 4.9.3. -70 deg and 290 deg are equivalent, e.g. sin(-70 deg) == sin(290 deg) and cos(-70 deg) == cos(290 deg). So of course you get the same result for both. If you add the
|
This sounds reasonable, but the real problem here is in backward compatibility. It may kick in various places. I will adopt to new behavior though, so feel free to close the issue if you believe it is not a problem. Thank you, |
Following on from the conversation in #985, and given the example above, wouldn't it be consistent for the following example to produce the same result without the
This is indicating that the |
Really it is just indicating that a map has two edges and that you can control which on a coordinate end up at. As you can see from the output below it is nothing new. Adding
|
The actual problem here is that proj 5 is not a drop-in replacement for proj 4. This change in behavior is breaking and should be listed somewhere as an incompatibility (or am I just missed it?). |
It isn't listed anywhere, no. This was a bug that was fixed as part of major refactoring where the projection logic was adapted to fit in a more generic transformation setting. As such this change was never planned, but a consequence of re-doing the logic and it was first discovered after release. I don't think we were aware that the original behaviour was ill-defined before this issue was created. As you may know, PROJ has historically been badly documented and has had a similarly bad test-suite. Many of these problems may have slipped by unnoticed. Hence why it isn't mentioned in the release notes. I can do that retro-actively if you think it is beneficial. |
Please mention it somewhere (eqdc and merc are affected, maybe others). I am not arguing it was a bug which was fixed, that's all right, but taking in account a long history of PROJ a lot of software depends on it and its bugs. Any additional info could save some time to people involved. Thanks! |
I'll do that. No one reads release notes so maybe there's a better place to put. Any suggestions?
More or less all projections, apart from a few odd ones that override longitude wrapping. |
Another possibility is to have a Backward incompatibility/behaviour changes page where we list for each release such changes |
Good idea. In what chapter of the docs do you suggest to put such a page? |
Might make sense are a sub-chapter of https://proj4.org/download.html |
Yeah, the migration page would likely be missed by non-API users of PROJ. Download section might work. Alternatively as a section under "Using PROJ" called "Differences between versions" or something like that? |
Looks good. And a link pointing to that section designed in the same way as "Attention!" blocks pointing to API changes. When the one opens https://proj4.org there are those API warnings and there should be additional one "See the 'Differences between versions' section". |
See #1012 |
Following on from my comment, I figured I must be confused with the description. Hopefully this analysis is helpful to others, but I compared the results of proj v4 & v5 with and without over for the two different rotations (i.e. with and without In all cases, I'm calling proj v4 and v5 with exactly the same arguments, with v5 immediately following v4 calls:
Adding the
However, for the
There is no magic "+over" functionality like there was for a standard
In summary, there seems to be special treatment when Use |
Hi,
It seems that proj 5 has a regression when computing Mercator projection with non-default +lat_0 option. Lets try the forward transform of the equatorial points with left- and rightmost longitudes:
Seems to be Ok and it works the same way using the proj 4.9.3 and the latest one.
Now let's shift the central meridian with the +lat_0 option. proj 5 gives the following:
which seems to be wrong. The proj 4.9.3 produces correct result:
It seems to be related to much more complicated logic of projection parameter preparation in pj_fwd.c but I am failing to find where it goes wrong.
Best regards,
Andrey
The text was updated successfully, but these errors were encountered: