diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2018-11-10 17:32:58 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-10 17:32:58 +0100 |
| commit | a22ed5d71dd514ca2dbf003e02cd57e7b77c749c (patch) | |
| tree | c540257c11eb9be28201940fe105b8c88460fd38 | |
| parent | 94c454012edcad7035a5531afb0529dc3b7e0812 (diff) | |
| parent | cd5df298e2205f04f8ea030ce7ffb8346f87b1ec (diff) | |
| download | PROJ-a22ed5d71dd514ca2dbf003e02cd57e7b77c749c.tar.gz PROJ-a22ed5d71dd514ca2dbf003e02cd57e7b77c749c.zip | |
Merge pull request #1170 from kbevers/geocentric-latitude
Remove proj_geocentric_latitude from public API
| -rw-r--r-- | docs/source/development/reference/functions.rst | 13 | ||||
| -rw-r--r-- | src/PJ_geoc.c | 5 | ||||
| -rw-r--r-- | src/pj_factors.c | 3 | ||||
| -rw-r--r-- | src/pj_fwd.c | 2 | ||||
| -rw-r--r-- | src/pj_inv.c | 2 | ||||
| -rw-r--r-- | src/proj.def | 1 | ||||
| -rw-r--r-- | src/proj.h | 3 | ||||
| -rw-r--r-- | src/proj_4D_api.c | 2 | ||||
| -rw-r--r-- | src/proj_internal.h | 3 |
9 files changed, 11 insertions, 23 deletions
diff --git a/docs/source/development/reference/functions.rst b/docs/source/development/reference/functions.rst index 688f6fac..fb29fd6c 100644 --- a/docs/source/development/reference/functions.rst +++ b/docs/source/development/reference/functions.rst @@ -551,19 +551,6 @@ Various :returns: :c:type:`char*` Pointer to output buffer (same as :c:data:`s`) -.. c:function:: PJ_COORD proj_geocentric_latitude(const PJ *P, PJ_DIRECTION direction, PJ_COORD coord) - - Convert from geographical latitude to geocentric latitude. - - :param `P`: Transformation object - :type `P`: const PJ* - :param `direction`: Starting direction of transformation - :type `direction`: PJ_DIRECTION - :param `coord`: Coordinate - :type `coord`: PJ_COORD - :returns: :c:type:`PJ_COORD` Converted coordinate - - .. c:function:: int proj_angular_input (PJ *P, enum PJ_DIRECTION dir) Check if a operation expects angular input. diff --git a/src/PJ_geoc.c b/src/PJ_geoc.c index bed0db49..0455fada 100644 --- a/src/PJ_geoc.c +++ b/src/PJ_geoc.c @@ -31,18 +31,19 @@ #include <math.h> #include "proj.h" +#include "proj_internal.h" #include "projects.h" PROJ_HEAD(geoc, "Geocentric Latitude"); /* Geographical to geocentric */ static PJ_COORD forward(PJ_COORD coo, PJ *P) { - return proj_geocentric_latitude (P, PJ_FWD, coo); + return pj_geocentric_latitude (P, PJ_FWD, coo); } /* Geocentric to geographical */ static PJ_COORD inverse(PJ_COORD coo, PJ *P) { - return proj_geocentric_latitude (P, PJ_INV, coo); + return pj_geocentric_latitude (P, PJ_INV, coo); } diff --git a/src/pj_factors.c b/src/pj_factors.c index 373bd743..e4b871a1 100644 --- a/src/pj_factors.c +++ b/src/pj_factors.c @@ -1,6 +1,7 @@ /* projection scale factors */ #define PJ_LIB__ #include "proj.h" +#include "proj_internal.h" #include "proj_math.h" #include "projects.h" @@ -48,7 +49,7 @@ int pj_factors(LP lp, const PJ *P, double h, struct FACTORS *fac) { /* If input latitudes are geocentric, convert to geographic */ if (P->geoc) - lp = proj_geocentric_latitude (P, PJ_INV, coo).lp; + lp = pj_geocentric_latitude (P, PJ_INV, coo).lp; /* If latitude + one step overshoots the pole, move it slightly inside, */ /* so the numerical derivative still exists */ diff --git a/src/pj_fwd.c b/src/pj_fwd.c index 4bb5fbb0..1a970374 100644 --- a/src/pj_fwd.c +++ b/src/pj_fwd.c @@ -66,7 +66,7 @@ static PJ_COORD fwd_prepare (PJ *P, PJ_COORD coo) { /* If input latitude is geocentrical, convert to geographical */ if (P->geoc) - coo = proj_geocentric_latitude (P, PJ_INV, coo); + coo = pj_geocentric_latitude (P, PJ_INV, coo); /* Ensure longitude is in the -pi:pi range */ if (0==P->over) diff --git a/src/pj_inv.c b/src/pj_inv.c index e5cd3f7c..aaa8fea9 100644 --- a/src/pj_inv.c +++ b/src/pj_inv.c @@ -125,7 +125,7 @@ static PJ_COORD inv_finalize (PJ *P, PJ_COORD coo) { /* If input latitude was geocentrical, convert back to geocentrical */ if (P->geoc) - coo = proj_geocentric_latitude (P, PJ_FWD, coo); + coo = pj_geocentric_latitude (P, PJ_FWD, coo); } return coo; diff --git a/src/proj.def b/src/proj.def index cbd00b54..80db7d25 100644 --- a/src/proj.def +++ b/src/proj.def @@ -135,7 +135,6 @@ EXPORTS proj_torad @128 proj_todeg @129 - proj_geocentric_latitude @130 proj_rtodms @131 proj_dmstor @132 @@ -404,9 +404,6 @@ const PJ_PRIME_MERIDIANS *proj_list_prime_meridians(void); double proj_torad (double angle_in_degrees); double proj_todeg (double angle_in_radians); -/* Geographical to geocentric latitude - another of the "simple, but useful" */ -PJ_COORD proj_geocentric_latitude (const PJ *P, PJ_DIRECTION direction, PJ_COORD coord); - double proj_dmstor(const char *is, char **rs); char* proj_rtodms(char *s, double r, int pos, int neg); diff --git a/src/proj_4D_api.c b/src/proj_4D_api.c index 81967a1d..56694aae 100644 --- a/src/proj_4D_api.c +++ b/src/proj_4D_api.c @@ -363,7 +363,7 @@ size_t proj_trans_generic ( /*************************************************************************************/ -PJ_COORD proj_geocentric_latitude (const PJ *P, PJ_DIRECTION direction, PJ_COORD coord) { +PJ_COORD pj_geocentric_latitude (const PJ *P, PJ_DIRECTION direction, PJ_COORD coord) { /************************************************************************************** Convert geographical latitude to geocentric (or the other way round if direction = PJ_INV) diff --git a/src/proj_internal.h b/src/proj_internal.h index bd289419..76f5d952 100644 --- a/src/proj_internal.h +++ b/src/proj_internal.h @@ -108,6 +108,9 @@ void pj_inherit_ellipsoid_def (const PJ *src, PJ *dst); void pj_erase_ellipsoid_def (PJ *P); int pj_calc_ellipsoid_params (PJ *P, double a, double es); +/* Geographical to geocentric latitude - another of the "simple, but useful" */ +PJ_COORD pj_geocentric_latitude (const PJ *P, PJ_DIRECTION direction, PJ_COORD coord); + char *pj_chomp (char *c); char *pj_shrink (char *c); size_t pj_trim_argc (char *args); |
