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
chamb
projects control points incorrectly
#1666
Comments
I think this might be a more pervasive issue? See the below Python script (it uses
|
I don't think the issue is in PROJ. At least for your use case. The order of control points seem to matter. If you use the one given by https://en.wikipedia.org/wiki/Chamberlin_trimetric_projection, then you should use |
This projection does work correctly if the control points are given in clockwise order: the initial problem I had with the control points themselves being projected strangely also goes away. Nowhere in the documentation on proj.org, either on the page for the chamb projection or elsewhere on the site, is it indicated that clockwise would be the correct orientation for the control points. I'm not sure whether clockwise or counterclockwise is more prevalent as the "usual" orientation: I notice that the area calculation in the geodesic calculations uses counterclockwise triangles, and another OSGeo project GEOS seems to prefer counterclockwise. I would suggest one or more of the following:
Not sure which solution would be best. |
This is the correct way to deal with this issue. The projection has been part of PROJ for close to an eternity and we shouldn't change the behaviour unless it is proven to be incorrect. It would be very helpful if you can open a pull request with your suggestion to improvements of the docs. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
The projected value of the control points calculated by the
chamb
projection can be wildly different from nearby points. This seems to only happen at exactly the control points. It is more noticeable when the control points are more widely spaced: with the points used in the docs, the deviation is smaller. See the example below, based on the control points 22°N 0°, 22°N 45°E, 22°S, 22.5°E (as in the Wikipedia article) and points offset from those by +/- 1° in latitude or longitude. You can see just by looking at the numeric values that the projected value at those points is off by a factor of 2 or more compared to nearby points. I've observed this on Mac OS X and Windows 7, both with PROJ version 6.2.0.Points written to a file called
projchamtest.txt
:And its transformation:
The text was updated successfully, but these errors were encountered: