locationtech / locationtech/jts
Add method access Quadtree internals
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2.2k
- Forks
- 475
- Avg merge
- 14d 10h
- Merged PRs (30d)
- 1
Description
Add method to access Quadtree internals (Root and for Root its Nodes ). STRTree has such methods (itemsTree, getRoot).
In our case we need it for accessing any element from the Quadtree. With STRTree we can do it like this:
// STRTree st;
Object item = st.itemsTree();
if (!((List<?>) item).isEmpty()) {
do {
item = ((List<?>) item).get(0);
} while (item instanceof List);
}
// now `item` is a single element from `STRTree`
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the Quadtree implementation and its Root and Node types, then compare the existing STRTree itemsTree and getRoot methods. Add access to the Quadtree root and its nodes so callers can reach an element, and verify that the resulting traversal supports the use case described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100