Skip to content

MB-66210: Polygon and MultiPolygon Changes #20

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

Open
wants to merge 4 commits into
base: linestrings
Choose a base branch
from

Conversation

Likith101
Copy link
Member

  • Added utility function for point intersects polygon
  • Added usage of shape indexes wherever possible
  • Removed some new lines to make things consistent
  • Added appropriate test cases

Note

  • Polygon intersects point will not consider points on the edges a 100 percent of the time. Results are arbitrary and adding support might be a performance hit. Behaviour is still consistent with the past implementation
  • Polygon intersects polygon will not consider both vertex and edge intersection Adding this support will be a performance hit. Behaviour is still consistent with past implementation

 - Switched out all cell operations to point operations
 - All point comparisions will use approx equal which has an epsilon of 1e-15
 - LineStrings and MultiLineStrings will project point onto themselves
and compare the distance between points for intersection
 - Polygons and MultiPolygons use shape indexes with a Closed Vertex Model
which means the boundaries and the vertices are considered part of the shape
 - Circle will use distance from center to identify intersecting points
 - Envelopes will use bound checks to identify intersects
 - New Circles and Envelopes will now init themselves before returning
 - Added appropriate test cases

Note:
    Projection onto a segment calculation might not be completely accurate.
Projection of point (1,1) onto the line (-2,1) amd (2,1) returns a point that
has a distance of 50m from (1,1). Unable to verify if this distance is actually
accurate or not.
 - Added utility function for point intersects polygon
 - Added usage of shape indexes wherever possible
 - Removed some new lines to make things consistent
 - Added appropriate test cases

Note
 - Polygon intersects point will not consider points on the edges a 100
percent of the time. Results are arbitrary and adding support might be a
performance hit. Behaviour is still consistent with the past implementation
 - Polygon intersects polygon will not consider both vertex and edge intersection
Adding this support will be a performance hit. Behaviour is still consistent with
past implementation
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.

1 participant