Class NodeBase
java.lang.Object
org.locationtech.jts.index.quadtree.NodeBase
- All Implemented Interfaces:
Serializable
The base class for nodes in a
Quadtree.- Version:
- 1.7
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAllItems(List resultItems) voidaddAllItemsFromOverlapping(Envelope searchEnv, List resultItems) (package private) intdepth()getItems()(package private) intstatic intgetSubnodeIndex(Envelope env, double centrex, double centrey) Gets the index of the subquad that wholly contains the given envelope.booleanbooleanhasItems()booleanisEmpty()booleanprotected abstract booleanisSearchMatch(Envelope searchEnv) booleanRemoves a single item from this subtree.(package private) intsize()voidvisit(Envelope searchEnv, ItemVisitor visitor) private voidvisitItems(Envelope searchEnv, ItemVisitor visitor)
-
Field Details
-
items
-
subnode
subquads are numbered as follows:2 | 3 --+-- 0 | 1
-
-
Constructor Details
-
NodeBase
public NodeBase()
-
-
Method Details
-
getSubnodeIndex
Gets the index of the subquad that wholly contains the given envelope. If none does, returns -1.- Returns:
- the index of the subquad that wholly contains the given envelope or -1 if no subquad wholly contains the envelope
-
getItems
-
hasItems
public boolean hasItems() -
add
-
remove
Removes a single item from this subtree.- Parameters:
itemEnv- the envelope containing the itemitem- the item to remove- Returns:
trueif the item was found and removed
-
isPrunable
public boolean isPrunable() -
hasChildren
public boolean hasChildren() -
isEmpty
public boolean isEmpty() -
addAllItems
-
isSearchMatch
-
addAllItemsFromOverlapping
-
visit
-
visitItems
-
depth
int depth() -
size
int size() -
getNodeCount
int getNodeCount()
-