Skip navigation links
oracle.spatial.network.lod
Class GeodeticCostFunction
java.lang.Object
oracle.spatial.network.lod.GeodeticCostFunction
- All Implemented Interfaces:
- HeuristicCostFunction
-
public class GeodeticCostFunction
- extends java.lang.Object
- implements HeuristicCostFunction
This class implements the AStar heuristic cost as the 2D geodetic distance in meters between the current node and the goal node.
- Since:
- 11gR2
Constructor Summary |
GeodeticCostFunction(java.lang.String geometryUserDataName, java.lang.String xCoordUserDataName, java.lang.String yCoordUserDataName)
Creates a GeodeticCostFunction instance. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GeodeticCostFunction
public GeodeticCostFunction(java.lang.String geometryUserDataName,
java.lang.String xCoordUserDataName,
java.lang.String yCoordUserDataName)
- Creates a GeodeticCostFunction instance. The input parameters are interpreted as follows:
If neither xCoordUserDataName nor yCoordUserDataName is null, then the the heuristic cost is computed using the x and y coordinates stored as user data of the nodes;
Else if geometryUserDataName is not null, then the heuristic cost is computed using the JGeometry object stored as user data of the nodes;
If all of the input parameters are null, then the heuristic cost is computed using the JGeometry object obtained from the spatial node object. Note that in the last case, the input nodes must be of type SpatialNode or SpatialNetNode.
- Parameters:
geometryUserDataName
- user date name registered for geometries of the nodes
xCoordUserDataName
- user data name registered for x coordinates of the nodes
yCoordUserDataName
- user data name registered for y coordinates of the nodes
getHeuristicCost
public double getHeuristicCost(LogicalNode currentNode,
LogicalNode goalNode)
- Returns the heuristic cost between the current node and the goal node.
-
- Parameters:
currentNode
- current node
goalNode
- goal node
- Returns:
requiresUserData
public boolean requiresUserData()
Skip navigation links
Copyright © 2007, 2008, Oracle. All Rights Reserved.