diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2017-07-05 12:53:19 +0200 |
|---|---|---|
| committer | Kristian Evers <kristianevers@gmail.com> | 2017-07-05 13:22:57 +0200 |
| commit | ee3ec9dba47a7ee705b776e9323e072c0b7f0653 (patch) | |
| tree | 644e03c7e2981dfb4979417790cd987bdbe0d5e5 /src | |
| parent | 2f270c2542056e717bddf2df36fdee0cb6712a9a (diff) | |
| download | PROJ-ee3ec9dba47a7ee705b776e9323e072c0b7f0653.tar.gz PROJ-ee3ec9dba47a7ee705b776e9323e072c0b7f0653.zip | |
Respect -r flag when calling proj with -V. Fixes #184.
Diffstat (limited to 'src')
| -rw-r--r-- | src/proj.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -156,7 +156,7 @@ process(FILE *fid) { static void /* file processing function --- verbosely */ vprocess(FILE *fid) { char line[MAX_LINE+3], *s, pline[40]; - projUV dat_ll, dat_xy; + projUV dat_ll, dat_xy, temp; int linvers; if (!oform) @@ -198,6 +198,12 @@ vprocess(FILE *fid) { continue; } if (prescale) { dat_xy.u *= fscale; dat_xy.v *= fscale; } + if (reversein) { + temp.u = dat_xy.u; + temp.v = dat_xy.v; + dat_xy.u = temp.v; + dat_xy.v = temp.u; + } dat_ll = pj_inv(dat_xy, Proj); } else { dat_ll.u = dmstor(s, &s); @@ -206,6 +212,12 @@ vprocess(FILE *fid) { emess(-1,"lon-lat input conversion failure\n"); continue; } + if (reversein) { + temp.u = dat_ll.u; + temp.v = dat_ll.v; + dat_ll.u = temp.v; + dat_ll.v = temp.u; + } dat_xy = pj_fwd(dat_ll, Proj); if (postscale) { dat_xy.u *= fscale; dat_xy.v *= fscale; } } |
