diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2019-01-03 22:12:22 +0100 |
|---|---|---|
| committer | Kristian Evers <kristianevers@gmail.com> | 2019-01-04 14:02:06 +0100 |
| commit | edb068401822c0cb7047019ae7a1dac587778ce3 (patch) | |
| tree | 00897a41abd674fa841492cdf4fda86d4778d399 /src/conversions/unitconvert.cpp | |
| parent | 78d4126eb54d3f066d7225c160707fc68ae31229 (diff) | |
| download | PROJ-edb068401822c0cb7047019ae7a1dac587778ce3.tar.gz PROJ-edb068401822c0cb7047019ae7a1dac587778ce3.zip | |
Replace PJ_IO_UNITS_WHATEVER with units from neighbour steps
With this commit we make sure that proj_angular_input() and
proj_angular_output return the correct result for any given pipeline.
Diffstat (limited to 'src/conversions/unitconvert.cpp')
| -rw-r--r-- | src/conversions/unitconvert.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/conversions/unitconvert.cpp b/src/conversions/unitconvert.cpp index cbd81a7d..1e3372d6 100644 --- a/src/conversions/unitconvert.cpp +++ b/src/conversions/unitconvert.cpp @@ -457,6 +457,8 @@ PJ *CONVERSION(unitconvert,0) { P->left = PJ_IO_UNITS_WHATEVER; P->right = PJ_IO_UNITS_WHATEVER; + P->skip_fwd_prepare = 1; + P->skip_inv_prepare = 1; /* if no time input/output unit is specified we can skip them */ Q->t_in_id = -1; @@ -476,6 +478,8 @@ PJ *CONVERSION(unitconvert,0) { } if (f != 0.0) Q->xy_factor *= f; + if (normalized_name != nullptr && strcmp(normalized_name, "Radian") == 0) + P->left = PJ_IO_UNITS_RADIANS; } if ((name = pj_param (P->ctx, P->params, "sxy_out").s) != nullptr) { @@ -489,6 +493,8 @@ PJ *CONVERSION(unitconvert,0) { } if (f != 0.0) Q->xy_factor /= f; + if (normalized_name != nullptr && strcmp(normalized_name, "Radian") == 0) + P->right= PJ_IO_UNITS_RADIANS; } if( xy_in_is_linear >= 0 && xy_out_is_linear >= 0 && |
