Class NFERTreeSpatialModel
- java.lang.Object
-
- oracle.spatial.network.nfe.model.spatial.NFERTreeSpatialModel
-
- All Implemented Interfaces:
NFESpatialModel
public class NFERTreeSpatialModel extends java.lang.Object implements NFESpatialModel
An implementation of NFESpatialModel that uses R-tree indices
-
-
Constructor Summary
Constructors Constructor Description NFERTreeSpatialModel(NFEModel model)Allocates a new spatial model associated to the given NFE model
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddNetworkElementIndex(NFENetworkElement netElem)Spatially-indexes a network elementjava.util.Collection<NFEFeatureElement>getFeatureElements(java.awt.geom.Area area)Gets all the feature elements interacting with the given area.java.util.Collection<NFEFeatureElement>getFeatureElements(java.awt.geom.Area area, long featLayerId)Gets all the feature elements interacting with the given area.java.util.Collection<NFEFeatureElement>getFeatureElements(java.awt.geom.Point2D point, double tolerance)Gets all the feature elements interacting with the given point.java.util.Collection<NFEFeatureElement>getFeatureElements(java.awt.geom.Point2D point, double tolerance, long featLayerId)Gets all the feature elements interacting with the given point.java.util.Collection<NFEFeatureElement>getFeatureElements(java.awt.geom.Rectangle2D rect)Gets all the feature elements interacting with the given rectangle.java.util.Collection<NFEFeatureElement>getFeatureElements(java.awt.geom.Rectangle2D rect, long featLayerId)Gets all the feature elements interacting with the given rectangle.java.util.Collection<NFENetworkElement>getNetworkElements(java.awt.geom.Area area)Gets all the network elements interacting with the given area.java.util.Collection<NFENetworkElement>getNetworkElements(java.awt.geom.Point2D point, double tolerance)Gets all the network elements interacting with the given point.java.util.Collection<NFENetworkElement>getNetworkElements(java.awt.geom.Rectangle2D rect)Gets all the network elements interacting with the given rectangle.booleanrefreshNetworkElementIndex(NFENetworkElement netElem)Refreshes the spatial index of the network element to reflect its actual geometry.booleanremoveNetworkElementIndex(NFENetworkElement netElem)Removes the index for the network element
-
-
-
Constructor Detail
-
NFERTreeSpatialModel
public NFERTreeSpatialModel(NFEModel model)
Allocates a new spatial model associated to the given NFE model- Parameters:
model- the current NFE model
-
-
Method Detail
-
addNetworkElementIndex
public boolean addNetworkElementIndex(NFENetworkElement netElem)
Description copied from interface:NFESpatialModelSpatially-indexes a network element- Specified by:
addNetworkElementIndexin interfaceNFESpatialModel- Parameters:
netElem- a network element instance- Returns:
- true if the element could be indexed
-
refreshNetworkElementIndex
public boolean refreshNetworkElementIndex(NFENetworkElement netElem)
Description copied from interface:NFESpatialModelRefreshes the spatial index of the network element to reflect its actual geometry. It should be called whenever the element's geometry changes.- Specified by:
refreshNetworkElementIndexin interfaceNFESpatialModel- Parameters:
netElem- a network element instance- Returns:
- true if the index could be refreshed.
-
removeNetworkElementIndex
public boolean removeNetworkElementIndex(NFENetworkElement netElem)
Description copied from interface:NFESpatialModelRemoves the index for the network element- Specified by:
removeNetworkElementIndexin interfaceNFESpatialModel- Parameters:
netElem- a network element instance- Returns:
- true if the index was removed.
-
getNetworkElements
public java.util.Collection<NFENetworkElement> getNetworkElements(java.awt.geom.Point2D point, double tolerance)
Description copied from interface:NFESpatialModelGets all the network elements interacting with the given point.- Specified by:
getNetworkElementsin interfaceNFESpatialModel- Parameters:
point- a spatial point in moodel's coordinate systemtolerance- the maximum distance an element can be from the target geometry to be considered in the result.- Returns:
- a collection containing all the network elements interacting with the point
-
getNetworkElements
public java.util.Collection<NFENetworkElement> getNetworkElements(java.awt.geom.Rectangle2D rect)
Description copied from interface:NFESpatialModelGets all the network elements interacting with the given rectangle.- Specified by:
getNetworkElementsin interfaceNFESpatialModel- Parameters:
rect- a rectangle in model's coordinate system- Returns:
- a collection containing all the network elements interacting with the rectangle
-
getNetworkElements
public java.util.Collection<NFENetworkElement> getNetworkElements(java.awt.geom.Area area)
Description copied from interface:NFESpatialModelGets all the network elements interacting with the given area.- Specified by:
getNetworkElementsin interfaceNFESpatialModel- Parameters:
area- an area in model's coordinate system- Returns:
- a collection containing all the network elements interacting with the area
-
getFeatureElements
public java.util.Collection<NFEFeatureElement> getFeatureElements(java.awt.geom.Point2D point, double tolerance)
Description copied from interface:NFESpatialModelGets all the feature elements interacting with the given point.- Specified by:
getFeatureElementsin interfaceNFESpatialModel- Parameters:
point- a spatial point in moodel's coordinate systemtolerance- the maximum distance an element can be from the target geometry to be considered in the result.- Returns:
- a collection containing all the feature elements interacting with the point
-
getFeatureElements
public java.util.Collection<NFEFeatureElement> getFeatureElements(java.awt.geom.Rectangle2D rect)
Description copied from interface:NFESpatialModelGets all the feature elements interacting with the given rectangle.- Specified by:
getFeatureElementsin interfaceNFESpatialModel- Parameters:
rect- a rectangle in model's coordinate system- Returns:
- a collection containing all the feature elements interacting with the rectangle
-
getFeatureElements
public java.util.Collection<NFEFeatureElement> getFeatureElements(java.awt.geom.Area area)
Description copied from interface:NFESpatialModelGets all the feature elements interacting with the given area.- Specified by:
getFeatureElementsin interfaceNFESpatialModel- Parameters:
area- an area in model's coordinate system- Returns:
- a collection containing all the feature elements interacting with the area
-
getFeatureElements
public java.util.Collection<NFEFeatureElement> getFeatureElements(java.awt.geom.Point2D point, double tolerance, long featLayerId)
Description copied from interface:NFESpatialModelGets all the feature elements interacting with the given point. Only the elements that belong to the given feature layer are retrieved.- Specified by:
getFeatureElementsin interfaceNFESpatialModel- Parameters:
point- a spatial point in moodel's coordinate systemtolerance- the maximum distance an element can be from the target geometry to be considered in the result.featLayerId- only feature elements from this feature layer are returned.- Returns:
- a collection containing all the feature elements interacting with the point
-
getFeatureElements
public java.util.Collection<NFEFeatureElement> getFeatureElements(java.awt.geom.Rectangle2D rect, long featLayerId)
Description copied from interface:NFESpatialModelGets all the feature elements interacting with the given rectangle. Only the elements that belong to the given feature layer are retrieved.- Specified by:
getFeatureElementsin interfaceNFESpatialModel- Parameters:
rect- a rectangle in model's coordinate systemfeatLayerId- only feature elements from this feature layer are returned.- Returns:
- a collection containing all the feature elements interacting with the rectangle
-
getFeatureElements
public java.util.Collection<NFEFeatureElement> getFeatureElements(java.awt.geom.Area area, long featLayerId)
Description copied from interface:NFESpatialModelGets all the feature elements interacting with the given area. Only the elements that belong to the given feature layer are retrieved.- Specified by:
getFeatureElementsin interfaceNFESpatialModel- Parameters:
area- an area in model's coordinate systemfeatLayerId- only feature elements from this feature layer are returned.- Returns:
- a collection containing all the feature elements interacting with the area
-
-