jwo.landserf.process
Class ProjectionThread

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

public class ProjectionThread
extends LSThread

Reprojects a spatial object between coordinate systems.

Version:
2.2, 26th January, 2005.
Author:
Jo Wood

Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ProjectionThread(GISFrame gisFrame, SpatialObject spObject, int newProjType)
          Projects the given spatial object using the given transformer.
 
Method Summary
 void doProcessing()
          Reprojects the spatial object provided to the constructor.
 SpatialObject getReprojectedSpatialObject()
          Retrieves the reprojected spatial object.
 
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

ProjectionThread

public ProjectionThread(GISFrame gisFrame,
                        SpatialObject spObject,
                        int newProjType)
Projects the given spatial object using the given transformer.

Parameters:
gisFrame - Frame holding spatial objects and in which to report results.
spObject - Spatial object to transform.
newProjType - Type of projection to perform.
Method Detail

doProcessing

public void doProcessing()
Reprojects the spatial object provided to the constructor. The newly created reprojected spatial object is added to the GISFrame provided to the constructor as either a primary raster or vector map. This can be retrieved directly via this class's method getReprojectedSpatialObject(), or by calling gisFrame.getRaster1(); or gisFrame.getVectorMap1();

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

Specified by:
doProcessing in class LSThread
See Also:
GISFrame

getReprojectedSpatialObject

public SpatialObject getReprojectedSpatialObject()
Retrieves the reprojected spatial object.

Returns:
Reprojected spatial object, or null if problem or process yet to take place.


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