diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2018-01-17 16:10:34 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-01-17 16:10:34 +0100 |
| commit | 33a7216aea7bacf8cff72a5e6bb59b25e7d931f7 (patch) | |
| tree | ff2eafe33befd8fe38f63a83a0b8562f1304a8f2 /test | |
| parent | 53b30f10c6e8d74a79b5d0763a53c5e1732e34b7 (diff) | |
| parent | 046ce54719f3224b1b9299ee8d370cc92b0929af (diff) | |
| download | PROJ-33a7216aea7bacf8cff72a5e6bb59b25e7d931f7.tar.gz PROJ-33a7216aea7bacf8cff72a5e6bb59b25e7d931f7.zip | |
Merge pull request #739 from kbevers/pipeline-inverse
Pipeline and cct inverse fixes
Diffstat (limited to 'test')
| -rw-r--r-- | test/gie/more_builtins.gie | 61 |
1 files changed, 59 insertions, 2 deletions
diff --git a/test/gie/more_builtins.gie b/test/gie/more_builtins.gie index 099934a7..20bffbd9 100644 --- a/test/gie/more_builtins.gie +++ b/test/gie/more_builtins.gie @@ -65,7 +65,7 @@ roundtrip 100 1 m ------------------------------------------------------------------------------- Some tests from PJ_pipeline.c ------------------------------------------------------------------------------- -Forward-reverse geo->utm->geo +Forward-reverse geo->utm->geo (4D functions) ------------------------------------------------------------------------------- operation proj=pipeline zone=32 step proj=utm ellps=GRS80 step @@ -81,7 +81,7 @@ Now the inverse direction (still same result: the pipeline is symmetrical) direction inverse expect 12 55 0 0 ------------------------------------------------------------------------------- -And now the back-to-back situation utm->geo->utm +And now the back-to-back situation utm->geo->utm (4D functions) ------------------------------------------------------------------------------- operation proj=pipeline zone=32 ellps=GRS80 step proj=utm inv step @@ -92,6 +92,33 @@ expect 691875.63214 6098907.82501 0 0 direction inverse expect 691875.63214 6098907.82501 0 0 ------------------------------------------------------------------------------- +Forward-reverse geo->utm->geo (3D functions) +------------------------------------------------------------------------------- +operation proj=pipeline zone=32 step + proj=utm ellps=GRS80 step + proj=utm ellps=GRS80 inv +------------------------------------------------------------------------------- +tolerance 0.1 mm + +accept 12 55 0 +expect 12 55 0 + +Now the inverse direction (still same result: the pipeline is symmetrical) + +direction inverse +expect 12 55 0 +------------------------------------------------------------------------------- +And now the back-to-back situation utm->geo->utm (3D functions) +------------------------------------------------------------------------------- +operation proj=pipeline zone=32 ellps=GRS80 step + proj=utm inv step + proj=utm +------------------------------------------------------------------------------- +accept 691875.63214 6098907.82501 0 +expect 691875.63214 6098907.82501 0 +direction inverse +expect 691875.63214 6098907.82501 0 +------------------------------------------------------------------------------- Test a corner case: A rather pointless one-step pipeline geo->utm ------------------------------------------------------------------------------- operation proj=pipeline step proj=utm zone=32 ellps=GRS80 @@ -115,9 +142,39 @@ expect 691875.63214 6098907.82501 0 0 direction inverse accept 12 55 0 0 expect 12 55 0 0 +------------------------------------------------------------------------------- +Test a few inversion scenarios (urm5 has no inverse operation) +------------------------------------------------------------------------------- +operation proj=pipeline step + proj=urm5 n=0.5 inv +expect failure pjd_err_malformed_pipeline + +operation proj=pipeline inv step + proj=urm5 n=0.5 +expect failure pjd_err_malformed_pipeline +operation proj=pipeline inv step + proj=urm5 n=0.5 inv +accept 12 56 +expect 1215663.2814182492 5452209.5424045017 + +operation proj=pipeline step + proj=urm5 n=0.5 +accept 12 56 +expect 1215663.2814182492 5452209.5424045017 +------------------------------------------------------------------------------- +Test various failing scenarios. +------------------------------------------------------------------------------- +operation proj=pipeline step + proj=pipeline step + proj=merc +expect failure pjd_err_malformed_pipeline +operation step proj=pipeline step proj=merc +expect failure pjd_err_malformed_pipeline +operation proj=pipeline +expect failure pjd_err_malformed_pipeline ------------------------------------------------------------------------------- |
