Package com.luciad.tea.hypsometry
Class TLcdHypsometricSlopeAngle
java.lang.Object
com.luciad.tea.hypsometry.TLcdHypsometricSlopeAngle
- All Implemented Interfaces:
ILcdHypsometricValueProvider
This ILcdHypsometricValueProvider computes the the angle between a given 3D
reference direction and the normal. The reference direction should generally
have a positive z-component. The angle is expressed in radians. Negative
values are clamped to 0, so the values lie in the range [0, pi/2).
This provider is typically useful for computing the slope of the terrain, by using the reference direction (0, 0, 1). The computed values then correspond to the inclination of the terrain, ranging from 0 for horizontal terrain, over larger values for increasingly sloping terrain, to a value of pi/2 (in the limit) for vertical cliffs.
-
Constructor Summary
ConstructorDescriptionCreates a new TLcdHypsometricSlope for the reference direction (0, 0, 1).TLcdHypsometricSlopeAngle
(double aReferenceDirectionX, double aReferenceDirectionY, double aReferenceDirectionZ) Creates a new TLcdHypsometricSlope for the given reference direction.TLcdHypsometricSlopeAngle
(double aReferenceDirectionX, double aReferenceDirectionY, double aReferenceDirectionZ, ILcdHypsometricNormalProvider aHypsometricNormalProvider) Creates a new TLcdHypsometricSlope 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.double
Returns the z component of the reference direction.
-
Constructor Details
-
TLcdHypsometricSlopeAngle
public TLcdHypsometricSlopeAngle()Creates a new TLcdHypsometricSlope for the reference direction (0, 0, 1). -
TLcdHypsometricSlopeAngle
public TLcdHypsometricSlopeAngle(double aReferenceDirectionX, double aReferenceDirectionY, double aReferenceDirectionZ) Creates a new TLcdHypsometricSlope 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.aReferenceDirectionZ
- the z component of the reference direction.
-
TLcdHypsometricSlopeAngle
public TLcdHypsometricSlopeAngle(double aReferenceDirectionX, double aReferenceDirectionY, double aReferenceDirectionZ, ILcdHypsometricNormalProvider aHypsometricNormalProvider) Creates a new TLcdHypsometricSlope 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.aReferenceDirectionZ
- the z 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.
-
getReferenceDirectionZ
public double getReferenceDirectionZ()Returns the z component of the reference direction.- Returns:
- the z 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.
-