Class 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 Detail

      • 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.
        Parameters:
        flowIter - the flow raster iterator.
        cols - the cols of the raster.
        rows - the rows of the raster.
        col - the col of the current node.
        row - the row of the current node.
    • Method Detail

      • isMarkedAsOutlet

        public boolean isMarkedAsOutlet()
        Returns:
        true if this node has a 10 value in the flow map.
      • isHeadingOutside

        public boolean isHeadingOutside()
        Returns:
        true if 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 - the Direction.
        Returns:
        the flow value.
      • goDownstream

        public FlowNode goDownstream()
        Get the next downstream node.
        Returns:
        the next downstream node or null if the end has been reached.
      • getEnteringNodes

        public List<FlowNode> getEnteringNodes()
        Gets all surrounding nodes that 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.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object