jwo.landserf.process
Class RectifyThread

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

public class RectifyThread
extends LSThread
implements Scriptable

Rectifies a raster map using the supplied transformable class.

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
RectifyThread(GISFrame gisFrame)
          Prepares class for rectifying a raster map.
RectifyThread(GISFrame gisFrame, RasterMap newRast, Transformable transformer)
          Prepares the class for rectifying the primary raster held in gisFrame and placing the results in the given raster.
 
Method Summary
 boolean doCommand(LSCommand command)
          Performs the rectification based on the parameters provided in the scripting command.
 void doProcessing()
          Creates a rectified version of the primary raster stored in the GISFrame provided to the constructor.
 LSCommand getCommand()
          Reports the syntax required to rectify a raster via a scripting command.
 GISFrame getGISFrame()
          Retrieves the GISFrame that can be used for storing multiple spatial objects.
 Object getReturnedObject()
          Returns the rectified raster map.
 
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

RectifyThread

public RectifyThread(GISFrame gisFrame)
Prepares class for rectifying a raster map. This constructor is used when calling the process via a scripting command.

Parameters:
gisFrame - GUI in which to report results.

RectifyThread

public RectifyThread(GISFrame gisFrame,
                     RasterMap newRast,
                     Transformable transformer)
Prepares the class for rectifying the primary raster held in gisFrame and placing the results in the given raster.

Parameters:
gisFrame - Frame holding raster to transform and in which to report results.
newRast - New raster containing rectified surface.
transformer - Class doing the transformation.
Method Detail

getCommand

public LSCommand getCommand()
Reports the syntax required to rectify a raster via a scripting command.

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

doCommand

public boolean doCommand(LSCommand command)
Performs the rectification based on the parameters provided in the scripting command.

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

getReturnedObject

public Object getReturnedObject()
Returns the rectified raster map. If scripting command has yet to be issued this will return null.

Specified by:
getReturnedObject in interface Scriptable
Returns:
New spatial object or null if problems transforming or scripting 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()
Creates a rectified version of the primary raster stored in the GISFrame provided to the constructor. The rectified raster is placed inside the raster map object provided to the constructor (newRast).

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

Specified by:
doProcessing in class LSThread
See Also:
GISFrame


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