From 85733181ee7c2777139f5d1db94f2beabb737e96 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 8 Sep 2021 12:50:37 +0200 Subject: createOperations(): deal with spherical planetocentric geodetic CRS This also fixes conversion between geocentric latlong and geodetic latlong with cs2cs. This was dealt with in PR 1093, but in the wrong direction (the geocentric latitude must be <= in absolute value to the geodetic one) The issue here was linked to the semantics of the +geoc specifier, which affects the semantics of the input coordinates in the forward direction (+geoc means that the input coordinate is is a geocentric latitude), which defeats the logic of doing A to B by using the inverse path of A and the forward path of B. --- test/cli/testvarious | 12 ++++++------ test/cli/tv_out.dist | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'test/cli') diff --git a/test/cli/testvarious b/test/cli/testvarious index 6e9cd43c..80340369 100755 --- a/test/cli/testvarious +++ b/test/cli/testvarious @@ -144,10 +144,10 @@ $EXE +proj=geocent +datum=WGS84 \ EOF # echo "#############################################################" >> ${OUT} -echo Test conversion from geocentric latlong to geodetic latlong >> ${OUT} +echo Test conversion from geodetic latlong to geocentric latlong >> ${OUT} # -$EXE +proj=latlong +datum=WGS84 +geoc \ - +to +proj=latlong +datum=WGS84 \ +$EXE +proj=latlong +datum=WGS84 \ + +to +proj=latlong +datum=WGS84 +geoc \ -E >>${OUT} <> ${OUT} -echo Test conversion from geodetic latlong to geocentric latlong >> ${OUT} +echo Test conversion from geocentric latlong to geodetic latlong >> ${OUT} # -$EXE +proj=latlong +datum=WGS84 \ - +to +proj=latlong +datum=WGS84 +geoc \ +$EXE +proj=latlong +datum=WGS84 +geoc \ + +to +proj=latlong +datum=WGS84 \ -E >>${OUT} <