diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2017-09-13 11:57:03 +0200 |
|---|---|---|
| committer | Kristian Evers <kristianevers@gmail.com> | 2017-09-13 11:57:03 +0200 |
| commit | fe86f34556dfc4613347c41bb14e8ac025282627 (patch) | |
| tree | 3b065e78096e212d5f78adf5e5cb80fe364618d5 /src | |
| parent | 2edafb2504e3b20da6033e4a396636cfe22942f2 (diff) | |
| download | PROJ-fe86f34556dfc4613347c41bb14e8ac025282627.tar.gz PROJ-fe86f34556dfc4613347c41bb14e8ac025282627.zip | |
Add typedef for transformation direction enum
Diffstat (limited to 'src')
| -rw-r--r-- | src/PJ_horner.c | 6 | ||||
| -rw-r--r-- | src/pj_obs_api.c | 12 | ||||
| -rw-r--r-- | src/proj.h | 16 |
3 files changed, 17 insertions, 17 deletions
diff --git a/src/PJ_horner.c b/src/PJ_horner.c index c6560d3a..43fe1896 100644 --- a/src/PJ_horner.c +++ b/src/PJ_horner.c @@ -94,7 +94,7 @@ PROJ_HEAD(horner, "Horner polynomial evaluation"); struct horner; typedef struct horner HORNER; -static UV horner (const HORNER *transformation, enum proj_direction, UV position); +static UV horner (const HORNER *transformation, PJ_DIRECTION direction, UV position); static HORNER *horner_alloc (size_t order, int complex_polynomia); static void horner_free (HORNER *h); @@ -178,7 +178,7 @@ static HORNER *horner_alloc (size_t order, int complex_polynomia) { /**********************************************************************/ -static UV horner (const HORNER *transformation, enum proj_direction direction, UV position) { +static UV horner (const HORNER *transformation, PJ_DIRECTION direction, UV position) { /*********************************************************************** A reimplementation of the classic Engsager/Poder 2D Horner polynomial @@ -303,7 +303,7 @@ static PJ_OBS horner_reverse_obs (PJ_OBS point, PJ *P) { /**********************************************************************/ -static UV complex_horner (const HORNER *transformation, enum proj_direction direction, UV position) { +static UV complex_horner (const HORNER *transformation, PJ_DIRECTION direction, UV position) { /*********************************************************************** A reimplementation of a classic Engsager/Poder Horner complex diff --git a/src/pj_obs_api.c b/src/pj_obs_api.c index b2929a07..90269764 100644 --- a/src/pj_obs_api.c +++ b/src/pj_obs_api.c @@ -90,7 +90,7 @@ double proj_xyz_dist (XYZ a, XYZ b) { /* Measure numerical deviation after n roundtrips fwd-inv (or inv-fwd) */ -double proj_roundtrip (PJ *P, enum proj_direction direction, int n, PJ_OBS obs) { +double proj_roundtrip (PJ *P, PJ_DIRECTION direction, int n, PJ_OBS obs) { int i; PJ_OBS o, u; @@ -125,7 +125,7 @@ double proj_roundtrip (PJ *P, enum proj_direction direction, int n, PJ_OBS obs) /* Apply the transformation P to the coordinate coo */ -PJ_OBS proj_trans_obs (PJ *P, enum proj_direction direction, PJ_OBS obs) { +PJ_OBS proj_trans_obs (PJ *P, PJ_DIRECTION direction, PJ_OBS obs) { if (0==P) return obs; @@ -147,7 +147,7 @@ PJ_OBS proj_trans_obs (PJ *P, enum proj_direction direction, PJ_OBS obs) { /* Apply the transformation P to the coordinate coo */ -PJ_COORD proj_trans_coord (PJ *P, enum proj_direction direction, PJ_COORD coo) { +PJ_COORD proj_trans_coord (PJ *P, PJ_DIRECTION direction, PJ_COORD coo) { if (0==P) return coo; @@ -171,7 +171,7 @@ PJ_COORD proj_trans_coord (PJ *P, enum proj_direction direction, PJ_COORD coo) { /*************************************************************************************/ size_t proj_transform ( PJ *P, - enum proj_direction direction, + PJ_DIRECTION direction, double *x, size_t sx, size_t nx, double *y, size_t sy, size_t ny, double *z, size_t sz, size_t nz, @@ -319,7 +319,7 @@ size_t proj_transform ( } /*****************************************************************************/ -int proj_transform_obs (PJ *P, enum proj_direction direction, size_t n, PJ_OBS *obs) { +int proj_transform_obs (PJ *P, PJ_DIRECTION direction, size_t n, PJ_OBS *obs) { /****************************************************************************** Batch transform an array of PJ_OBS. @@ -337,7 +337,7 @@ int proj_transform_obs (PJ *P, enum proj_direction direction, size_t n, PJ_OBS * } /*****************************************************************************/ -int proj_transform_coord (PJ *P, enum proj_direction direction, size_t n, PJ_COORD *coord) { +int proj_transform_coord (PJ *P, PJ_DIRECTION direction, size_t n, PJ_COORD *coord) { /****************************************************************************** Batch transform an array of PJ_COORD. @@ -367,35 +367,35 @@ PJ *proj_destroy (PJ *P); /* Apply transformation to observation - in forward or inverse direction */ -enum proj_direction { +enum PJ_DIRECTION { PJ_FWD = 1, /* Forward */ PJ_IDENT = 0, /* Do nothing */ PJ_INV = -1 /* Inverse */ }; +typedef enum PJ_DIRECTION PJ_DIRECTION; - -PJ_OBS proj_trans_obs (PJ *P, enum proj_direction direction, PJ_OBS obs); -PJ_COORD proj_trans_coord (PJ *P, enum proj_direction direction, PJ_COORD coord); +PJ_OBS proj_trans_obs (PJ *P, PJ_DIRECTION direction, PJ_OBS obs); +PJ_COORD proj_trans_coord (PJ *P, PJ_DIRECTION direction, PJ_COORD coord); size_t proj_transform ( PJ *P, - enum proj_direction direction, + PJ_DIRECTION direction, double *x, size_t sx, size_t nx, double *y, size_t sy, size_t ny, double *z, size_t sz, size_t nz, double *t, size_t st, size_t nt ); -int proj_transform_obs (PJ *P, enum proj_direction direction, size_t n, PJ_OBS *obs); -int proj_transform_coord (PJ *P, enum proj_direction direction, size_t n, PJ_COORD *coord); +int proj_transform_obs (PJ *P, PJ_DIRECTION direction, size_t n, PJ_OBS *obs); +int proj_transform_coord (PJ *P, PJ_DIRECTION direction, size_t n, PJ_COORD *coord); /* Initializers */ PJ_COORD proj_coord (double x, double y, double z, double t); PJ_OBS proj_obs (double x, double y, double z, double t, double o, double p, double k, int id, unsigned int flags); /* Measure internal consistency - in forward or inverse direction */ -double proj_roundtrip (PJ *P, enum proj_direction direction, int n, PJ_OBS obs); +double proj_roundtrip (PJ *P, PJ_DIRECTION direction, int n, PJ_OBS obs); /* Geodesic distance between two points with angular 2D coordinates */ double proj_lp_dist (PJ *P, LP a, LP b); |
