Skip to content
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

Disallow use of non-projection operations in proj (was: Don't convert non-angular inputs to proj to radians) #1162

Merged
merged 1 commit into from Nov 10, 2018

Conversation

Projects
None yet
2 participants
@kbevers
Copy link
Member

kbevers commented Oct 26, 2018

As reported on the mailing list, calling proj with a operation that doesn't take angular input will not return the expected result. This is changed with this commit.

Show resolved Hide resolved src/proj.c Outdated

@kbevers kbevers force-pushed the kbevers:proj-output-units branch from aae996a to 04c0ab9 Oct 26, 2018

@kbevers

This comment has been minimized.

Copy link
Member Author

kbevers commented Oct 27, 2018

Thinking more about this, I am having doubts that this is the best solution. I am starting to lean towards proj only accepting projection operations (that is, operations with P->left = PJ_UNITS_ANGULAR and P->right = PJ_UNITS_PROJECTED). When a non-projection operation is initialized, proj should fail and tell the user that proj is only for projections and reference cct. Thoughts?

@kbevers kbevers force-pushed the kbevers:proj-output-units branch from 04c0ab9 to 44a5b16 Nov 10, 2018

@kbevers kbevers changed the title Don't convert non-angular inputs to proj to radians Disallow use of non-projection operations in proj (was: Don't convert non-angular inputs to proj to radians) Nov 10, 2018

@kbevers

This comment has been minimized.

Copy link
Member Author

kbevers commented Nov 10, 2018

I decided to change the logic so that proj will only accept operations requiring angular inputs and produces non-angular output. I think this is a simpler approach and it is also more in line with how proj originally was intended to be used.

@kbevers kbevers force-pushed the kbevers:proj-output-units branch from 44a5b16 to 739377d Nov 10, 2018

Disallow use of non-projection operations in proj
Since the introduction of other operations types than projections it has
been unclear how proj should treat those. This commit sets record
straight once and for all: proj is only allowed to initialize operations
that take angular input and produces non-angular output, i.e.
projections. This is true to the version of proj before the introduction
of the pipeline and other non-projection operations. Users can still
initiliaze pipelines with proj as long as the resulting concatenated
operation requires angular input and outputs non-angular output.

@kbevers kbevers force-pushed the kbevers:proj-output-units branch from 739377d to 811ea08 Nov 10, 2018

@kbevers kbevers merged commit 94c4540 into OSGeo:master Nov 10, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
coverage/coveralls Coverage increased (+0.006%) to 78.161%
Details

@kbevers kbevers added this to the 6.0.0 milestone Nov 10, 2018

@kbevers kbevers deleted the kbevers:proj-output-units branch Feb 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.