jwo.landserf.process
Class SurfParam

java.lang.Object
  extended by jwo.landserf.process.SurfParam

public class SurfParam
extends Object

Calculates surface parameters from a RasterMap object.

Version:
2.3, 4th October, 2007.
Author:
Jo Wood

Field Summary
static int CHANNEL
          Channel feature.
static float DEG2RAD
          Converts degrees to radians.
static int PASS
          Pass (saddle) feature.
static int PEAK
          Peak feature.
static int PIT
          Pit feature.
static int PLANAR
          Planar (no) feature.
static float RAD2DEG
          Converts radians to degrees.
static int RIDGE
          Ridge feature.
static float TWOPI
          2*PI (360 degrees in radians).
static int UNDEFINED
          Undefined feature.
static int UPEAK
          'Universal peak'
static int UPIT
          'Universal pit' (e.g. sea).
 
Constructor Summary
SurfParam(GISFrame gisFrame, int paramType)
          Sets up a surface ready for parameterisation (slope, aspect etc) or feature extraction from a raster surface.
 
Method Summary
 float calcZAt(float easting, float northing)
          Calculates Z value at the given location using the currently set window size.
 void findParam()
          Does the calculation of the surface parameter (slope, aspect etc).
static String getFeatureName(int featureType)
          Returns a string representing the feature name of a given feature code.
 RasterMap getSurfParam()
          Returns the new raster surface containing the surface parameterisation.
 void setCallingThread(LSThread lsThread)
          Passes the thread that calls this process to the processor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNDEFINED

public static final int UNDEFINED
Undefined feature.

See Also:
Constant Field Values

PIT

public static final int PIT
Pit feature.

See Also:
Constant Field Values

CHANNEL

public static final int CHANNEL
Channel feature.

See Also:
Constant Field Values

PASS

public static final int PASS
Pass (saddle) feature.

See Also:
Constant Field Values

RIDGE

public static final int RIDGE
Ridge feature.

See Also:
Constant Field Values

PEAK

public static final int PEAK
Peak feature.

See Also:
Constant Field Values

PLANAR

public static final int PLANAR
Planar (no) feature.

See Also:
Constant Field Values

UPIT

public static final int UPIT
'Universal pit' (e.g. sea).

See Also:
Constant Field Values

UPEAK

public static final int UPEAK
'Universal peak'

See Also:
Constant Field Values

RAD2DEG

public static final float RAD2DEG
Converts radians to degrees.

See Also:
Constant Field Values

DEG2RAD

public static final float DEG2RAD
Converts degrees to radians.

See Also:
Constant Field Values

TWOPI

public static final float TWOPI
2*PI (360 degrees in radians).

See Also:
Constant Field Values
Constructor Detail

SurfParam

public SurfParam(GISFrame gisFrame,
                 int paramType)
Sets up a surface ready for parameterisation (slope, aspect etc) or feature extraction from a raster surface. The calculations done here are dependent only on the currently selected window size and decay exponents (stored in RasterMap).

Parameters:
gisFrame - GUI holding elevation raster and message output.
paramType - Parameter type to calculate (see RasterMap for available parameter types).
See Also:
RasterMap
Method Detail

setCallingThread

public void setCallingThread(LSThread lsThread)
Passes the thread that calls this process to the processor. If provided, this allows the processing to be interrupted. Typical use is to allow the user to interrupt the processing of large rasters or large range of scales. This method does not need to be called if processing is not to be interrupted.

Parameters:
lsThread - Thread that called this process.

findParam

public void findParam()
Does the calculation of the surface parameter (slope, aspect etc).


calcZAt

public float calcZAt(float easting,
                     float northing)
Calculates Z value at the given location using the currently set window size. If any part of the window contains null values, NO_VALUES is returned.

Parameters:
easting - Easting of point to query.
northing - Northing of point to query.
Returns:
Z value at requested point, OUT_OF_BOUNDS if location outside raster or NO_VALUE if local window contains any null values.

getSurfParam

public RasterMap getSurfParam()
Returns the new raster surface containing the surface parameterisation.

Returns:
The new parameterised raster surface.

getFeatureName

public static String getFeatureName(int featureType)
Returns a string representing the feature name of a given feature code.

Parameters:
featureType - The code representing the feature type.
Returns:
The name of a surface feature (pit, peak pass etc.).


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