jwo.landserf.process
Class BasinThread
java.lang.Object
java.lang.Thread
jwo.landserf.process.LSThread
jwo.landserf.process.BasinThread
- All Implemented Interfaces:
- Runnable, JWInterruptionListener
public class BasinThread
- extends LSThread
Calculates drainage basins from a surface and set of seed points.
- Version:
- 2.3, 8th October, 2007.
- Author:
- Jo Wood
Constructor Summary |
BasinThread(GISFrame gisFrame,
boolean useSeeds)
Processes the primary raster and vector maps to create the
drainage basins. |
Method Summary |
void |
doProcessing()
Performs the drainage basin segmentation. |
RasterMap |
getBasins()
Retrieves the newly created drainage basin surface. |
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 |
BasinThread
public BasinThread(GISFrame gisFrame,
boolean useSeeds)
- Processes the primary raster and vector maps to create the
drainage basins. Uses seed points defined by any point object
in the primary vector map to define the basin sinks/outflow points.
- Parameters:
gisFrame
- GISFrame holding DEM and seed points to process.useSeeds
- Determines if seed points are to be used for basin calculation.
doProcessing
public void doProcessing()
- Performs the drainage basin segmentation. Uses seed points defined
by any point object in the primary vector map to define the basin
sinks/outflow points. 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