Spatial relationship between Geoshapes [LUCENE-7906]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
Hi,
Working with geosahpes and trying to resolve spatial relationships between them I came accross a big limitation when trying to solve the relationship between two geopolygons. This object does not expose the internal structure. In particular at some point, it is necessary to check if one polygon intersects the edges of the other polygon which currently is not possible as edges are not exposed.
To be able to perform such operation it can be several options. The ones I can think of are:
1) Expose the edges of the polygon ( and probably the notable points for the edges) adding getters in the GeoPolygon interface. Easy to implement and leave users the responsability of coding the spatial relationship.
2) Extends GeoPolygon interface to extends geoarea and leave the object make the spatial relationship.
3) Extends GeoShape interface so all shapes can infer the spatial relationship with other GeoShapes.
I might be bias as my interest is in 2d Shapes in the unit sphere and there might be some cases which what I propose cannot be implemented or are againts the aim of the library.
What do you think?
Cheers,
Ignacio
---
Migrated from [LUCENE-7906](https://issues.apache.org/jira/browse/LUCENE-7906) by Ignacio Vera (@iverase), updated Sep 14 2017
Attachments: [LUCENE-7906.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-7906/LUCENE-7906.patch), [LUCENE-7906-AreaShape.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-7906/LUCENE-7906-AreaShape.patch), [LUCENE-7906-Generator_update.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-7906/LUCENE-7906-Generator_update.patch), [LUCENE-7906-test.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-7906/LUCENE-7906-test.patch) (versions: 3), [test-degenerate_point.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-7906/test-degenerate_point.patch)
Contributor guide
Research direction
Start by reviewing the GeoPolygon and GeoShape interfaces and the attached LUCENE-7906 patches, including the test patch. Compare the three proposed API directions and inspect the existing geoshape implementation; done requires an agreed approach for polygon relationships or edge exposure, with tests covering the supported behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100