jwo.landserf.process
Class ContourThread

java.lang.Object
  extended byjava.lang.Thread
      extended byjwo.landserf.process.LSThread
          extended byjwo.landserf.process.ContourThread
All Implemented Interfaces:
JWInterruptionListener, Runnable

public class ContourThread
extends LSThread

Class for fitting contour lines through a gridded surface.

Version:
2.2, 5th December, 2004
Author:
Jo Wood adapted from CONREC (Bourke, 1987).

Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ContourThread(GISFrame gisFrame, float lowest, float interval, int gridWidth)
          Creates a contoured vector map of the given surface with the given minimum contour and vertical interval.
 
Method Summary
 void doProcessing()
          Creates a new contour vector map by threading contour segments through the primary raster stored in the GISFrame provided to the constructor.
 VectorMap getContourMap()
          Retrieves the newly created contour map.
 
Methods inherited from class jwo.landserf.process.LSThread
checkStoppedThread, interruptionRequested, resetTimer, run, setErrorMessage, setMessage
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, 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

ContourThread

public ContourThread(GISFrame gisFrame,
                     float lowest,
                     float interval,
                     int gridWidth)
Creates a contoured vector map of the given surface with the given minimum contour and vertical interval.

Parameters:
gisFrame - GISFrame holding raster to contour.
lowest - Lowest contour level.
interval - Vertical interval between contours.
gridWidth - Sampling frequency of raster.
Method Detail

doProcessing

public void doProcessing()
Creates a new contour vector map by threading contour segments through the primary raster stored in the GISFrame provided to the constructor. The newly created vector map containing the contours is added to the GISFrame provided to the constructor as a primary vector map. This can be retrieved by calling gisFrame.getVectorMap1(); or directly from this class via getContourMap().

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

Specified by:
doProcessing in class LSThread
See Also:
GISFrame

getContourMap

public VectorMap getContourMap()
Retrieves the newly created contour map.

Returns:
New contour map, or null if problems contouring or process yet to take place.


Copyright Jo Wood, 1996-2005, last modified, 11th March, 2005