Package com.luciad.tea.hypsometry
Class TLcdHypsometricOrientationAngle
java.lang.Object
com.luciad.tea.hypsometry.TLcdHypsometricOrientationAngle
- All Implemented Interfaces:
ILcdHypsometricValueProvider
This ILcdHypsometricValueProvider computes the angle between a given reference direction in the xy plane and the direction of steepest descent. The angle is expressed in radians, counter-clockwise, over the full circle [0, 2*pi].
-
Constructor Summary
ConstructorDescriptionCreates a new TLcdHypsometricOrientationAngle for the reference direction (0, 1).TLcdHypsometricOrientationAngle
(double aReferenceDirectionX, double aReferenceDirectionY) Creates a new TLcdHypsometricOrientationAngle for the given reference direction.TLcdHypsometricOrientationAngle
(double aReferenceDirectionX, double aReferenceDirectionY, ILcdHypsometricNormalProvider aHypsometricNormalProvider) Creates a new TLcdHypsometricOrientationAngle for the given reference direction and normal provider. -
Method Summary
Modifier and TypeMethodDescriptiondouble
computeValue
(ILcdMatrixView aMatrixView, int aX, int aY, double aElevationScale) Computes the hypsometric value at the given point.Returns the foot print of this provider.Returns the normal provider.double
Returns the maximum hypsometric value that this provider may return.double
Returns the minimum hypsometric value that this provider may return.double
Returns the x component of the reference direction.double
Returns the y component of the reference direction.
-
Constructor Details
-
TLcdHypsometricOrientationAngle
public TLcdHypsometricOrientationAngle()Creates a new TLcdHypsometricOrientationAngle for the reference direction (0, 1). -
TLcdHypsometricOrientationAngle
public TLcdHypsometricOrientationAngle(double aReferenceDirectionX, double aReferenceDirectionY) Creates a new TLcdHypsometricOrientationAngle for the given reference direction. The direction does not have to be normalized. The normal provider is a default, which computes normals based on 2x2 samples.- Parameters:
aReferenceDirectionX
- the x component of the reference direction.aReferenceDirectionY
- the y component of the reference direction.
-
TLcdHypsometricOrientationAngle
public TLcdHypsometricOrientationAngle(double aReferenceDirectionX, double aReferenceDirectionY, ILcdHypsometricNormalProvider aHypsometricNormalProvider) Creates a new TLcdHypsometricOrientationAngle for the given reference direction and normal provider. The direction does not have to be normalized.- Parameters:
aReferenceDirectionX
- the x component of the reference direction.aReferenceDirectionY
- the y component of the reference direction.aHypsometricNormalProvider
- the normal provider.
-
-
Method Details
-
getReferenceDirectionX
public double getReferenceDirectionX()Returns the x component of the reference direction.- Returns:
- the x component of the reference direction.
-
getReferenceDirectionY
public double getReferenceDirectionY()Returns the y component of the reference direction.- Returns:
- the y component of the reference direction.
-
getHypsometricNormalProvider
Returns the normal provider.- Returns:
- the normal provider.
-
getFootPrint
Description copied from interface:ILcdHypsometricValueProvider
Returns the foot print of this provider. For instance, if the hypsometric value at each point is computed based on the surrounding 3x3 matrix values, the foot print is the rectangle (-1, -1, 3, 3).- Specified by:
getFootPrint
in interfaceILcdHypsometricValueProvider
- Returns:
- the foot print of this provider.
-
getMinimumValue
public double getMinimumValue()Description copied from interface:ILcdHypsometricValueProvider
Returns the minimum hypsometric value that this provider may return.- Specified by:
getMinimumValue
in interfaceILcdHypsometricValueProvider
- Returns:
- the minimum hypsometric value.
-
getMaximumValue
public double getMaximumValue()Description copied from interface:ILcdHypsometricValueProvider
Returns the maximum hypsometric value that this provider may return.- Specified by:
getMaximumValue
in interfaceILcdHypsometricValueProvider
- Returns:
- the maximum hypsometric value.
-
computeValue
Description copied from interface:ILcdHypsometricValueProvider
Computes the hypsometric value at the given point.- Specified by:
computeValue
in interfaceILcdHypsometricValueProvider
- Parameters:
aMatrixView
- the matrix containing elevation values.aX
- the x ordinate in the matrix.aY
- the y ordinate in the matrix.aElevationScale
- the scale of the elevation values in the tiles, expressed in matrix units per tile elevation unit.- Returns:
- the computed hypsometric value, or NaN if it is unknown, for instance if not all required elevations are known.
-