LUCENE-8746: Component2D topology library that works on encoded space #770
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With the upcoming of a new Shape type working in cartesian space (#726), I think we need to put some structure in the objects that contain spatial logic. In particular I have tried to remove all the mixed notation between latitude/longitude and x/y as well as defined factory methods to create those shapes from LatLonShape.
This library chooses to use X/Y notation as it is mainly cartesian, it works on the encoding space and solves problems like the neighbourhood issue (https://discuss.elastic.co/t/neighboring-touching-geo-shapes-not-found/175543) when not encoded query shapes are used against encoded indexed shapes. It potentially can simplify all the query logic as it is only needed a query by Component2D for this case.
Currently it contains factory methods to create Component2D shapes from LatLonShapes, it should be trivial to add a factory class for XYShapes.
@jpountz @nknize @rmuir @dsmiley let me know what do you think?