Skip to content

Commit 55a22c9

Browse files
committed
Add code comment about likely domain of validity for wintri in +over mode
Capitalizes on investigation done in https://lists.osgeo.org/pipermail/gdal-dev/2023-April/057164.html
1 parent 653a94b commit 55a22c9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/projections/aitoff.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ static PJ_XY aitoff_s_forward(PJ_LP lp, PJ *P) { /* Spheroidal, forward */
5959
struct pj_opaque *Q = static_cast<struct pj_opaque *>(P->opaque);
6060
double c, d;
6161

62+
#if 0
63+
// Likely domain of validity for wintri in +over mode. Should be confirmed
64+
// Cf https://lists.osgeo.org/pipermail/gdal-dev/2023-April/057164.html
65+
if (Q->mode == WINKEL_TRIPEL && fabs(lp.lam) > 2 * M_PI) {
66+
proj_errno_set(P, PROJ_ERR_COORD_TRANSFM_OUTSIDE_PROJECTION_DOMAIN);
67+
return xy;
68+
}
69+
#endif
6270
c = 0.5 * lp.lam;
6371
d = acos(cos(lp.phi) * cos(c));
6472
if (d != 0.0) { /* basic Aitoff */

0 commit comments

Comments
 (0)