diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-12-13 01:29:42 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-12-13 01:29:42 +0100 |
| commit | 2fd6f7fc0b2db4f5f7d54271e48577f3db7564bf (patch) | |
| tree | 6468c6983dc0fd1d3627a9bd80148ace2abf8799 /test/unit/test_io.cpp | |
| parent | c86bd69147a289ead837e5400776393bd9072a82 (diff) | |
| download | PROJ-2fd6f7fc0b2db4f5f7d54271e48577f3db7564bf.tar.gz PROJ-2fd6f7fc0b2db4f5f7d54271e48577f3db7564bf.zip | |
PROJStringFormatter: make startInversion/stopInversion properly deal with omit_fwd/omit_inv
Diffstat (limited to 'test/unit/test_io.cpp')
| -rw-r--r-- | test/unit/test_io.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/unit/test_io.cpp b/test/unit/test_io.cpp index 9fefaf9b..15ab8706 100644 --- a/test/unit/test_io.cpp +++ b/test/unit/test_io.cpp @@ -6867,6 +6867,30 @@ TEST(io, projstringformatter_optim_hgridshift_vgridshift_hgridshift_inv) { "+step +proj=pop +v_1 +v_2"); } + // Test omit_fwd->omit_inv when inversing the pipeline + { + auto fmt = PROJStringFormatter::create(); + fmt->startInversion(); + fmt->ingestPROJString("+proj=hgridshift +grids=foo +omit_fwd"); + fmt->stopInversion(); + + EXPECT_EQ(fmt->toString(), + "+proj=pipeline " + "+step +inv +proj=hgridshift +grids=foo +omit_inv"); + } + + // Test omit_inv->omit_fwd when inversing the pipeline + { + auto fmt = PROJStringFormatter::create(); + fmt->startInversion(); + fmt->ingestPROJString("+proj=hgridshift +grids=foo +omit_inv"); + fmt->stopInversion(); + + EXPECT_EQ(fmt->toString(), + "+proj=pipeline " + "+step +inv +proj=hgridshift +grids=foo +omit_fwd"); + } + // Variant with first hgridshift inverted, and second forward { auto fmt = PROJStringFormatter::create(); |
