org.osm2world.core.map_data.creation.index
public class Map2dTree extends Object implements MapDataIndex
MapElement
s of a
data set according on their coordinates in the XZ plane.
Data is contained within the leafs.
The inner nodes split the XZ plane along parallels to the Z and X axes,
alternatingly.Modifier and Type | Class and Description |
---|---|
protected static class |
Map2dTree.InnerNode |
protected static class |
Map2dTree.Leaf |
protected static interface |
Map2dTree.Node |
Modifier and Type | Field and Description |
---|---|
protected static int |
LEAF_SPLIT_SIZE |
protected Map2dTree.Node |
root |
Constructor and Description |
---|
Map2dTree(AxisAlignedBoundingBoxXZ dataBoundary) |
Modifier and Type | Method and Description |
---|---|
Iterable<Map2dTree.Leaf> |
getLeaves()
returns all leaves of this index structure
|
protected static Iterable<MapNode> |
getMapNodes(MapElement element) |
void |
insert(MapElement element)
inserts the element into the index structure
|
Collection<Map2dTree.Leaf> |
insertAndProbe(MapElement e)
inserts the element into the index structure,
and returns all nearby elements contained the index structure
|
protected static final int LEAF_SPLIT_SIZE
protected final Map2dTree.Node root
public Map2dTree(AxisAlignedBoundingBoxXZ dataBoundary)
public void insert(MapElement element)
MapDataIndex
insert
in interface MapDataIndex
public Collection<Map2dTree.Leaf> insertAndProbe(MapElement e)
MapDataIndex
insertAndProbe
in interface MapDataIndex
MapDataIndex.getLeaves()
.
The leaves already contain the new element.protected static Iterable<MapNode> getMapNodes(MapElement element)
public Iterable<Map2dTree.Leaf> getLeaves()
MapDataIndex
getLeaves
in interface MapDataIndex