Skip to content

[FEA]: Binary predicates that depend only on equals #838

Closed

Description

Is this a new feature, an improvement, or a change to existing functionality?

New Feature

How would you describe the priority of this feature request

Critical (currently preventing usage)

Please provide a clear description of problem you would like to solve.

Many binary operations depend only on tests for equality. This issue is an epic for planning, tracking, and completing the binary operations depending only on equality.

Implement the binary operations that depend on equality. These operations include:

Strict equality: len(lhs) == len(rhs) && count_equals(lhs, rhs) == len(rhs)

  1. point equals point
  2. linestring equals linestring
  3. linestring equals polygon
  4. polygon equals linestring
  • What about closed vs. unclosed polygons?
  1. polygon equals polygon
  2. point contains point
  3. point covers point
  4. point intersects point
  5. point within point
  6. point coveredby point
  7. point crosses point
  8. point overlaps point

Weak equality: len(lhs) > len(rhs) && count_equals(lhs, rhs) == len(rhs)

  1. polygon equals point
  2. linestring contains linestring
  3. linestring covers linestring
  4. point intersects linestring
  5. point within linestring
  6. linestring within linestring

Strict inequality: count_equals(lhs, rhs) == 0

  1. point disjoint point
  2. point disjoint linestring
  3. point disjoint polygon

Each of this binops depends on particular counting operations to occur as postprocessing. This issue also tracks those operations.

Equality/Intersection/PIP table

Legend:

x: False/impossible

e: uses equality

i: uses intersection

p: uses pip

  x(p, p) x(p, l) x(p, P) x(l, p) x(l, l) x(l, P) x(P, p) x(P, l) x(P, P)
Equals e x x x e e e e e
Disjoint e e e i i ip ep ep ep
Touches ei ei ip ei ei ip ip ip ip
Contains e x x i e x p p p
Covers e x x i e x ip ip ip
Intersects e i p i i i ip ip ip
Within e e p x e p x x p
CoveredBy e e p x e p x x x
Crosses e x x i i i x ip ip
Overlaps e x x i i i p ip ip

Describe any alternatives you have considered

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    • Status

      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions