Skip navigation links

Oracle® Spatial Java API Reference
11g Release 2 (11.2)
E11829-02


oracle.spatial.network.lod
Class GeodeticCostFunction

java.lang.Object
  extended by 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:
Oracle Database 11g Release 2 (11.2)

Constructor Summary
GeodeticCostFunction(int userDataCategory, int xCoordUserDataIndex, int yCoordUserDataIndex, int geometryUserDataIndex)
          Creates a GeodeticCostFunction instance.

 

Method Summary
 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.
 int[] getUserDataCategories()
           

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Methods inherited from interface oracle.spatial.network.lod.HeuristicCostFunction
getHeuristicCost, getUserDataCategories

 

Constructor Detail

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 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.
Parameters:
userDataCategory - user data category
xCoordUserDataIndex - user data index registered for x coordinates of the nodes or points on link
yCoordUserDataIndex - user data index registered for y coordinates of the nodes or points on link
geometryUserDataIndex - user date index registered for geometries of the nodes or points on link

Method Detail

getHeuristicCost

public double getHeuristicCost(HeavyPointOnNet currentPoint,
                               HeavyPointOnNet goalPoint)
Returns the heuristic cost between the current node and the goal node.
Parameters:
currentPoint - current point
goalPoint - 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 node
goalNode - 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 node
goalPoint - 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 point
goalNode - goal node
Returns:

getUserDataCategories

public int[] getUserDataCategories()

Skip navigation links

Oracle® Spatial Java API Reference
11g Release 2 (11.2)
E11829-02


Copyright © 2007, 2011, Oracle and/or its affiliates. All Rights Reserved.