aboutsummaryrefslogtreecommitdiff
path: root/src/pj_init.c
diff options
context:
space:
mode:
authorFrank Warmerdam <warmerdam@pobox.com>2007-11-26 00:21:59 +0000
committerFrank Warmerdam <warmerdam@pobox.com>2007-11-26 00:21:59 +0000
commitd6636b805e0e8136f427ca79c57b21d421539169 (patch)
treee7b437523ee813ca69a740eee325150a0bcb30a9 /src/pj_init.c
parentf14b424fd69930e181f8db5ff853fc0bd06af4b4 (diff)
downloadPROJ-d6636b805e0e8136f427ca79c57b21d421539169.tar.gz
PROJ-d6636b805e0e8136f427ca79c57b21d421539169.zip
Modified PJ structure to hold a_orig, es_orig, ellipsoid definition before
adjustment for spherical projections. Modified pj_datum_transform() to use the original ellipsoid parameters, not the ones adjusted for spherical projections. Modified pj_datum_transform() to not attempt any datum shift via geocentric coordinates if the source *or* destination are raw ellipsoids (ie. PJD_UNKNOWN). All per PROJ bug #1602, GDAL bug #2025. git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1406 4e78687f-474d-0410-85f9-8d5e500ac6b2
Diffstat (limited to 'src/pj_init.c')
-rw-r--r--src/pj_init.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/pj_init.c b/src/pj_init.c
index 4b120080..205b468a 100644
--- a/src/pj_init.c
+++ b/src/pj_init.c
@@ -30,6 +30,15 @@
******************************************************************************
*
* $Log$
+ * Revision 1.19 2007/11/26 00:21:59 fwarmerdam
+ * Modified PJ structure to hold a_orig, es_orig, ellipsoid definition before
+ * adjustment for spherical projections.
+ * Modified pj_datum_transform() to use the original ellipsoid parameters,
+ * not the ones adjusted for spherical projections.
+ * Modified pj_datum_transform() to not attempt any datum shift via
+ * geocentric coordinates if the source *or* destination are raw ellipsoids
+ * (ie. PJD_UNKNOWN). All per PROJ bug #1602, GDAL bug #2025.
+ *
* Revision 1.18 2006/10/12 21:04:39 fwarmerdam
* Added experimental +lon_wrap argument to set a "center point" for
* longitude wrapping of longitude values coming out of pj_transform().
@@ -282,6 +291,9 @@ pj_init(int argc, char **argv) {
/* set ellipsoid/sphere parameters */
if (pj_ell_set(start, &PIN->a, &PIN->es)) goto bum_call;
+ PIN->a_orig = PIN->a;
+ PIN->es_orig = PIN->es;
+
PIN->e = sqrt(PIN->es);
PIN->ra = 1. / PIN->a;
PIN->one_es = 1. - PIN->es;