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

pj_get_suggested_operation(): handle longitudes outside of [-180,180]… #3595

Merged
merged 1 commit into from
Jan 27, 2023

Conversation

rouault
Copy link
Member

@rouault rouault commented Jan 26, 2023

… for coordinate operation selection (fixes #3594)

@rouault rouault added this to the 9.2.0 milestone Jan 26, 2023
@rouault rouault force-pushed the fix_3594 branch 2 times, most recently from 373c1e4 to 33e54f4 Compare January 26, 2023 18:10
if (x > 180.0) {
x -= 360.0;
if (x > 180.0)
x = fmod(x + 180.0, 360.0) - 180.0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you doing these if statements for performance reasons ("avoiding" to call fmod) or is there any other reason?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, exactly for performance reasons

@rouault rouault merged commit c3c276b into OSGeo:master Jan 27, 2023
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.

Lack of normalization of longitudes for operation selection
2 participants