org.osm2world.core.map_data.creation.index
Class Map2dTree

Object
  extended by Map2dTree
All Implemented Interfaces:
MapDataIndex

public class Map2dTree
extends Object
implements MapDataIndex

a 2D tree (two-dimensional k-d tree) managing MapElements 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.


Nested Class Summary
protected static class Map2dTree.InnerNode
           
protected static class Map2dTree.Leaf
           
protected static interface Map2dTree.Node
           
 
Field Summary
protected static int LEAF_SPLIT_SIZE
           
protected  Map2dTree.Node root
           
 
Constructor Summary
Map2dTree(MapData mapData)
           
 
Method Summary
 Iterable<Map2dTree.Leaf> getLeaves()
           
protected static Iterable<MapNode> getMapNodes(MapElement element)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LEAF_SPLIT_SIZE

protected static final int LEAF_SPLIT_SIZE
See Also:
Constant Field Values

root

protected final Map2dTree.Node root
Constructor Detail

Map2dTree

public Map2dTree(MapData mapData)
Method Detail

getMapNodes

protected static Iterable<MapNode> getMapNodes(MapElement element)

getLeaves

public Iterable<Map2dTree.Leaf> getLeaves()
Specified by:
getLeaves in interface MapDataIndex