Package oracle.spatial.network.lod
Class GeodeticCostFunction
- java.lang.Object
-
- oracle.spatial.network.lod.GeodeticCostFunction
-
- All Implemented Interfaces:
HeuristicCostFunction
,XMLConfigurable
public class GeodeticCostFunction extends java.lang.Object implements HeuristicCostFunction, XMLConfigurable
This class implements the heuristic cost as the 2D geodetic distance in meters between the current node and the goal node.- Since:
- 11gR2
-
-
Constructor Summary
Constructors Constructor Description GeodeticCostFunction()
GeodeticCostFunction(int userDataCategory, int geometryUserDataIndex)
Creates a GeodeticCostFunction instance.GeodeticCostFunction(int userDataCategory, int xCoordUserDataIndex, int yCoordUserDataIndex)
Creates a GeodeticCostFunction instance.GeodeticCostFunction(int userDataCategory, int xCoordUserDataIndex, int yCoordUserDataIndex, int geometryUserDataIndex)
Creates a GeodeticCostFunction instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected double
getHeuristicCost(double longitude1, double latitude1, double longitude2, double latitude2)
The implementation of this abstract method should return the heuristic cost between point (x1, y1) and (x2, y2).protected double
getHeuristicCost(JGeometry currGeom, JGeometry goalGeom)
Returns the distance between two point geometries.double
getHeuristicCost(HeavyPointOnNet currentPoint, HeavyPointOnNet goalPoint)
Returns the heuristic cost between the current node and the goal node.double
getHeuristicCost(HeavyPointOnNet currentPoint, LogicalNode goalNode)
Returns the heuristic cost between the current node and the goal node.double
getHeuristicCost(LogicalNode currentNode, HeavyPointOnNet goalPoint)
Returns the heuristic cost between the current node and the goal node.double
getHeuristicCost(LogicalNode currentNode, LogicalNode goalNode)
Returns the heuristic cost between the current node and the goal node.protected double
getHeuristicCostGeometry(HeavyPointOnNet currentPoint, HeavyPointOnNet goalPoint)
Returns the heuristic cost between two points, where the coordinates of the points are stored in the geometry user data of the nodes.protected double
getHeuristicCostGeometry(HeavyPointOnNet currentPoint, LogicalNode goalNode)
Returns the heuristic cost between two points, where the coordinates of the points are stored in the geometry user data of the nodes.protected double
getHeuristicCostGeometry(LogicalNode currentNode, HeavyPointOnNet goalPoint)
Returns the heuristic cost between two points, where the coordinates of the points are stored in the geometry user data of the nodes.protected double
getHeuristicCostGeometry(LogicalNode currentNode, LogicalNode goalNode)
Returns the heuristic cost between two points, where the coordinates of the points are stored in the geometry user data of the nodes.protected double
getHeuristicCostXY(HeavyPointOnNet currentPoint, HeavyPointOnNet goalPoint)
Returns the heuristic cost between two points, where the coordinates of the points are stored in user data x and y of or the nodes.protected double
getHeuristicCostXY(HeavyPointOnNet currentPoint, LogicalNode goalNode)
Returns the heuristic cost between two points, where the coordinates of the points are stored in user data x and y of or the nodes.protected double
getHeuristicCostXY(LogicalNode currentNode, HeavyPointOnNet goalPoint)
Returns the heuristic cost between two points, where the coordinates of the points are stored in user data x and y of or the nodes.protected double
getHeuristicCostXY(LogicalNode currentNode, LogicalNode goalNode)
Returns the heuristic cost between two points, where the coordinates of the points are stored in user data x and y of or the nodes.int[]
getUserDataCategories()
java.lang.String
getXMLSchema()
void
init(org.w3c.dom.Element parameter)
void
setUserData(PointOnNet point, NetworkExplorer ne)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface oracle.spatial.network.lod.HeuristicCostFunction
getHeuristicCost, getUserDataCategories, setUserData
-
Methods inherited from interface oracle.spatial.network.lod.XMLConfigurable
getXMLSchema, init
-
-
-
-
Constructor Detail
-
GeodeticCostFunction
public GeodeticCostFunction()
-
GeodeticCostFunction
public GeodeticCostFunction(int userDataCategory, int xCoordUserDataIndex, int yCoordUserDataIndex, int geometryUserDataIndex)
Creates a GeodeticCostFunction instance. The input parameters are interpreted as follows:
If neither xCoordUserDataName nor yCoordUserDataIndex is -1, then the the heuristic cost is computed using the x and y coordinates stored as user data of the nodes;
Else if geometryUserDataIndex is not -1, then the heuristic cost is computed using the JGeometry object stored as user data of the nodes.- Parameters:
userDataCategory
- user data categoryxCoordUserDataIndex
- user data index registered for x coordinates of the nodes or points on linkyCoordUserDataIndex
- user data index registered for y coordinates of the nodes or points on linkgeometryUserDataIndex
- user date index registered for geometries of the nodes or points on link
-
GeodeticCostFunction
public GeodeticCostFunction(int userDataCategory, int xCoordUserDataIndex, int yCoordUserDataIndex)
Creates a GeodeticCostFunction instance.- Parameters:
userDataCategory
- user data categoryxCoordUserDataIndex
- user data index registered for x coordinates of the nodes or points on linkyCoordUserDataIndex
- user data index registered for y coordinates of the nodes or points on link
-
GeodeticCostFunction
public GeodeticCostFunction(int userDataCategory, int geometryUserDataIndex)
Creates a GeodeticCostFunction instance.- Parameters:
userDataCategory
- user data categorygeometryUserDataIndex
- user date index registered for geometries of the nodes or points on link
-
-
Method Detail
-
getHeuristicCost
protected double getHeuristicCost(double longitude1, double latitude1, double longitude2, double latitude2)
The implementation of this abstract method should return the heuristic cost between point (x1, y1) and (x2, y2).- Parameters:
longitude1
- x coordinate of the current pointlatitude1
- y coordinate of the current pointlongitude2
- x coordinate of the goal pointlatitude2
- y coordinate of the goal point- Returns:
-
init
public void init(org.w3c.dom.Element parameter)
-
getXMLSchema
public java.lang.String getXMLSchema()
-
getHeuristicCost
public double getHeuristicCost(HeavyPointOnNet currentPoint, HeavyPointOnNet goalPoint)
Returns the heuristic cost between the current node and the goal node.- Parameters:
currentPoint
- current pointgoalPoint
- goal point- Returns:
-
getHeuristicCostXY
protected double getHeuristicCostXY(HeavyPointOnNet currentPoint, HeavyPointOnNet goalPoint)
Returns the heuristic cost between two points, where the coordinates of the points are stored in user data x and y of or the nodes. When this method is used requiresUserData() must return true.- Parameters:
currentPoint
- current pointgoalPoint
- goal point- Returns:
-
getHeuristicCostGeometry
protected double getHeuristicCostGeometry(HeavyPointOnNet currentPoint, HeavyPointOnNet goalPoint)
Returns the heuristic cost between two points, where the coordinates of the points are stored in the geometry user data of the nodes. When this method is used requiresUserData() must return true.- Parameters:
currentPoint
- current pointgoalPoint
- goal point- Returns:
-
getHeuristicCost
public double getHeuristicCost(LogicalNode currentNode, LogicalNode goalNode)
Returns the heuristic cost between the current node and the goal node.- Parameters:
currentNode
- current nodegoalNode
- goal node- Returns:
-
getHeuristicCostXY
protected double getHeuristicCostXY(LogicalNode currentNode, LogicalNode goalNode)
Returns the heuristic cost between two points, where the coordinates of the points are stored in user data x and y of or the nodes. When this method is used requiresUserData() must return true.- Parameters:
currentNode
- current nodegoalNode
- goal node- Returns:
-
getHeuristicCostGeometry
protected double getHeuristicCostGeometry(LogicalNode currentNode, LogicalNode goalNode)
Returns the heuristic cost between two points, where the coordinates of the points are stored in the geometry user data of the nodes. When this method is used requiresUserData() must return true.- Parameters:
currentNode
- current nodegoalNode
- goal node- Returns:
-
getHeuristicCost
public double getHeuristicCost(LogicalNode currentNode, HeavyPointOnNet goalPoint)
Returns the heuristic cost between the current node and the goal node.- Parameters:
currentNode
- current nodegoalPoint
- goal point- Returns:
-
getHeuristicCostXY
protected double getHeuristicCostXY(LogicalNode currentNode, HeavyPointOnNet goalPoint)
Returns the heuristic cost between two points, where the coordinates of the points are stored in user data x and y of or the nodes. When this method is used requiresUserData() must return true.- Parameters:
currentNode
- current nodegoalPoint
- goal point- Returns:
-
getHeuristicCostGeometry
protected double getHeuristicCostGeometry(LogicalNode currentNode, HeavyPointOnNet goalPoint)
Returns the heuristic cost between two points, where the coordinates of the points are stored in the geometry user data of the nodes. When this method is used requiresUserData() must return true.- Parameters:
currentNode
- current nodegoalPoint
- goal point- Returns:
-
getHeuristicCost
public double getHeuristicCost(HeavyPointOnNet currentPoint, LogicalNode goalNode)
Returns the heuristic cost between the current node and the goal node.- Parameters:
currentPoint
- current pointgoalNode
- goal node- Returns:
-
getHeuristicCostXY
protected double getHeuristicCostXY(HeavyPointOnNet currentPoint, LogicalNode goalNode)
Returns the heuristic cost between two points, where the coordinates of the points are stored in user data x and y of or the nodes. When this method is used requiresUserData() must return true.- Parameters:
currentPoint
- current pointgoalNode
- goal node- Returns:
-
getHeuristicCostGeometry
protected double getHeuristicCostGeometry(HeavyPointOnNet currentPoint, LogicalNode goalNode)
Returns the heuristic cost between two points, where the coordinates of the points are stored in the geometry user data of the nodes. When this method is used requiresUserData() must return true.- Parameters:
currentPoint
- current pointgoalNode
- goal node- Returns:
-
getHeuristicCost
protected double getHeuristicCost(JGeometry currGeom, JGeometry goalGeom)
Returns the distance between two point geometries.- Parameters:
currGeom
- current geometrygoalGeom
- goal geometry- Returns:
-
getUserDataCategories
public int[] getUserDataCategories()
-
setUserData
public void setUserData(PointOnNet point, NetworkExplorer ne) throws LODNetworkException
- Throws:
LODNetworkException
-
-