apache / apache/lucene

Rectangle.fromPolygon could compute smaller bounding boxes [LUCENE-7669]

Open
#8,720 9 comments 0 reactions 0 assignees View on GitHub
legacy-jira-priority:Minor type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

Currently it computes the smallest bounding box that does not cross the dateline. However allowing to cross the dateline could allow to create smaller bounding boxes. For instance, because of that, the bounding box of the Russia polygon has a width of 360 longitude degrees. By allowing rectangles that cross the dateline, we could get a polygon whose width is only 171 longitude degrees. This is useful combined with #8712 since it means the grid would have higher resolution.

---
Migrated from [LUCENE-7669](https://issues.apache.org/jira/browse/LUCENE-7669) by Adrien Grand (@jpountz), updated Feb 04 2017
Attachments: [LUCENE-7669.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-7669/LUCENE-7669.patch)

Contributor guide

Open the contributing guide

Research direction

Start at Rectangle.fromPolygon and review the attached LUCENE-7669.patch to understand the existing bounding-box calculation. Verify the result against polygons such as Russia, ensuring dateline-crossing rectangles can produce the smaller longitude width described in the issue and preserve the intended grid-resolution benefit.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.