public class TLcdHypsometricSlope extends Object implements ILcdHypsometricValueProvider
This provider is typically useful for computing hill shading, by selecting a reference direction that specifies the direction of the sun (in the local coordinate system of the raster). The computed values then correspond to diffuse shading resulting from the sunlight, ranging for 0 for unlit areas to 1 for brightly lit areas.
Constructor and Description |
---|
TLcdHypsometricSlope()
Creates a new TLcdHypsometricSlope for the reference direction
(0, 0, 1).
|
TLcdHypsometricSlope(double aReferenceDirectionX,
double aReferenceDirectionY,
double aReferenceDirectionZ)
Creates a new TLcdHypsometricSlope for the given reference direction.
|
TLcdHypsometricSlope(double aReferenceDirectionX,
double aReferenceDirectionY,
double aReferenceDirectionZ,
ILcdHypsometricNormalProvider aHypsometricNormalProvider)
Creates a new TLcdHypsometricSlope for the given reference direction
and normal provider.
|
Modifier and Type | Method and Description |
---|---|
double |
computeValue(ILcdMatrixView aMatrixView,
int aX,
int aY,
double aElevationScale)
Computes the hypsometric value at the given point.
|
Rectangle |
getFootPrint()
Returns the foot print of this provider.
|
ILcdHypsometricNormalProvider |
getHypsometricNormalProvider()
Returns the normal provider.
|
double |
getMaximumValue()
Returns the maximum hypsometric value that this provider may return.
|
double |
getMinimumValue()
Returns the minimum hypsometric value that this provider may return.
|
double |
getReferenceDirectionX()
Returns the x component of the reference direction.
|
double |
getReferenceDirectionY()
Returns the y component of the reference direction.
|
double |
getReferenceDirectionZ()
Returns the z component of the reference direction.
|
public TLcdHypsometricSlope()
public TLcdHypsometricSlope(double aReferenceDirectionX, double aReferenceDirectionY, double aReferenceDirectionZ)
aReferenceDirectionX
- the x component of the reference direction.aReferenceDirectionY
- the y component of the reference direction.aReferenceDirectionZ
- the z component of the reference direction.public TLcdHypsometricSlope(double aReferenceDirectionX, double aReferenceDirectionY, double aReferenceDirectionZ, ILcdHypsometricNormalProvider aHypsometricNormalProvider)
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.public double getReferenceDirectionX()
public double getReferenceDirectionY()
public double getReferenceDirectionZ()
public ILcdHypsometricNormalProvider getHypsometricNormalProvider()
public Rectangle getFootPrint()
ILcdHypsometricValueProvider
getFootPrint
in interface ILcdHypsometricValueProvider
public double getMinimumValue()
ILcdHypsometricValueProvider
getMinimumValue
in interface ILcdHypsometricValueProvider
public double getMaximumValue()
ILcdHypsometricValueProvider
getMaximumValue
in interface ILcdHypsometricValueProvider
public double computeValue(ILcdMatrixView aMatrixView, int aX, int aY, double aElevationScale)
ILcdHypsometricValueProvider
computeValue
in interface ILcdHypsometricValueProvider
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.