public class NetworkExplorer
extends java.lang.Object
networkExplorer.getNetNode(nodeId)The returned LogicalNetNode object contains reference to its adjacent network links, which in turn contains references to the next nodes, and so on.
netNode.getNextNodeIds(...), or netNode.getOutLinks(...)3. From the returned LogicalNetLink objects, get the adjacent network node objects (LogicalNetNode), e.g.,
netLink.getStartNode(), or netLink.getEndNode().4. At this point, you may be tempted to navigate further directly from these adjacent nodes. However, the network node objects returned from step 3 might be external node objects in the containing partition, thus, may not have all the references to their adjacent links. If you plan to navigate further from these adjacent nodes, you should always call the following method to ensure that you have the corresponding internal node object that contains all the references to its adjacent links.
networkExplorer.getNetNode(adjacentNode.getId())5. From the adjacent network node objects returned from step 4, you can continue navigating the network by repeating step 2 and 3.
netLink.toStandAloneLink(), or netNode.toStandAloneNode().
Modifier and Type | Field and Description |
---|---|
static int |
DIRECTION_BACKWARD |
static int |
DIRECTION_BOTH |
static int |
DIRECTION_FORWARD |
static int |
MIN_LINK_LEVEL |
Constructor and Description |
---|
NetworkExplorer(NetworkIO reader)
Constructs a NetworkExplorer with empty network updates.
|
Modifier and Type | Method and Description |
---|---|
LeveledNetworkCache |
getDynamicNetworkCache()
Returns the dynamic network cache.
|
HeavyPointOnNet[] |
getHeavyPointsOnNet(PointOnNet[] points, int[] userDataCategories, int[] featureLayers) |
LogicalLink |
getLink(long linkId, int[] userDataCategories)
Returns the standalone logical link.
|
LogicalNetLink |
getNetLink(long linkId, int linkLevel, int partitionId, int[] userDataCategories, int[] featureLayers)
Returns the network link from the specified partition.
|
LogicalNetNode |
getNetNode(long nodeId, int linkLevel, int[] userDataCategories, int[] featureLayers)
Returns the network node from the containing partition.
|
LogicalNetNode |
getNetNodeForDummyExternalNode(int partitionId, long adjacentNodeId, long incidentLinkId, int linkLevel, int[] userDataCategories, int[] featureLayers)
Returns the network node from the containing partition for the dummy external Node.
|
NetworkIO |
getNetworkIO()
Returns the network IO.
|
java.util.HashMap<java.lang.Integer,NetworkUpdate> |
getNetworkUpdates()
Returns the network updates for each link level.
|
LogicalNode |
getNode(long nodeId, int[] userDataCategories)
Returns the standalone node.
|
int |
getNodePartitionId(long nodeId, int linkLevel)
Returns the partition ID for the specified node.
|
LogicalPartition |
getPartition(int partitionId, int linkLevel, int[] userDataCategories, int[] featureLayers)
Returns the partition.
|
NetworkIO |
getReader()
Deprecated.
use getNetworkIO()
|
static int |
getReverseDirection(int direction) |
void |
setNetworkUpdate(int linkLevel, NetworkUpdate networkUpdate)
Sets the network update object and initialize the dynamic cache.
|
void |
setNetworkUpdates(java.util.HashMap<java.lang.Integer,NetworkUpdate> networkUpdates)
Sets the network update objects and re-initialize the dynamic cache.
|
void |
setReader(NetworkIO reader)
Sets the network reader and the maximum link level.
|
public static final int DIRECTION_BOTH
public static final int DIRECTION_FORWARD
public static final int DIRECTION_BACKWARD
public static final int MIN_LINK_LEVEL
public NetworkExplorer(NetworkIO reader) throws LODNetworkException
reader
-LODNetworkException
public static int getReverseDirection(int direction)
public void setNetworkUpdates(java.util.HashMap<java.lang.Integer,NetworkUpdate> networkUpdates)
networkUpdates
- network update objects for different link levelspublic void setNetworkUpdate(int linkLevel, NetworkUpdate networkUpdate)
networkUpdate
- network update objectpublic HeavyPointOnNet[] getHeavyPointsOnNet(PointOnNet[] points, int[] userDataCategories, int[] featureLayers) throws LODNetworkException
LODNetworkException
public LogicalLink getLink(long linkId, int[] userDataCategories) throws LODNetworkException
linkId
- link IDuserDataCategories
- If set to true, this method will return a SpatialLink.LODNetworkException
public LogicalNode getNode(long nodeId, int[] userDataCategories) throws LODNetworkException
nodeId
- node IDuserDataCategories
- If set to true, this method will return a SpatialNode.LODNetworkException
public LogicalPartition getPartition(int partitionId, int linkLevel, int[] userDataCategories, int[] featureLayers) throws LODNetworkException
partitionId
- partition IDlinkLevel
- link leveluserDataCategories
-LODNetworkException
public int getNodePartitionId(long nodeId, int linkLevel) throws LODNetworkException
nodeId
- node IDlinkLevel
- link levelLODNetworkException
public LogicalNetNode getNetNode(long nodeId, int linkLevel, int[] userDataCategories, int[] featureLayers) throws LODNetworkException
nodeId
- node IDlinkLevel
- link leveluserDataCategories
-LODNetworkException
public LogicalNetNode getNetNodeForDummyExternalNode(int partitionId, long adjacentNodeId, long incidentLinkId, int linkLevel, int[] userDataCategories, int[] featureLayers) throws LODNetworkException
partitionId
- ID of the partition that owns the external nodeadjacentNodeId
- ID of the node on the other side of the incident linkincidentLinkId
- ID of the link that is incident to the external nodelinkLevel
- link level of the containing partitionuserDataCategories
-LODNetworkException
public LogicalNetLink getNetLink(long linkId, int linkLevel, int partitionId, int[] userDataCategories, int[] featureLayers) throws LODNetworkException
linkId
- link IDlinkLevel
- link levelpartitionId
- ID of the partition that owns the linkuserDataCategories
-LODNetworkException
public void setReader(NetworkIO reader) throws LODNetworkException
reader
- network readerLODNetworkException
public NetworkIO getReader()
public NetworkIO getNetworkIO()
public java.util.HashMap<java.lang.Integer,NetworkUpdate> getNetworkUpdates()
public LeveledNetworkCache getDynamicNetworkCache()