|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jwo.landserf.structure.Quadratic
public class Quadratic
Class for fitting a Quadratic surface through a local window of values. Uses least squares found through LU decomposition to calculate the 6 coefficients that represent the surface.
Field Summary | |
---|---|
static int |
CIRCULAR
Circular elliptic section. |
static int |
ELLIPTIC
Elliptic conic section. |
static int |
HORIZONTAL
Horizontal, planar conic section. |
static int |
HYPERBOLIC
Hyperbolic conic section. |
static int |
PARABOLIC
Parabolic conic section. |
static int |
PLANAR
Sloping planar conic section. |
Constructor Summary | |
---|---|
Quadratic(float[] x,
float[] y,
float cx,
float cy,
float radius,
double decayExp)
Solves the best-fit quadratic surface for a given set of coordinates. |
|
Quadratic(int wSize,
float gSize)
Creates the normal equations used to calculate the quadratic coefficients. |
|
Quadratic(int wSize,
float gSize,
double decayExp)
Creates the normal equations used to calculate the quadratic coefficients. |
Method Summary | |
---|---|
FeatureAxis |
getChannelAxis()
Reports the most channel like axis based on conic section analysis. |
float[] |
getCoeff(float[] zCoords)
Returns the 6 quadratic coefficients for a given set of irregular points. |
float[] |
getCoeff(float[][] window)
Returns the 6 quadratic coefficients a-f. |
float |
getCurveTol()
Reports the curvature tolerance used in feature classification. |
double |
getFlowDirection()
Reports the flow direction in radians anti-clockwise from N. |
float |
getGridSize()
Reports the grid size (resolution) used to generate the quadratic patch. |
FeatureAxis[] |
getIntersections()
Returns an array of axis objects containing the principal axes of any surface feature and the region of interest. |
float |
getMeanResidual(float[] coeff,
float[][] window)
Returns weighted Root Mean Squared residuals for a given set of quadratic coefficients and local window. |
float |
getPointConfidence()
Reports the confidence of point classification (pits, peaks, passes). |
int |
getType(float[] coeff)
Returns the type of conic section represented by the quadratic. |
double |
getXCentre()
Returns the x coordinate of the point of inflection of the quadratic. |
double |
getYCentre()
Returns the y coordinate of the point of inflection of the quadratic. |
float |
getZ(float[][] window,
float xOffset,
float yOffset)
Reports the height at a given offset from the centre of the quadratic surface. |
float |
getZ(float[] coeff,
float xOffset,
float yOffset)
Reports the height at a given offset from the centre of the quadratic surface. |
boolean |
isFlat(float[][] window)
Reports whether the quadratic representing the given window represents a flat horizontal surface or not. |
void |
setCurveTol(float curveTol)
Sets the curvature tolerance used in feature classification. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int HORIZONTAL
public static final int PLANAR
public static final int PARABOLIC
public static final int ELLIPTIC
public static final int CIRCULAR
public static final int HYPERBOLIC
Constructor Detail |
---|
public Quadratic(int wSize, float gSize)
wSize
- Size of local window (odd only).gSize
- Size of 1 grid cell (resolution). Assumes square grid cells (x and y resolutions identical).public Quadratic(int wSize, float gSize, double decayExp)
wSize
- Size of local window (odd only).gSize
- Size of 1 grid cell (resolution). Assumes square grid cells (x and y resolutions identical).decayExp
- Distance decay exponent (0 no decay, 1
linear distance decay, 2 distance squared
decay etc.)public Quadratic(float[] x, float[] y, float cx, float cy, float radius, double decayExp)
x
- Array of at least 6 x coordinates.y
- Array of at least 6 y coordinates.cx
- x coordinate of centre point of function.cy
- y coordinate of centre point of function.radius
- Radius of interest for feature classification (equivalent to
grid size for raster processing).decayExp
- Distance decay exponent(0 no decay, 1 linear distance decay,
2 distance squared decay etc.)Method Detail |
---|
public float[] getCoeff(float[][] window)
ax^2 + by^2 + cxy + dx +ey + f
.
window
- Array holding local window values.
public float[] getCoeff(float[] zCoords)
zCoords
- list of z coordinates defining surface heights.
public float getGridSize()
public float getZ(float[][] window, float xOffset, float yOffset)
getZ()
method.
window
- Array holding the local window values.xOffset
- Offset from the centre in the x direction.yOffset
- Offset from the centre in the y direction (positive values
below the centre, negative values above.
public float getZ(float[] coeff, float xOffset, float yOffset)
coeff
- Coefficients representing surface.xOffset
- Offset from the centre in the x direction.yOffset
- Offset from the centre in the y direction (positive values
below the centre, negative values above.
public float getMeanResidual(float[] coeff, float[][] window)
coeff
- Array holding the 6 quadratic coefficients.window
- Array holding local window values.
public boolean isFlat(float[][] window)
getType()
instead.
window
- Array holding local window values.
getType(float[])
public int getType(float[] coeff)
isFlat()
instead.
coeff
- Array holding the 6 quadratic coefficients.
isFlat(float[][])
public FeatureAxis[] getIntersections()
getType()
has been made.
FeatureAxis
public double getFlowDirection()
getType()
has been made.
Double.NaN
if
conic section is horizontal, circular or undefined.public FeatureAxis getChannelAxis()
public double getXCentre()
getType()
has been made.
public double getYCentre()
getType()
has been made.
public float getPointConfidence()
getType()
has been made.
public void setCurveTol(float curveTol)
curveTol
- New curvature tolerance (dimensionless).public float getCurveTol()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |