jwo.landserf.structure
Class RastSurf

java.lang.Object
  |
  +--jwo.landserf.structure.Raster
        |
        +--jwo.landserf.structure.RastSurf

public class RastSurf
extends Raster

Class for storing, visualising and analysing raster surfaces. Creates raster images based on colour table and/or shaded relief calculation. The two can be blended together as a single image. It is applicable to rasters containing ratio scale data. Allows multi-scale window analysis of surface.

Version:
1.8.0, 14th April, 2000.
Author:
Jo Wood

Field Summary
 
Fields inherited from class jwo.landserf.structure.Raster
ADJACENT, ASPECT, CENTRE_RES, CROSC, ELEV, ENCLOSES, FEATURE, FIRST_PARAM, LAST_PARAM, LONGC, MATCHES, MAXIC, MEAN_RES, MEANC, MINIC, NETWORK_FEATURE, OTHER, OUT_OF_BOUNDS, OVERLAPS, PLANC, PROFC, rast, rastColours, rastHead, RELIEF, SEPARATE, SLOPE, WITHIN
 
Constructor Summary
RastSurf()
          Creates minimal raster surface.
RastSurf(int nRows, int nCols)
          Creates empty raster surface of given dimensions.
RastSurf(int nRows, int nCols, double west, double south, double xRes, double yRes)
          Creates an empty raster surface with given dimensions and position.
RastSurf(RastSurf oldSurf)
          Creates a copy of an existing raster surface,
 
Method Summary
 float getCurveTol()
          Returns the currently selected curvature tolerance for feature extraction.
 double getDecayExp()
          Returns the currently selected local window distance decay exponent.
 float getDiffuse()
          Returns the diffuse constant used in surface for relief calculation.
 float getpBlend()
          Returns the currently selected weighting for this surface when image blending.
 float getShine()
          Returns the 'shininess' of the surface for relief calculation.
 float getSlopeTol()
          Returns the currently selected slope tolerance for feature extraction.
 float getSpecular()
          Returns the specular constant used in surface for relief calculation.
 void getSurfBlend(int[] img, RastSurf drape)
          Creates a blended image from this and the draped raster.
 void getSurfHueSat(int[] img, RastSurf drape)
          Creates a combined 'hue-saturation' image from this and another raster.
 void getSurfImg(int[] img)
          Converts raster into colour image for display.
 void getSurfShade(int[] img, RastSurf drape)
          Converts raster into shaded relief image for display.
 int getWSize()
          Returns the currently selected local window size.
 void setCurveTol(float ct)
          Sets a new curvature tolerance for feature extraction.
 void setDecayExp(double de)
          Sets a new local window distance decay exponent.
 void setDiffuse(float diffuse)
          Sets the diffuse constant used in surface for relief calculation.
 void setpBlend(float p)
          Sets the weighting for given to this surface when blending with another.
 void setShine(float shine)
          Sets the 'shininess' of the surface for relief calculation.
 void setSlopeTol(float st)
          Sets a new slope tolerance for feature extraction.
 void setSpecular(float specular)
          Sets the specular constant used in surface for relief calculation.
 void setWSize(int ws)
          Sets a new local window size.
 
Methods inherited from class jwo.landserf.structure.Raster
compare, getAttribute, getAttribute, getAzimAngle, getCol, getCol, getColourTable, getEast, getEasting, getEasting, getElevAngle, getFrequencyDist, getFrequencyDist, getFrequencyDist, getHammockDist, getHammockDist, getHeader, getMax, getMin, getNorth, getNorthing, getNorthing, getNotes, getNumCols, getNumRows, getpShade, getRastArray, getRaster, getRow, getRow, getSouth, getTitle, getType, getWest, getWindow, getXRes, getYRes, readFile, readFile, setAttribute, setAttribute, setAzimAngle, setColourTable, setEast, setElevAngle, setHeader, setNorth, setNotes, setNumCols, setNumRows, setpShade, setRastArray, setSouth, setTitle, setType, setWest, setXRes, setYRes, subset, toString, writeFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RastSurf

public RastSurf()
Creates minimal raster surface.


RastSurf

public RastSurf(int nRows,
                int nCols)
Creates empty raster surface of given dimensions.

Parameters:
nRows - Number of rows in raster surface.
nCols - Number of columns in raster surface.

RastSurf

public RastSurf(int nRows,
                int nCols,
                double west,
                double south,
                double xRes,
                double yRes)
Creates an empty raster surface with given dimensions and position.

Parameters:
nRows - Number of rows in raster.
nCols - Number of columns in raster.
west - Western boundary of raster.
south - Southern boundary of raster.
xRes - X-resolution of raster.
yRes - Y-resolution of raster.

RastSurf

public RastSurf(RastSurf oldSurf)
Creates a copy of an existing raster surface,

Parameters:
oldSurf - Original raster surface to copy.
Method Detail

getSurfImg

public void getSurfImg(int[] img)
Converts raster into colour image for display. Colours are based on colour table associated with raster.

Parameters:
img - Image array to store colours.

getSurfShade

public void getSurfShade(int[] img,
                         RastSurf drape)
Converts raster into shaded relief image for display. Blends shaded relief with raster colour table. The weightings of the two, and the sun position are part of the Raster class.

Parameters:
img - Image array to store colours.
drape - Raster to drape over surface.
See Also:
Raster

getSurfBlend

public void getSurfBlend(int[] img,
                         RastSurf drape)
Creates a blended image from this and the draped raster.

Parameters:
img - Image array to store colours.
drape - Raster holding the hue value to combine.

getSurfHueSat

public void getSurfHueSat(int[] img,
                          RastSurf drape)
Creates a combined 'hue-saturation' image from this and another raster. This intensity (or brightness) of this surface provides the saturation value, the drape provides the hue values.

Parameters:
img - Image array to store colours.
drape - Raster holding the hue value to combine.

getWSize

public int getWSize()
Returns the currently selected local window size.

Returns:
Local window size.

getShine

public float getShine()
Returns the 'shininess' of the surface for relief calculation.

Returns:
Shininess value (0 - 1).

getDiffuse

public float getDiffuse()
Returns the diffuse constant used in surface for relief calculation.

Returns:
Diffuse constant(0 - 1).

getSpecular

public float getSpecular()
Returns the specular constant used in surface for relief calculation.

Returns:
Specular constant(0 - 1).

getDecayExp

public double getDecayExp()
Returns the currently selected local window distance decay exponent.

Returns:
Local window distance decay exponent.

getSlopeTol

public float getSlopeTol()
Returns the currently selected slope tolerance for feature extraction. Slopes greater than this value can only be a RIDGE, a CHANNEL or PLANAR feature. Therefore, the higher the value, the smaller the proportion of the surface classified as ridges or channels.

Returns:
Slope tolerance in radians for feature extraction.
See Also:
SurfParam.RIDGE, SurfParam.CHANNEL, SurfParam.PLANAR

getCurveTol

public float getCurveTol()
Returns the currently selected curvature tolerance for feature extraction. The higher the value, the greater the proportion of the surface classified as planar.

Returns:
Curvature tolerance for feature extraction.

getpBlend

public float getpBlend()
Returns the currently selected weighting for this surface when image blending.

Returns:
Blending weighting (0-1).

setWSize

public void setWSize(int ws)
Sets a new local window size.

Parameters:
ws - New local window size.

setShine

public void setShine(float shine)
Sets the 'shininess' of the surface for relief calculation.

Parameters:
shine - Shininess value (typically 0 - 50).

setDiffuse

public void setDiffuse(float diffuse)
Sets the diffuse constant used in surface for relief calculation.

Parameters:
diffuse - Diffuse constant(0 - 1).

setSpecular

public void setSpecular(float specular)
Sets the specular constant used in surface for relief calculation.

Parameters:
specular - Specular constant(0 - 1).

setDecayExp

public void setDecayExp(double de)
Sets a new local window distance decay exponent.

Parameters:
de - New local window distance decay exponent.

setSlopeTol

public void setSlopeTol(float st)
Sets a new slope tolerance for feature extraction. Slopes greater than this value can only be a RIDGE, a CHANNEL or PLANAR feature. Therefore, the higher the value, the smaller the proportion of the surface classified as ridges or channels.

Parameters:
st - New slope tolerance in radians for feature extraction.
See Also:
SurfParam

setCurveTol

public void setCurveTol(float ct)
Sets a new curvature tolerance for feature extraction. The higher the value, the greater the proportion of the surface classified as planar.

Parameters:
ct - New curvature tolerance for feature extraction.
See Also:
SurfParam

setpBlend

public void setpBlend(float p)
Sets the weighting for given to this surface when blending with another.

Parameters:
p - Weighting (0-1) used for image blending.