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

[GEOT-7570] Small features that cross the dateline may be interpreted as preflipped #4747

Merged
merged 1 commit into from
May 17, 2024

Conversation

turingtestfail
Copy link
Member

@turingtestfail turingtestfail commented May 10, 2024

GEOT-7570 Powered by Pull Request Badge

removed longestline filter

cleanup

Checklist

For core and extension modules:

  • New unit tests have been added covering the changes.
  • Documentation has been updated (if change is visible to end users).
  • There is an issue in GeoTools Jira (except for changes not visible to end users).
  • Commit message(s) must be in the form [GEOT-XYZW] Title of the Jira ticket.
  • Bug fixes and small new features are presented as a single commit.
  • The commit targets a single objective (if multiple focuses cannot be avoided, each one is in its own commit, and has a separate ticket describing it).

@turingtestfail turingtestfail requested a review from aaime May 10, 2024 22:07
Copy link
Member

@aaime aaime left a comment

Choose a reason for hiding this comment

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

Generally speaking looking good, see comments below about being a bit more explicit docs wise.

/**
* Builds a new wrapper
*
* @param wrapLimit Subsequent coordinates whose X differ from more than {@code wrapLimit} are
* supposed to be wrapping the dateline and need to be offsetted
* @param offset The offset to be applied to coordinates to unwrap them
* @param mt The math transform to use to detect the wrapping
* @param wrapOnY If true, the wrapping is supposed to happen on the Y axis, otherwise on the X
* @param isPreFlipped If true, the coordinates are already flipped, so the wrapping is supposed
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* @param isPreFlipped If true, the coordinates are already flipped, so the wrapping is supposed
* @param isPreFlipped If true, the coordinates are already flipped, so the wrapping is supposed

Supposed? 🤣

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

Comment on lines 55 to 59
/** The tolerance to consider a geometry without touching both datelines */
public static final double DATELINE_PROXIMITY_TOLERANCE = 1.99572;
Copy link
Member

Choose a reason for hiding this comment

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

Comment that it was obtained by trial and error.

Copy link
Member Author

Choose a reason for hiding this comment

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

added

Comment on lines +262 to +266
* In some cases the geometry is preflipped due to coordinate order and proximity to the
* dateline
Copy link
Member

Choose a reason for hiding this comment

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

Write an example, 3 points polygon or 2 points line that would show what pre-flipped means.

Copy link
Member Author

Choose a reason for hiding this comment

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

added

… as preflipped

removed longestline filter

cleanup

added PR comments
@aaime aaime added backport 30.x Backport bot will backport to 30.x on merge backport 31.x Automatic backport to 31.x branch labels May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 30.x Backport bot will backport to 30.x on merge backport 31.x Automatic backport to 31.x branch
Projects
None yet
2 participants