aboutsummaryrefslogtreecommitdiff
path: root/src/projections
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2020-11-17 12:54:24 +0100
committerKristian Evers <kristianevers@gmail.com>2020-11-20 16:40:40 +0100
commita74b985b5006c2d279353a245cfcb850cf7fcc94 (patch)
tree0f71f55671b6014893df2d0bf61804bcbbdc9c8c /src/projections
parent7f79fe7325a74d2a9eac93d7081a107ae54bb877 (diff)
downloadPROJ-a74b985b5006c2d279353a245cfcb850cf7fcc94.tar.gz
PROJ-a74b985b5006c2d279353a245cfcb850cf7fcc94.zip
Remove pj_ctx_* functions and use their proj_context counterparts
Diffstat (limited to 'src/projections')
-rw-r--r--src/projections/aitoff.cpp2
-rw-r--r--src/projections/comill.cpp2
-rw-r--r--src/projections/eqearth.cpp2
-rw-r--r--src/projections/healpix.cpp8
-rw-r--r--src/projections/krovak.cpp2
-rw-r--r--src/projections/natearth.cpp2
-rw-r--r--src/projections/natearth2.cpp2
-rw-r--r--src/projections/ortho.cpp2
-rw-r--r--src/projections/patterson.cpp2
-rw-r--r--src/projections/robin.cpp2
-rw-r--r--src/projections/tmerc.cpp6
11 files changed, 16 insertions, 16 deletions
diff --git a/src/projections/aitoff.cpp b/src/projections/aitoff.cpp
index 7920309c..d02e7761 100644
--- a/src/projections/aitoff.cpp
+++ b/src/projections/aitoff.cpp
@@ -170,7 +170,7 @@ static PJ_LP aitoff_s_inverse (PJ_XY xy, PJ *P) { /* Spheroidal, inver
if (iter == MAXITER && round == MAXROUND)
{
- pj_ctx_set_errno( P->ctx, PJD_ERR_NON_CONVERGENT );
+ proj_context_errno_set( P->ctx, PJD_ERR_NON_CONVERGENT );
/* fprintf(stderr, "Warning: Accuracy of 1e-12 not reached. Last increments: dlat=%e and dlon=%e\n", dp, dl); */
}
diff --git a/src/projections/comill.cpp b/src/projections/comill.cpp
index 189e583e..44524990 100644
--- a/src/projections/comill.cpp
+++ b/src/projections/comill.cpp
@@ -66,7 +66,7 @@ static PJ_LP comill_s_inverse (PJ_XY xy, PJ *P) { /* Spheroidal, inver
}
}
if( i == 0 )
- pj_ctx_set_errno( P->ctx, PJD_ERR_NON_CONVERGENT );
+ proj_context_errno_set( P->ctx, PJD_ERR_NON_CONVERGENT );
lp.phi = yc;
/* longitude */
diff --git a/src/projections/eqearth.cpp b/src/projections/eqearth.cpp
index 832c9444..60effde0 100644
--- a/src/projections/eqearth.cpp
+++ b/src/projections/eqearth.cpp
@@ -110,7 +110,7 @@ static PJ_LP eqearth_e_inverse (PJ_XY xy, PJ *P) { /* Ellipsoidal/sphe
}
if( i == 0 ) {
- pj_ctx_set_errno( P->ctx, PJD_ERR_NON_CONVERGENT );
+ proj_context_errno_set( P->ctx, PJD_ERR_NON_CONVERGENT );
return lp;
}
diff --git a/src/projections/healpix.cpp b/src/projections/healpix.cpp
index aab5c41e..5a06125d 100644
--- a/src/projections/healpix.cpp
+++ b/src/projections/healpix.cpp
@@ -524,7 +524,7 @@ static PJ_LP s_healpix_inverse(PJ_XY xy, PJ *P) { /* sphere */
PJ_LP lp;
lp.lam = HUGE_VAL;
lp.phi = HUGE_VAL;
- pj_ctx_set_errno(P->ctx, PJD_ERR_INVALID_X_OR_Y);
+ proj_context_errno_set(P->ctx, PJD_ERR_INVALID_X_OR_Y);
return lp;
}
return healpix_spherhealpix_e_inverse(xy);
@@ -540,7 +540,7 @@ static PJ_LP e_healpix_inverse(PJ_XY xy, PJ *P) { /* ellipsoid */
if (in_image(xy.x, xy.y, 0, 0, 0) == 0) {
lp.lam = HUGE_VAL;
lp.phi = HUGE_VAL;
- pj_ctx_set_errno(P->ctx, PJD_ERR_INVALID_X_OR_Y);
+ proj_context_errno_set(P->ctx, PJD_ERR_INVALID_X_OR_Y);
return lp;
}
lp = healpix_spherhealpix_e_inverse(xy);
@@ -574,7 +574,7 @@ static PJ_LP s_rhealpix_inverse(PJ_XY xy, PJ *P) { /* sphere */
PJ_LP lp;
lp.lam = HUGE_VAL;
lp.phi = HUGE_VAL;
- pj_ctx_set_errno(P->ctx, PJD_ERR_INVALID_X_OR_Y);
+ proj_context_errno_set(P->ctx, PJD_ERR_INVALID_X_OR_Y);
return lp;
}
xy = combine_caps(xy.x, xy.y, Q->north_square, Q->south_square, 1);
@@ -590,7 +590,7 @@ static PJ_LP e_rhealpix_inverse(PJ_XY xy, PJ *P) { /* ellipsoid */
if (in_image(xy.x, xy.y, 1, Q->north_square, Q->south_square) == 0) {
lp.lam = HUGE_VAL;
lp.phi = HUGE_VAL;
- pj_ctx_set_errno(P->ctx, PJD_ERR_INVALID_X_OR_Y);
+ proj_context_errno_set(P->ctx, PJD_ERR_INVALID_X_OR_Y);
return lp;
}
xy = combine_caps(xy.x, xy.y, Q->north_square, Q->south_square, 1);
diff --git a/src/projections/krovak.cpp b/src/projections/krovak.cpp
index aef44d42..3e6a5c30 100644
--- a/src/projections/krovak.cpp
+++ b/src/projections/krovak.cpp
@@ -181,7 +181,7 @@ static PJ_LP krovak_e_inverse (PJ_XY xy, PJ *P) { /* Ellipsoidal,
fi1 = lp.phi;
}
if( i == 0 )
- pj_ctx_set_errno( P->ctx, PJD_ERR_NON_CONVERGENT );
+ proj_context_errno_set( P->ctx, PJD_ERR_NON_CONVERGENT );
lp.lam -= P->lam0;
diff --git a/src/projections/natearth.cpp b/src/projections/natearth.cpp
index 5c096605..e1f71089 100644
--- a/src/projections/natearth.cpp
+++ b/src/projections/natearth.cpp
@@ -82,7 +82,7 @@ static PJ_LP natearth_s_inverse (PJ_XY xy, PJ *P) { /* Spheroidal, inv
}
}
if( i == 0 )
- pj_ctx_set_errno( P->ctx, PJD_ERR_NON_CONVERGENT );
+ proj_context_errno_set( P->ctx, PJD_ERR_NON_CONVERGENT );
lp.phi = yc;
/* longitude */
diff --git a/src/projections/natearth2.cpp b/src/projections/natearth2.cpp
index d149ca85..e4516a0a 100644
--- a/src/projections/natearth2.cpp
+++ b/src/projections/natearth2.cpp
@@ -76,7 +76,7 @@ static PJ_LP natearth2_s_inverse (PJ_XY xy, PJ *P) { /* Spheroidal, in
}
}
if( i == 0 )
- pj_ctx_set_errno( P->ctx, PJD_ERR_NON_CONVERGENT );
+ proj_context_errno_set( P->ctx, PJD_ERR_NON_CONVERGENT );
lp.phi = yc;
/* longitude */
diff --git a/src/projections/ortho.cpp b/src/projections/ortho.cpp
index 8dcfb53c..d9c84dba 100644
--- a/src/projections/ortho.cpp
+++ b/src/projections/ortho.cpp
@@ -273,7 +273,7 @@ static PJ_LP ortho_e_inverse (PJ_XY xy, PJ *P) { /* Ellipsoidal, inver
return lp;
}
}
- pj_ctx_set_errno(P->ctx, PJD_ERR_NON_CONVERGENT);
+ proj_context_errno_set(P->ctx, PJD_ERR_NON_CONVERGENT);
return lp;
}
diff --git a/src/projections/patterson.cpp b/src/projections/patterson.cpp
index 71099cdb..32544580 100644
--- a/src/projections/patterson.cpp
+++ b/src/projections/patterson.cpp
@@ -100,7 +100,7 @@ static PJ_LP patterson_s_inverse (PJ_XY xy, PJ *P) { /* Spheroidal, in
}
}
if( i == 0 )
- pj_ctx_set_errno( P->ctx, PJD_ERR_NON_CONVERGENT );
+ proj_context_errno_set( P->ctx, PJD_ERR_NON_CONVERGENT );
lp.phi = yc;
/* longitude */
diff --git a/src/projections/robin.cpp b/src/projections/robin.cpp
index 8b646502..6a1405b6 100644
--- a/src/projections/robin.cpp
+++ b/src/projections/robin.cpp
@@ -138,7 +138,7 @@ static PJ_LP robin_s_inverse (PJ_XY xy, PJ *P) { /* Spheroidal, invers
break;
}
if( iters == 0 )
- pj_ctx_set_errno( P->ctx, PJD_ERR_NON_CONVERGENT );
+ proj_context_errno_set( P->ctx, PJD_ERR_NON_CONVERGENT );
lp.phi = (5 * i + t) * DEG_TO_RAD;
if (xy.y < 0.) lp.phi = -lp.phi;
lp.lam /= V(X[i], t);
diff --git a/src/projections/tmerc.cpp b/src/projections/tmerc.cpp
index 69f4d352..ff1bc2a5 100644
--- a/src/projections/tmerc.cpp
+++ b/src/projections/tmerc.cpp
@@ -89,7 +89,7 @@ static PJ_XY approx_e_fwd (PJ_LP lp, PJ *P)
if( lp.lam < -M_HALFPI || lp.lam > M_HALFPI ) {
xy.x = HUGE_VAL;
xy.y = HUGE_VAL;
- pj_ctx_set_errno( P->ctx, PJD_ERR_LAT_OR_LON_EXCEED_LIMIT );
+ proj_context_errno_set( P->ctx, PJD_ERR_LAT_OR_LON_EXCEED_LIMIT );
return xy;
}
@@ -130,7 +130,7 @@ static PJ_XY approx_s_fwd (PJ_LP lp, PJ *P) {
if( lp.lam < -M_HALFPI || lp.lam > M_HALFPI ) {
xy.x = HUGE_VAL;
xy.y = HUGE_VAL;
- pj_ctx_set_errno( P->ctx, PJD_ERR_LAT_OR_LON_EXCEED_LIMIT );
+ proj_context_errno_set( P->ctx, PJD_ERR_LAT_OR_LON_EXCEED_LIMIT );
return xy;
}
@@ -679,7 +679,7 @@ static bool getAlgoFromParams(PJ* P, TMercAlgo& algo)
else
{
pj_load_ini(P->ctx); // if not already done
- pj_ctx_set_errno(P->ctx, 0); // reset error in case proj.ini couldn't be found
+ proj_context_errno_set(P->ctx, 0); // reset error in case proj.ini couldn't be found
algo = P->ctx->defaultTmercAlgo;
}