Constructor and Description |
---|
RTreeNode()
Create a top-level (root) RTreeNode.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Node node)
Test if this RTreeNode's bounding box contains the specified OSM
Node . |
boolean |
contains(Way way)
Test if this RTreeNode's bounding box contains the specified OSM
Way . |
void |
fitMBR(NodeSizeFunction nsf)
Recompute the minimum bounding box for this RTreeNode.
|
int |
getChildRTreeNodeCount()
Get the number of direct children (not further descendents) of this RTreeNode.
|
int |
getElementCount()
Get the number of OSM elements in this RTreeNode.
|
int |
getMaxDepth()
Get the maximum depth of descendents of this RTreeNode.
|
int |
getNodeCount()
Get the total number of RTreeNodes in this r-tree.
|
float[] |
getSpread()
Get the statistics for the breadth-wise spread of the tree.
|
long[] |
getTotalOverlap()
Compute the total amount of overlap between sibling child nodes in the RTree.
|
void |
insertGTN(Node node)
Insert a new OSM
Node into this RTreeNode. |
void |
insertGTN(Way way)
Insert a new OSM
Way into this RTreeNode. |
boolean |
intersects(int minLat,
int maxLat,
int minLon,
int maxLon)
Test if the specified bounding box intersects the minimum bounding box of
this RTreeNode.
|
boolean |
isOverfull()
Test if this RTreeNode contains too many elements which should be split into
sub-nodes.
|
java.util.List<GenericTaggedNode<?>> |
search(int minLat,
int maxLat,
int minLon,
int maxLon,
NodeSizeFunction nsf)
Search this RTreeNode hierarchy for all OSM elements that match the specified
bounding box.
|
void |
split(NodeSizeFunction nsf)
Split all the elements of this node into subnodes for minimized overlap
between the subnodes.
|
java.lang.String |
toString()
Returns a string representation of the object.
|
public boolean contains(Node node)
Node
.node
- Node
to testpublic void insertGTN(Node node)
Node
into this RTreeNode. Typically used to preload
a root node prior to splitting into an r-tree hierarchy.node
- OSM Node
to add to this RTreeNode's elementspublic boolean contains(Way way)
Way
.way
- Way
to testpublic void insertGTN(Way way)
Way
into this RTreeNode. Typically used to preload
a root node prior to splitting into an r-tree hierarchy.way
- OSM Way
to add to this RTreeNode's elementspublic boolean isOverfull()
MAX_ELEMENTS_PER_CELL
public void fitMBR(NodeSizeFunction nsf)
nsf
- NodeSizeFunction to determine the radius of Node objectspublic boolean intersects(int minLat, int maxLat, int minLon, int maxLon)
minLat
- int minimum latitude in millionths of degrees NorthmaxLat
- int maximum latitude in millionths of degrees NorthminLon
- int minimum longitude in millionths of degrees EastmaxLon
- int maximum longitude in millionths of degrees Eastpublic void split(NodeSizeFunction nsf)
elements
.size()
> MAX_ELEMENTS_PER_CELL
.nsf
- NodeSizeFunction to calculate bounding box of a Node
public java.util.List<GenericTaggedNode<?>> search(int minLat, int maxLat, int minLon, int maxLon, NodeSizeFunction nsf)
minLat
- int minimum latitude in millionths of degrees NorthmaxLat
- int maximum latitude in millionths of degrees NorthminLon
- int minimum longitude in millionths of degrees EastmaxLon
- int maximum longitude in millionths of degrees Eastnsf
- NodeSizeFunction to calculate bounding box of OSM Node
spublic java.lang.String toString()
toString
in class java.lang.Object
public int getElementCount()
GenericTaggedNode
elements stored in this RTreeNodepublic int getChildRTreeNodeCount()
public int getMaxDepth()
public float[] getSpread()
public long[] getTotalOverlap()
public int getNodeCount()