diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2018-08-19 14:13:06 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2018-08-19 14:15:28 +0200 |
| commit | 8cfc81380617ff4a17a06a97635f77c5e9ed7d5b (patch) | |
| tree | b4f8ffdd48eeff98df545269723293804da5b57c /test | |
| parent | 121deeb3ff5c44aa1ae67944be0ad8c3f38d3986 (diff) | |
| download | PROJ-8cfc81380617ff4a17a06a97635f77c5e9ed7d5b.tar.gz PROJ-8cfc81380617ff4a17a06a97635f77c5e9ed7d5b.zip | |
pj_inv(): fix inverse of +proj=longlat +geoc
There is a regression in PROJ 5 regarding the handling of the +geoc flag,
specific to the case of +proj=longlat, and the inverse transformation,
which makes it a no-op:
echo "12 55 0 " | src/cct +proj=pipeline +step +proj=longlat +ellps=GRS80 +geoc +inv
12.0000000000 55.0000000000 0.0000 inf
With this fix, we now get:
echo "12 55 0 " | src/cct +proj=pipeline +step +proj=longlat +ellps=GRS80 +geoc +inv
12.0000000000 54.8189733083 0.0000 inf
The fix consists in making inv_prepare() do symetrically as fwd_finalize(), ie
skip a number of transforms when left and right units are angular,
and in inv_finalize() apply the (OUTPUT_UNITS==PJ_IO_UNITS_ANGULAR) processing
even if INPUT_UNITS == PJ_IO_UNITS_ANGULAR
Diffstat (limited to 'test')
| -rw-r--r-- | test/gie/more_builtins.gie | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/gie/more_builtins.gie b/test/gie/more_builtins.gie index 2908fd63..15964a37 100644 --- a/test/gie/more_builtins.gie +++ b/test/gie/more_builtins.gie @@ -356,6 +356,16 @@ accept 12 89.99999999999 0 0 expect 12 89.999999999989996 0 0 ------------------------------------------------------------------------------- +------------------------------------------------------------------------------- +geocentric latitude using old +geoc flag +------------------------------------------------------------------------------- +operation proj=pipeline step proj=longlat ellps=GRS80 geoc inv +accept 12 55 0 0 +expect 12 54.818973308324573 0 0 +roundtrip 1 +------------------------------------------------------------------------------- + + ------------------------------------------------------------------------------- some less used options |
