jwo.landserf.process
Class SurfNetworkThread

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

public class SurfNetworkThread
extends LSThread
implements Scriptable

Calculates a vector surface network from a raster elevation model and surface feature raster.

Version:
2.3, 17th July, 2006.
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
SurfNetworkThread(GISFrame gisFrame)
          Initialises the surface network processing.
 
Method Summary
 boolean doCommand(LSCommand command)
          Creates the surface network.
 void doProcessing()
          Processes the raster DEM and surface feature layers extracting the surface network.
 LSCommand getCommand()
          Reports the syntax required to allow a metric surface network to be created via a scripting command.
 RasterMap getFetureNetworkRaster()
          Retrieves the newly created raster map representing thinned surface network.
 GISFrame getGISFrame()
          Retrieves the GISFrame that can be used for storing multiple spatial objects.
 Object getReturnedObject()
          Returns a vector map representing the surface network.
 VectorMap getSurfaceNetwork()
          Retrieves a newly created surface feature network.
 
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

SurfNetworkThread

public SurfNetworkThread(GISFrame gisFrame)
Initialises the surface network processing.

Parameters:
gisFrame - GIS frame containing rasters to process.
Method Detail

getCommand

public LSCommand getCommand()
Reports the syntax required to allow a metric surface network to be created via a scripting command.

Specified by:
getCommand in interface Scriptable
Returns:
Command syntax.

doCommand

public boolean doCommand(LSCommand command)
Creates the surface network. This method is used for scripting control.

Specified by:
doCommand in interface Scriptable
Parameters:
command - Command containing parameter values.
Returns:
True if the feature network creation is successful. If false, the details of the problem are reported to the gisFrame.

getReturnedObject

public Object getReturnedObject()
Returns a vector map representing the surface network. If command has yet to be issued this will return null.

Specified by:
getReturnedObject in interface Scriptable
Returns:
Vector map containing the surface network or null if problems or command has not yet been issued.

getGISFrame

public GISFrame getGISFrame()
Retrieves the GISFrame that can be used for storing multiple spatial objects.

Specified by:
getGISFrame in interface Scriptable
Returns:
GISFrame storing spatial objects.

doProcessing

public void doProcessing()
Processes the raster DEM and surface feature layers extracting the surface network. Generates a raster and vector map of the surface network (pits, peaks, passes, ridges and channels). The newly created raster and vector maps are added to the GISFrame provided to the constructor as a secondary raster and primary vector respectively. These can be retrieved directly via this class's method getFeatureNetworkRaster() and getFeatureNetworkVector() methods, or by calling gisFrame.getRaster2(); and gisFrame.getVectorMap1().

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

Specified by:
doProcessing in class LSThread
See Also:
GISFrame

getFetureNetworkRaster

public RasterMap getFetureNetworkRaster()
Retrieves the newly created raster map representing thinned surface network.

Returns:
Surface network raster, or null if problem or process yet to take place.

getSurfaceNetwork

public VectorMap getSurfaceNetwork()
Retrieves a newly created surface feature network.

Returns:
Vector map containing surface feature network, or null if problem or process yet to take place.


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