locationtech / locationtech/jts

Add method access Quadtree internals

Open
#966 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.