aboutsummaryrefslogtreecommitdiff
path: root/src/pj_geocent.c
diff options
context:
space:
mode:
authorThomas Knudsen <busstoptaktik@users.noreply.github.com>2018-02-12 20:44:00 +0100
committerGitHub <noreply@github.com>2018-02-12 20:44:00 +0100
commit715ec0b90aec05f15554c6591ea8cfd09d5cf043 (patch)
tree37c093f6114b68cb20e1efa20db758aba1c48742 /src/pj_geocent.c
parent60566a2239328d83ba809b3673a852ba7eab3690 (diff)
downloadPROJ-715ec0b90aec05f15554c6591ea8cfd09d5cf043.tar.gz
PROJ-715ec0b90aec05f15554c6591ea8cfd09d5cf043.zip
Ensure cs2cs emulation gets correct ellipsoid defn (#798)
Copy ellipsoid definition for proj=cart directly into the proj_create call, rather than calling pj_inherit_ellipsoid_def afterwards. Previously, the ellipsoid definition was left out from the call. pj_init_ctx would then pick up WGS84 from proj_def.dat, and the init would succeed (and the possibly wrong ellipsoid definition would later on be overwritten with the correct values by pj_inherit_ellipsoid_def. But if PROJ_LIB was not set or proj_def.dat was inaccessible for other reasons, things went wrong.
Diffstat (limited to 'src/pj_geocent.c')
-rw-r--r--src/pj_geocent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pj_geocent.c b/src/pj_geocent.c
index 6530b103..3d771c43 100644
--- a/src/pj_geocent.c
+++ b/src/pj_geocent.c
@@ -48,7 +48,7 @@ static LP inverse(XY xy, PJ *P) {
return lp;
}
-PJ *PROJECTION(geocent) {
+PJ *CONVERSION (geocent, 0) {
P->is_geocent = 1;
P->x0 = 0.0;
P->y0 = 0.0;