-
Notifications
You must be signed in to change notification settings - Fork 791
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unitconvert from degrees to radians not working with cct #4283
Comments
I believe this is a side effect of a change of many years ago of edb0684#diff-6ddde4f3f187062a5e8b59f634a5c067d4585ce0d9779227e215725515538bcbR482 where the output of @kbevers any thoughs on what we should do here:
|
Hi @rouault , thanks for your timely response!
This makes sense to me - I was wondering if something like this might be happening under the hood. Thanks for confirming! At a minimum, I think a note about this in the docs would be great! |
I'm surprised this hasn't surfaced earlier! I suppose it's because internally we more or less always couple unitconvert with an axisswap in the previous step. If it had been done the other way round we would have noticed this right away.
My immediate thought is that cct it should do exactly what it is asked to do. I can accept an exception when cct is only fed a projection, as I think the output would be too surprising and cause more confusion than is necessary. If I'm not mistaken there's a similar problem with the pre-conversion to radians. This gie test highlights a few problems:
results:
The tests that passes are the inverse operation started with the If we can make the above test pass without breaking any other tests I think we're good. |
I'm not sure how gie is relevant here. The post-unit conversion from radians to degree is a cct specific code path |
Maybe I've misunderstood the problem, but to my eyes it looks like it's the same issue in gie, so perhaps it can be solved at a higher level than in the individual apps? In any case, I didn't see any connection to cct (or gie) in the changeset you linked, so didn't think that it was specific to either of those applications |
yes sorry my analysis was a bit terse. This is related to Line 527 in 01194d8
gie has a similar logic in Line 1052 in 01194d8
|
Thanks for clarification. I also met this issues. And in some cases, I am wondring if this action will destroy the whole pipeline? For example, after ' +step +inv +proj=utm', we want to do ' +step +proj=hgridshift +grids=ch_swisstopo_CHENyx06a.tif ' , for which the inputs should be in rad but not degree (or always taking degrees as inputs?)? I am not sure about the solutions. |
Example of problem
The latest version of proj does not appear to correctly perform unit conversion from degrees to radians.
In the following example, I use
proj
v9.5.0cct
to construct a pipeline that should convert from degrees to radians. The output appears to be in degrees.The transformation works as expected using
proj
v5.2:Problem description
I expect the output of
unitconvert +xy_in=deg +xy_out=rad
to be in radians. Instead the output is in degrees.Expected Output
I expect the output to be in radians.
Environment Information
proj
): v9.5.0Installation method
The text was updated successfully, but these errors were encountered: