Class FlowNode
- java.lang.Object
-
- org.hortonmachine.gears.libs.modules.Node
-
- org.hortonmachine.gears.libs.modules.FlowNode
-
public class FlowNode extends Node
A node in the grid environment of a digital elevation model.- Since:
- 0.7.6
- Author:
- Andrea Antonello (www.hydrologis.com)
-
-
Field Summary
Fields Modifier and Type Field Description intflowstatic intNETVALUEThe defaut value used for marking a network.static intOUTLETThe outlet value of flow.-
Fields inherited from class org.hortonmachine.gears.libs.modules.Node
col, cols, doubleNovalue, floatNovalue, gridIter, intNovalue, isValid, row, rows, touchesBound, touchesNovalue
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)List<FlowNode>getEnteringNodes()Gets all surroundingnodesthat DO flow into this node.intgetFlowAt(Direction direction)Get the value of the flow in one of the surrounding direction.FlowNodegetUpstreamTcaBased(javax.media.jai.iterator.RandomIter tcaIter, javax.media.jai.iterator.RandomIter hacklengthIter)Get the upstream node based on the max tca value.FlowNodegoDownstream()Get the next downstream node.inthashCode()booleanisHeadingOutside()booleanisMarkedAsOutlet()booleanisSource()Checks if it is a source node, i.e.StringtoString()-
Methods inherited from class org.hortonmachine.gears.libs.modules.Node
getDoubleValueFromMap, getFloatValueFromMap, getIntValueFromMap, getValueFromMap, isValid, setDoubleValueInMap, setFloatValueInMap, setIntValueInMap, setValueInMap, touchesBound, touchesNovalue
-
-
-
-
Field Detail
-
OUTLET
public static final int OUTLET
The outlet value of flow.- See Also:
- Constant Field Values
-
NETVALUE
public static final int NETVALUE
The defaut value used for marking a network.- See Also:
- Constant Field Values
-
flow
public final int flow
-
-
Constructor Detail
-
FlowNode
public FlowNode(javax.media.jai.iterator.RandomIter flowIter, int cols, int rows, int col, int row, Integer novalue)The constructor.
-
-
Method Detail
-
isMarkedAsOutlet
public boolean isMarkedAsOutlet()
- Returns:
trueif this node has a 10 value in the flow map.
-
isHeadingOutside
public boolean isHeadingOutside()
- Returns:
trueif this node is a pixel that will flow outside of the valid flow map.
-
isSource
public boolean isSource()
Checks if it is a source node, i.e. no others entering.- Returns:
- true if it is valid and a source node.
-
getFlowAt
public int getFlowAt(Direction direction)
Get the value of the flow in one of the surrounding direction.- Parameters:
direction- theDirection.- Returns:
- the flow value.
-
goDownstream
public FlowNode goDownstream()
Get the next downstream node.- Returns:
- the next downstream node or
nullif the end has been reached.
-
getEnteringNodes
public List<FlowNode> getEnteringNodes()
Gets all surroundingnodesthat DO flow into this node.- Returns:
- the nodes that flow into this node.
-
getUpstreamTcaBased
public FlowNode getUpstreamTcaBased(javax.media.jai.iterator.RandomIter tcaIter, javax.media.jai.iterator.RandomIter hacklengthIter)
Get the upstream node based on the max tca value.- Parameters:
tcaIter- the tca map.hacklengthIter- the optional hacklength map, if available it is used in cases with multiple equal in coming tcas.- Returns:
- the upstream node.
-
-