aboutsummaryrefslogtreecommitdiff
path: root/src/projections/adams.cpp
AgeCommit message (Collapse)Author
2022-01-09peirce_q: add inversion of +shape=square and diamond through generic ↵Even Rouault
inversion method
2022-01-07peirce_q: rename +type parameter wrongly introduced in 8.2.1 to +shape ↵Even Rouault
(fixes #3011)
2021-12-20Fix and additional options for Peirce Quincuncial projections (#2978)Toby C. Wilkinson
This fixes the current forward implementation of Peirce Quincuncial proj to correctly flip/reflect out the southern hemisphere to four triangles, and rotate entire result to a square or diamond. (It there resolves the issues identified with pull request https://github.com/OSGeo/PROJ/pull/2230 , where southern hemisphere was wrongly projected over northern, and reverses the restriction to northern hemisphere introduced there). It also adds additional lateral projection of the hemispheres. - This PR adds an optional parameter `+type` which allows selection of projection. The `+type=square` and `+type=diamond` types match in principle ESRI's twin implementations of square and diamond PQ projs. The **default** if not specified is `+type=diamond`. - The previous behaviour restricted to the northern hemisphere can be reproduced using the `+type=nhemisphere`, though this is an edge case only. - An additional `+type=horizontal` and `+type=vertical` rectangular lateral versions have been added that place each hemisphere side-by-side. This is primarily to allow creation of projections such as Greiger Triptychial, which also require the additional optional params `scrollx` or `scrolly` in order to shift parts of the projection from one side of the map to the other. - Additional documentation has been added to proj description, including quoting the usual meridian used in common usage of projection, and images showing the different types.
2020-12-15Remap ENOMEM from PROJ_ERR_INVALID_OP to PROJ_ERR_OTHEREven Rouault
2020-12-15Revise error codes to have a reduced set exposed in the public API.Even Rouault
Fixes #2482 And also add proj_context_errno_string() Revise gie 'expect failure errno XXXX' strings
2020-11-20Remove old pj_ memory (de)allocation functionsKristian Evers
Gone are pj_malloc, pj_calloc, pj_dalloc and pj_dealloc. Their primary function as API memory functions in proj_api.h is no longer there and the other use as a workaround for old errno problems is no longer valid either. Replaced with malloc and free across the codebase.
2020-05-28Implement wink2 inverse by generic inversion of forward methodEven Rouault
- Move the generic method initiated from adams_ws2 to a pj_generic_inverse_2d() method - Use it in adams_ws2 - Use it in wink2 Fixes https://github.com/qgis/QGIS/issues/35512
2020-05-16peirce_q: limit input to positive latitudesEven Rouault
Otherwise it returns junk (negative latitudes are mapped to the same location as positive latitudes) I'm a bit confused by PROJ peirce_q implementation. Looking at the projection of the world, it looks like this matches the diamond formulation of the right map shown at https://desktop.arcgis.com/en/arcmap/latest/map/projections/peirce-quincuncial.htm, but limited to the inner square of this diamond (which corresponds to the northern hemisphere). We lack the 4 triangles on left, top, right and bottom for the southern hemisphere. Furthermore, this formulation of peirce_q does not seem to have the quincuncial property of the square formulation (left images of the above ESRI doc), or the one at https://en.wikipedia.org/wiki/Peirce_quincuncial_projection ...
2020-04-21Typo fixes in code comments [ci skip]Even Rouault
2020-04-16Implement an iterative inverse method for +proj=adams_ws2Even Rouault
2020-04-15Add square conformal projections from libprojectKristian Evers
This commit adds five new projections to PROJ: adams_hemi: Adams Hemisphere in a Square adams_wsI: Adams World in a Square I adams_wsII: Adams World in a Square II guyou: Guyou peirce_q: Pierce Quincuncial The code originates from Gerry Evendens libproject and has been adapted to work with modern PROJ. To ensure that the modified code works as intended extensive test data has been created using libproject and sproj so that no errors occured when porting from libproject to PROJ. The test data is wrapped in a gie files. All test cases reproduce results from libproject at the mm level.