jwo.landserf.process
Class TinPointsThread

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

public class TinPointsThread
extends LSThread

Converts between a point collection and TIN in either direction.

Version:
2.3, 7th December, 2006.
Author:
Jo Wood

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
static int POINTS_TO_TIN
          Indicates a transformation from points to TIN.
static int TIN_TO_POINTS
          Indicates a transformation from TIN to points.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
TinPointsThread(GISFrame gisFrame, int direction)
          Converts between TIN and point collection.
 
Method Summary
 void doProcessing()
          Convert between the TIN and point representation in the direction specified in the constructor (direction).
 VectorMap getVectorMap()
          Retrieves either a TIN or collection of points depending on the direction of conversion specified in the constructor.
 
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
 

Field Detail

POINTS_TO_TIN

public static final int POINTS_TO_TIN
Indicates a transformation from points to TIN.

See Also:
Constant Field Values

TIN_TO_POINTS

public static final int TIN_TO_POINTS
Indicates a transformation from TIN to points.

See Also:
Constant Field Values
Constructor Detail

TinPointsThread

public TinPointsThread(GISFrame gisFrame,
                       int direction)
Converts between TIN and point collection. If direction is TIN_TO_POINTS, it will extract the vertices as a collection of points. Otherwise it will attempt to perform a Delaunay triangulation to create a TIN.

Parameters:
gisFrame - GUI containing TIN or points.
direction - Direction of transformation (either POINTS_TO_TIN or TIN_TO_POINTS).
Method Detail

doProcessing

public void doProcessing()
Convert between the TIN and point representation in the direction specified in the constructor (direction). A newly created vector map containing either the points extracted from a supplied TIN or the TIN created from the supplied points, is added as a primary vector map to the GISFrame provided to the constructor. It can be retrieved directly via this class's getVectorMap() method, or by calling gisFrame.getVectorMap1();.

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

Specified by:
doProcessing in class LSThread
See Also:
GISFrame

getVectorMap

public VectorMap getVectorMap()
Retrieves either a TIN or collection of points depending on the direction of conversion specified in the constructor.

Returns:
Vector map containing TIN or points, or null if process yet to take place.


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