jwo.landserf.process
Class DemToTinThread
java.lang.Object
  
java.lang.Thread
      
jwo.landserf.process.LSThread
          
jwo.landserf.process.DemToTinThread
- All Implemented Interfaces: 
 - JWInterruptionListener, Runnable
 
- public class DemToTinThread
- extends LSThread
  
Converts a DEM to TIN representation. Uses the 'greedy insertion' 
 algorithm described by Garland & Heckbert (1995).
- Version:
 
  - 2.2, 5th December, 2004.
 
- Author:
 
  - Jo Wood
 
 
 
| 
Constructor Summary | 
DemToTinThread(GISFrame gisFrame,
               int numVertices,
               float tolRMSE,
               float tolError,
               boolean createErrorSurf)
 
          Converts a DEM into TIN representation.  | 
 
| 
Method Summary | 
 void | 
doProcessing()
 
          Convert the DEM stored as the primary raster in the GISFrame
 provided to the constructor into TIN representation.  | 
 RasterMap | 
getErrorMap()
 
          Retrieves the newly created raster map containing the TIN error map (if chosen). | 
 VectorMap | 
getTIN()
 
          Retrieves the newly created vector map containing the TIN. | 
 
 
| 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 | 
 
 
DemToTinThread
public DemToTinThread(GISFrame gisFrame,
                      int numVertices,
                      float tolRMSE,
                      float tolError,
                      boolean createErrorSurf)
- Converts a DEM into TIN representation. TIN detail can be determined by any 
 combination of numSamples, tolRMSE or tolError, where error is difference 
 between TIN and DEM height at any point.
 - Parameters:
 gisFrame - containing DEM and TIN.numVertices - Maximum number of vertices.tolRMSE - Maximum Root Mean Squared Error tolerated.tolError - Maximum error tolerated.createErrorSurf - Generates an error surface if true.
doProcessing
public void doProcessing()
- Convert the DEM stored as the primary raster in the 
GISFrame
 provided to the constructor into TIN representation. The newly created vector map 
 containing the TIN is added to the GISFrame provided to
 the constructor as a primary vector. This can be retrieved directly via
 this class's method getTIN(), or by calling gisFrame.getVector1();.
 If error map output has been chosen, the newly created raster map 
 containing the error surface is added to the GISFrame provided to
 the constructor as a secondary raster. This can be retrieved directly via
 this class's method getErrorMap(), or by calling gisFrame.getRaster2();.
 
 Note that this method will be called automatically if this is run as a threaded 
 process (e.g. myDemToTinThread.start()). Alternatively it can be called directly
 as a non-threaded process.
- Specified by:
 doProcessing in class LSThread
 
- See Also:
 GISFrame
 
 
getErrorMap
public RasterMap getErrorMap()
- Retrieves the newly created raster map containing the TIN error map (if chosen).
- Returns:
 - New TIN error map, or null if error map not chosen or process yet to take place.
 
 
 
getTIN
public VectorMap getTIN()
- Retrieves the newly created vector map containing the TIN.
- Returns:
 - New TIN, or null if process yet to take place.
 
 
 
Copyright Jo Wood, 1996-2005, last modified, 11th March, 2005