Class RTreeIndex
- java.lang.Object
-
- oracle.spatial.network.nfe.vis.maps.index.AbstractSpatialIndex
-
- oracle.spatial.network.nfe.vis.maps.index.RTreeIndex
-
- All Implemented Interfaces:
java.io.Serializable
public class RTreeIndex extends AbstractSpatialIndex implements java.io.Serializable
Defines an RTree spatial index for a 2 dimensional space.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class oracle.spatial.network.nfe.vis.maps.index.AbstractSpatialIndex
properties
-
-
Constructor Summary
Constructors Constructor Description RTreeIndex()
Creates a new instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addEntry(GeoObject feature)
Adds an entry to the indexboolean
create(java.util.Properties props)
Creates the Rtree index with the given properties.boolean
create(java.util.Properties props, java.util.List<GeoObject> features)
Creates the Rtree object with the input features using their MBR's.RTree
getTree()
Returns the internal Rtree structureboolean
removeEntry(GeoObject feature)
Removes an entry from the indexjava.util.List<GeoObject>
searchEntries(java.awt.geom.Rectangle2D mbr)
Returns all the entry that interact with the giveb MBR-
Methods inherited from class oracle.spatial.network.nfe.vis.maps.index.AbstractSpatialIndex
getProperties
-
-
-
-
Method Detail
-
getTree
public RTree getTree()
Returns the internal Rtree structure- Returns:
-
create
public boolean create(java.util.Properties props)
Creates the Rtree index with the given properties.- Specified by:
create
in classAbstractSpatialIndex
- Parameters:
props
- the tree properties, which are: nodesize: the number of entries per node. Since this is a RAM- resident tree there is no need to match node size with disk pages and node sizes of 5-12 will give best results. Value 8 is used if this property is not defined. minimumFill: the number of entries in a node below which the node is considered underfull and the remaining entries orphaned and reinserted in the tree. If set to 1, there will be no orphaning. Value 1 is used if this property is not defined.- Returns:
- true if the Rtree could be initialized
-
create
public boolean create(java.util.Properties props, java.util.List<GeoObject> features)
Creates the Rtree object with the input features using their MBR's.- Specified by:
create
in classAbstractSpatialIndex
- Parameters:
props
- the tree properties, which are: nodesize: the number of entries per node. Since this is a RAM- resident tree there is no need to match node size with disk pages and node sizes of 5-12 will give best results. Value 8 is used if this property is not defined. minimumFill: the number of entries in a node below which the node is considered underfull and the remaining entries orphaned and reinserted in the tree. If set to 1, there will be no orphaning. Value 1 is used if this property is not defined.features
-- Returns:
-
addEntry
public boolean addEntry(GeoObject feature) throws java.lang.Exception
Adds an entry to the index- Specified by:
addEntry
in classAbstractSpatialIndex
- Parameters:
feature
-- Returns:
- true if the entry could be added
- Throws:
java.lang.Exception
-
removeEntry
public boolean removeEntry(GeoObject feature) throws java.lang.Exception
Removes an entry from the index- Specified by:
removeEntry
in classAbstractSpatialIndex
- Parameters:
feature
-- Returns:
- true if the entry could be removed
- Throws:
java.lang.Exception
-
searchEntries
public java.util.List<GeoObject> searchEntries(java.awt.geom.Rectangle2D mbr)
Returns all the entry that interact with the giveb MBR- Specified by:
searchEntries
in classAbstractSpatialIndex
- Parameters:
mbr
-- Returns:
- a list of geo-objects that interact with the MBR
-
-