aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2018-01-10 00:25:10 +0100
committerGitHub <noreply@github.com>2018-01-10 00:25:10 +0100
commitec0fd9c68d24eb18f7352e822329069454892f90 (patch)
tree26ab0a734bde1f8f90cd370914be91bb97756c22
parent12c502d09f7cd06afc48dee7f1a064f40d99900c (diff)
parentf7a1fe14454b091eecb5fd3e33ff73796a726da1 (diff)
downloadPROJ-ec0fd9c68d24eb18f7352e822329069454892f90.tar.gz
PROJ-ec0fd9c68d24eb18f7352e822329069454892f90.zip
Merge pull request #734 from aaronpuchert/remove-unused-macros
Remove or use unused macros
-rw-r--r--src/PJ_aitoff.c2
-rw-r--r--src/PJ_boggs.c1
-rw-r--r--src/PJ_cass.c1
-rw-r--r--src/PJ_eck4.c4
-rw-r--r--src/PJ_isea.c10
-rw-r--r--src/PJ_laea.c2
-rw-r--r--src/PJ_sterea.c2
-rw-r--r--src/PJ_vandg.c1
-rw-r--r--src/aasincos.c1
-rw-r--r--src/gen_cheb.c4
-rw-r--r--src/gie.c3
-rw-r--r--src/proj_etmerc.c1
-rw-r--r--src/proj_mdist.c2
13 files changed, 7 insertions, 27 deletions
diff --git a/src/PJ_aitoff.c b/src/PJ_aitoff.c
index 8927d39c..c4a5abdc 100644
--- a/src/PJ_aitoff.c
+++ b/src/PJ_aitoff.c
@@ -141,7 +141,7 @@ static LP s_inverse (XY xy, PJ *P) { /* Spheroidal, inverse */
y *= D * sin(lp.phi);
} else
x = y = 0.;
- if (Q->mode) { /* Winkel Tripel */
+ if (Q->mode == WINKEL_TRIPEL) {
x = (x + lp.lam * Q->cosphi1) * 0.5;
y = (y + lp.phi) * 0.5;
}
diff --git a/src/PJ_boggs.c b/src/PJ_boggs.c
index fe17eaa6..93de0679 100644
--- a/src/PJ_boggs.c
+++ b/src/PJ_boggs.c
@@ -4,7 +4,6 @@
PROJ_HEAD(boggs, "Boggs Eumorphic") "\n\tPCyl., no inv., Sph.";
# define NITER 20
# define EPS 1e-7
-# define ONETOL 1.000001
# define FXC 2.00276
# define FXC2 1.11072
# define FYC 0.49931
diff --git a/src/PJ_cass.c b/src/PJ_cass.c
index ddb3eaf3..acf779a1 100644
--- a/src/PJ_cass.c
+++ b/src/PJ_cass.c
@@ -4,7 +4,6 @@
PROJ_HEAD(cass, "Cassini") "\n\tCyl, Sph&Ell";
-# define EPS10 1e-10
# define C1 .16666666666666666666
# define C2 .00833333333333333333
# define C3 .04166666666666666666
diff --git a/src/PJ_eck4.c b/src/PJ_eck4.c
index c3e1b677..a95c10b5 100644
--- a/src/PJ_eck4.c
+++ b/src/PJ_eck4.c
@@ -44,9 +44,9 @@ static LP s_inverse (XY xy, PJ *P) { /* Spheroidal, inverse */
LP lp = {0.0,0.0};
double c;
- lp.phi = aasin(P->ctx,xy.y / C_y);
+ lp.phi = aasin(P->ctx,xy.y * RC_y);
lp.lam = xy.x / (C_x * (1. + (c = cos(lp.phi))));
- lp.phi = aasin(P->ctx,(lp.phi + sin(lp.phi) * (c + 2.)) / C_p);
+ lp.phi = aasin(P->ctx,(lp.phi + sin(lp.phi) * (c + 2.)) * RC_p);
return lp;
}
diff --git a/src/PJ_isea.c b/src/PJ_isea.c
index 9baea8b5..5cc71c08 100644
--- a/src/PJ_isea.c
+++ b/src/PJ_isea.c
@@ -170,10 +170,6 @@ struct snyder_constants constants[] = {
{37.37736814, 36.0, 30.0, 17.27, 1.163, 0.860, 13.14, 1.584, 1.0},
};
-#define E 52.62263186
-#define F 10.81231696
-
-#define DEG60 1.04719755119659774614
#define DEG120 2.09439510239319549229
#define DEG72 1.25663706143591729537
#define DEG90 1.57079632679489661922
@@ -266,14 +262,12 @@ az_adjustment(int triangle)
/* H = 0.25 R tan g = */
#define TABLE_H 0.1909830056
-#define RPRIME 0.91038328153090290025
-
ISEA_STATIC
struct isea_pt
isea_triangle_xy(int triangle)
{
struct isea_pt c;
- double Rprime = 0.91038328153090290025;
+ const double Rprime = 0.91038328153090290025;
triangle = (triangle - 1) % 20;
@@ -509,8 +503,6 @@ isea_snyder_forward(struct isea_geo * ll, struct isea_pt * out)
* in original coordinate system, this function return the new coordinates.
*/
-#define PRECISION 0.0000000000005
-
/* formula from Snyder, Map Projections: A working manual, p31 */
/*
* old north pole at np in new coordinates
diff --git a/src/PJ_laea.c b/src/PJ_laea.c
index 82a341d8..9edd5558 100644
--- a/src/PJ_laea.c
+++ b/src/PJ_laea.c
@@ -26,8 +26,6 @@ struct pj_opaque {
};
#define EPS10 1.e-10
-#define NITER 20
-#define CONV 1.e-10
static XY e_forward (LP lp, PJ *P) { /* Ellipsoidal, forward */
XY xy = {0.0,0.0};
diff --git a/src/PJ_sterea.c b/src/PJ_sterea.c
index 38b26117..b1cb736a 100644
--- a/src/PJ_sterea.c
+++ b/src/PJ_sterea.c
@@ -37,8 +37,6 @@ struct pj_opaque {
PROJ_HEAD(sterea, "Oblique Stereographic Alternative") "\n\tAzimuthal, Sph&Ell";
-# define DEL_TOL 1.e-14
-# define MAX_ITER 10
diff --git a/src/PJ_vandg.c b/src/PJ_vandg.c
index b6b84bd0..d4ed7b8a 100644
--- a/src/PJ_vandg.c
+++ b/src/PJ_vandg.c
@@ -6,7 +6,6 @@ PROJ_HEAD(vandg, "van der Grinten (I)") "\n\tMisc Sph";
# define TOL 1.e-10
# define THIRD .33333333333333333333
-# define TWO_THRD .66666666666666666666
# define C2_27 .07407407407407407407
# define PI4_3 4.18879020478639098458
# define PISQ 9.86960440108935861869
diff --git a/src/aasincos.c b/src/aasincos.c
index 7cb6bd89..7d49ac1a 100644
--- a/src/aasincos.c
+++ b/src/aasincos.c
@@ -1,7 +1,6 @@
/* arc sin, cosine, tan2 and sqrt that will NOT fail */
#include <projects.h>
#define ONE_TOL 1.00000000000001
-#define TOL 0.000000001
#define ATOL 1e-50
double
diff --git a/src/gen_cheb.c b/src/gen_cheb.c
index 9b2d8cb3..351d9604 100644
--- a/src/gen_cheb.c
+++ b/src/gen_cheb.c
@@ -6,7 +6,7 @@
#include <errno.h>
#include "emess.h"
#ifndef COEF_LINE_MAX
-#define COEF_LINE_MAX 60
+#define COEF_LINE_MAX 50
#endif
/* FIXME: put the declaration in a header. Also used in proj.c */
@@ -43,7 +43,7 @@ void gen_cheb(int inverse, projUV (*proj)(projUV), char *s, PJ *P,
if (*arg != '+') {
if (!n) { putchar('#'); ++n; }
(void)printf(" %s%n",arg, &L);
- if ((n += L) > 50) { putchar('\n'); n = 0; }
+ if ((n += L) > COEF_LINE_MAX) { putchar('\n'); n = 0; }
}
}
if (n) putchar('\n');
diff --git a/src/gie.c b/src/gie.c
index e37acf62..e0045ebd 100644
--- a/src/gie.c
+++ b/src/gie.c
@@ -198,9 +198,6 @@ static gie_ctx T;
static const char delim[] = {"-------------------------------------------------------------------------------\n"};
-#define CMDLEN 250000
-
-
static const char usage[] = {
"--------------------------------------------------------------------------------\n"
"Usage: %s [-options]... infile...\n"
diff --git a/src/proj_etmerc.c b/src/proj_etmerc.c
index b03862f8..67da4981 100644
--- a/src/proj_etmerc.c
+++ b/src/proj_etmerc.c
@@ -39,7 +39,6 @@
*/
-#define PROJ_LIB__
#define PJ_LIB__
#include <errno.h>
diff --git a/src/proj_mdist.c b/src/proj_mdist.c
index 5f7458b5..24957895 100644
--- a/src/proj_mdist.c
+++ b/src/proj_mdist.c
@@ -27,7 +27,7 @@
** and inverse on unit ellipsoid.
** Precision commensurate with double precision.
*/
-#define PROJ_LIB__
+#define PJ_LIB__
#include <projects.h>
#define MAX_ITER 20
#define TOL 1e-14