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

Bug: Parameter reversedGeometries on LineStrings does the opposite of what is expected #15

Closed
jsiedentop opened this issue Feb 26, 2024 · 0 comments · Fixed by #13
Closed

Comments

@jsiedentop
Copy link
Contributor

    test('same line, different orientation', () {
      final first = lineString([
        [0, 0],
        [0, 5],
        [5, 5],
        [5, 0]
      ]);

      final second = lineString([
        [5, 0],
        [5, 5],
        [0, 5],
        [0, 0]
      ]);

      final defaultParam = Equality();
      final reversedTrue = Equality(reversedGeometries: true);
      final reversedFalse = Equality(reversedGeometries: false);

      expect(defaultParam.compare(first, second), true); // should be false
      expect(reversedTrue.compare(first, second), false); // should be true
      expect(reversedFalse.compare(first, second), true); // should be false
    });
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 a pull request may close this issue.

1 participant