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

kbevers
Copy link
Member

@kbevers 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.

src/proj.c Outdated Show resolved Hide resolved
@kbevers
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 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
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.

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 merged commit 94c4540 into OSGeo:master Nov 10, 2018
@kbevers kbevers added this to the 6.0.0 milestone Nov 10, 2018
@kbevers kbevers deleted the proj-output-units branch February 6, 2019 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants