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`