jwo.landserf.process
Class BasinThread2

java.lang.Object
  extended by java.lang.Thread
      extended by jwo.landserf.process.LSThread
          extended by jwo.landserf.process.BasinThread2
All Implemented Interfaces:
Runnable, JWInterruptionListener

public class BasinThread2
extends LSThread

Calculates drainage basins from a surface and set of seed points.

Version:
2.3, 14th October, 2008.
Author:
Jo Wood

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
BasinThread2(GISFrame gisFrame, boolean useSeeds)
          Processes the primary raster map to create a set of drainage basins.
 
Method Summary
 void doProcessing()
          Performs the drainage basin segmentation.
 RasterMap getBasins()
          Retrieves the newly created drainage basin surface.
 
Methods inherited from class jwo.landserf.process.LSThread
checkStoppedThread, interruptionRequested, resetTimer, run, setErrorMessage, setFinalMessage, setMessage
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasinThread2

public BasinThread2(GISFrame gisFrame,
                    boolean useSeeds)
Processes the primary raster map to create a set of drainage basins. If useSeeds is true, any point object in the primary vector map will define the basin sinks/outflow points. If false, drainage basins are calculated from the edge of the raster only.

Parameters:
gisFrame - GISFrame holding DEM and seed points to process.
useSeeds - Determines if seed points are to be used for basin calculation.
Method Detail

doProcessing

public void doProcessing()
Performs the drainage basin segmentation. The drainage basin raster can be retrieved directly via this class's getBasins() method, or by calling gisFrame.getRaster2();.

Note that this method will be called automatically if this is run as a threaded process (e.g. myBasinThread.start()). Alternatively it can be called directly as a non-threaded process.

Specified by:
doProcessing in class LSThread
See Also:
GISFrame

getBasins

public RasterMap getBasins()
Retrieves the newly created drainage basin surface.

Returns:
New raster containing drainage basins flowing to each of the given seed points. Locations that do not flow into the seed points are given RasterMap.NO_VALUE.


Copyright Jo Wood, 1996-2009, last modified, 17th April, 2009