public abstract class ALcdCrossCountryHeightProviderDistanceFunction extends Object implements ILcdCrossCountryDistanceFunction
ALcdCrossCountryHeightProviderDistanceFunction
is an abstract class which can be
used to implement distance functions that are based on an ILcdHeightProvider
and
compute values using only the height values along the line between start and end point.
To use this class only the computeDistance(com.luciad.shape.ILcdPoint, double,
com.luciad.shape.ILcdPoint, double)
must still be implemented. This method will be called from
the ILcdCrossCountryDistanceFunction.computeDistance(com.luciad.shape.ILcdPoint,
com.luciad.shape.ILcdPoint)
implementation of this class.Modifier and Type | Class and Description |
---|---|
static class |
ALcdCrossCountryHeightProviderDistanceFunction.ComputationMode
Describes the mode in which the distances should be computed.
|
Constructor and Description |
---|
ALcdCrossCountryHeightProviderDistanceFunction(ILcdHeightProvider aHeightProvider)
Constructs a new
ALcdCrossCountryHeightProviderDistanceFunction based on
aHeightProvider . |
ALcdCrossCountryHeightProviderDistanceFunction(ILcdHeightProvider aHeightProvider,
double aSampleInterval)
Constructs a new
ALcdCrossCountryHeightProviderDistanceFunction based on
aHeightProvider . |
Modifier and Type | Method and Description |
---|---|
protected abstract double |
computeDistance(ILcdPoint aStartPoint,
double aStartValue,
ILcdPoint aEndPoint,
double aEndValue)
Computes the distance between 2 points.
|
double |
computeDistance(ILcdPoint aStartPoint,
ILcdPoint aEndPoint)
This method will call the
computeDistance(com.luciad.shape.ILcdPoint, double,
com.luciad.shape.ILcdPoint, double) method a number of times, depending on the computation
mode, to compute the distance between the specified points. |
ILcdBounds |
getBounds()
Returns the bounds of the
ILcdHeightProvider on which this distance function is
based. |
ALcdCrossCountryHeightProviderDistanceFunction.ComputationMode |
getComputationMode()
Returns the mode in which the distance computations are performed.
|
ILcdHeightProvider |
getHeightProvider()
Returns the
ILcdHeightProvider on which this distance function is based. |
double |
getSampleInterval()
Returns the sample interval used in the
ALcdCrossCountryHeightProviderDistanceFunction.ComputationMode.FIXED_INTERVAL
mode. |
void |
setComputationMode(ALcdCrossCountryHeightProviderDistanceFunction.ComputationMode aComputationMode)
Sets the mode in which the distance computations are be performed.
|
void |
setSampleInterval(double aSampleInterval)
Sets the sample interval in the
FIXED_INTERVAL mode. |
public ALcdCrossCountryHeightProviderDistanceFunction(ILcdHeightProvider aHeightProvider)
ALcdCrossCountryHeightProviderDistanceFunction
based on
aHeightProvider
. The distances will be computed in the ALcdCrossCountryHeightProviderDistanceFunction.ComputationMode.SIMPLE
mode.aHeightProvider
- the ILcdHeightProvider
the distance function is based onpublic ALcdCrossCountryHeightProviderDistanceFunction(ILcdHeightProvider aHeightProvider, double aSampleInterval)
ALcdCrossCountryHeightProviderDistanceFunction
based on
aHeightProvider
. The distances will be computed in the ALcdCrossCountryHeightProviderDistanceFunction.ComputationMode.FIXED_INTERVAL
mode.aHeightProvider
- the ILcdHeightProvider
the distance function is based onaSampleInterval
- the maximum distance between two consequent samples when computing a
distancepublic ALcdCrossCountryHeightProviderDistanceFunction.ComputationMode getComputationMode()
public void setComputationMode(ALcdCrossCountryHeightProviderDistanceFunction.ComputationMode aComputationMode)
aComputationMode
- the mode in which the distance computations should be performedNullPointerException
- if the specified computation mode is null
public double getSampleInterval()
ALcdCrossCountryHeightProviderDistanceFunction.ComputationMode.FIXED_INTERVAL
mode. This interval is the maximum distance between two consequent samples when computing a
distance.FIXED_INTERVAL
modepublic void setSampleInterval(double aSampleInterval)
FIXED_INTERVAL
mode.aSampleInterval
- the new sample interval in the FIXED_INTERVAL
modegetSampleInterval()
public ILcdHeightProvider getHeightProvider()
ILcdHeightProvider
on which this distance function is based.ILcdHeightProvider
on which this distance function is basedprotected abstract double computeDistance(ILcdPoint aStartPoint, double aStartValue, ILcdPoint aEndPoint, double aEndValue)
aStartPoint
- the start pointaStartValue
- the height at the start pointaEndPoint
- the end pointaEndValue
- the height at the end pointaStartPoint
and aEndPoint
public double computeDistance(ILcdPoint aStartPoint, ILcdPoint aEndPoint)
computeDistance(com.luciad.shape.ILcdPoint, double,
com.luciad.shape.ILcdPoint, double)
method a number of times, depending on the computation
mode, to compute the distance between the specified points.computeDistance
in interface ILcdCrossCountryDistanceFunction
aStartPoint
- the start point.aEndPoint
- the end point.aStartPoint
to aEndPoint
.public ILcdBounds getBounds()
ILcdHeightProvider
on which this distance function is
based.getBounds
in interface ILcdCrossCountryDistanceFunction