Skip navigation links

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


oracle.spatial.network.lod
Class NetworkBuffer

java.lang.Object
  extended by oracle.spatial.network.lod.NetworkBuffer


public class NetworkBuffer
extends java.lang.Object

A NetworkBuffer is defined by central points and the set of nodes and link intervals within certain radius from the cental points. A NetworkBuffer can return the minimum cost from a central point to any node or link interval covered by this NetworkBuffer.

Since:
Oracle Database 11g Release 2 (11.2)

Nested Class Summary
static class NetworkBuffer.DoubleInterval
          This class defines a double interval.
static class NetworkBuffer.Elements
          This class contains elements in a network buffer.
static class NetworkBuffer.LinkIntervals
          An instance of this class contains a LogicalLink object and a list of intervals associated with the link object.

 

Constructor Summary
NetworkBuffer(double radius, int direction)
          Constructs a network buffer instance.

 

Method Summary
 void addCentralPoint(PointOnNet centralPoint)
          Add a central point to network buffer.
 void addLinkIntervals(NetworkBuffer.LinkIntervals linkIntervals, double[] forwardLinkCosts, double[] backwardLinkCosts)
          Adds the intervals of a link.
 void addNode(LogicalNode node, double[] costs)
          Adds a node to the network buffer.
 PointOnNet[] getCentralPoints()
          Returns the central points.
 double[] getCosts(PointOnNet point)
          Returns the costs of the input point.
 int getDirection()
          Returns the direction (forward or backward) of the network buffer.
 NetworkBuffer.Elements getElements()
          Returns the elements in this network buffer.
 NetworkBuffer.DoubleInterval[] getLinkIntervalCosts(long linkId, NetworkBuffer.DoubleInterval interval)
          Returns the costs range to reach the input interval
 double[] getNodeCosts(long nodeId)
          Returns the minimum costs to reach the node from a central point.
 double getRadius()
          Returns the radius (size) of the network buffer.
 void removeCentralPoint(PointOnNet centralPoint)
          Removes a central point.
 void removeLink(long linkId)
          Removes the specified link and all associated intervals from the network buffer.
 void removeNode(long nodeId)
          Removes the specified node from the network buffer.
 NetworkBuffer subSet(double cost)
          Computes the subset of the network buffer.

 

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

 

Constructor Detail

NetworkBuffer

public NetworkBuffer(double radius,
                     int direction)
Constructs a network buffer instance.

Method Detail

getRadius

public double getRadius()
Returns the radius (size) of the network buffer.
Returns:

getDirection

public int getDirection()
Returns the direction (forward or backward) of the network buffer.
Returns:

addCentralPoint

public void addCentralPoint(PointOnNet centralPoint)
Add a central point to network buffer. Costs of central points are zero.
Parameters:
centralPoint - zero cost point

getCentralPoints

public PointOnNet[] getCentralPoints()
Returns the central points.
Returns:
central points

removeCentralPoint

public void removeCentralPoint(PointOnNet centralPoint)
Removes a central point.
Parameters:
centralPoint - central point to be removed

addLinkIntervals

public void addLinkIntervals(NetworkBuffer.LinkIntervals linkIntervals,
                             double[] forwardLinkCosts,
                             double[] backwardLinkCosts)
Adds the intervals of a link.
Parameters:
linkIntervals - intervals of a link
forwardLinkCosts - forward link costs
backwardLinkCosts - backward link costs

getCosts

public double[] getCosts(PointOnNet point)
Returns the costs of the input point. Returns null if the point in not covered by this network buffer.
Parameters:
point -
Returns:

getLinkIntervalCosts

public NetworkBuffer.DoubleInterval[] getLinkIntervalCosts(long linkId,
                                                           NetworkBuffer.DoubleInterval interval)
Returns the costs range to reach the input interval
Parameters:
interval - start/end percentage on the link
Returns:
costs range to reach the input interval`

addNode

public void addNode(LogicalNode node,
                    double[] costs)
Adds a node to the network buffer.
Parameters:
node - node
costs - minimum costs to reach the node from a central point

getNodeCosts

public double[] getNodeCosts(long nodeId)
Returns the minimum costs to reach the node from a central point.
Parameters:
nodeId - ID of the node
Returns:
costs to reach the node

getElements

public NetworkBuffer.Elements getElements()
Returns the elements in this network buffer.
Returns:
elements in the network buffer

removeLink

public void removeLink(long linkId)
Removes the specified link and all associated intervals from the network buffer.
Parameters:
linkId - ID of the link

removeNode

public void removeNode(long nodeId)
Removes the specified node from the network buffer.
Parameters:
nodeId - ID of the node

subSet

public NetworkBuffer subSet(double cost)
Computes the subset of the network buffer.
Parameters:
cost - cost of the subset
Returns:
a network buffer, which is a subset of this network buffer

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.