public abstract class ALcdCrossCountryRasterDistanceFunction extends Object implements ILcdCrossCountryDistanceFunction
ALcdCrossCountryRasterDistanceFunction
is an abstract class which can be used to
implement distance functions that are based on an ILcdRaster
and compute values
using only the raster 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 |
ALcdCrossCountryRasterDistanceFunction.ComputationMode
Describes the mode in which the distances should be computed.
|
Constructor and Description |
---|
ALcdCrossCountryRasterDistanceFunction(ILcdRaster aRaster)
Constructs a new
ALcdCrossCountryRasterDistanceFunction based on
aRaster . |
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
ILcdRaster on which this distance function is based. |
ALcdCrossCountryRasterDistanceFunction.ComputationMode |
getComputationMode()
Returns the mode in which the distance computations are performed.
|
ILcdRaster |
getRaster()
Returns the
ILcdRaster on which this distance function is based. |
void |
setComputationMode(ALcdCrossCountryRasterDistanceFunction.ComputationMode aComputationMode)
Sets the mode in which the distance computations are be performed.
|
public ALcdCrossCountryRasterDistanceFunction(ILcdRaster aRaster)
ALcdCrossCountryRasterDistanceFunction
based on
aRaster
. The distances will be computed in the ALcdCrossCountryRasterDistanceFunction.ComputationMode.PRECISE
mode.aRaster
- the ILcdRaster
the distance function is based onpublic ALcdCrossCountryRasterDistanceFunction.ComputationMode getComputationMode()
public void setComputationMode(ALcdCrossCountryRasterDistanceFunction.ComputationMode aComputationMode)
aComputationMode
- the mode in which the distance computations should be performedNullPointerException
- if the specified computation mode is null
public ILcdRaster getRaster()
ILcdRaster
on which this distance function is based.ILcdRaster
on which this distance function is basedprotected abstract double computeDistance(ILcdPoint aStartPoint, double aStartValue, ILcdPoint aEndPoint, double aEndValue)
aStartPoint
- the start pointaStartValue
- the raster value at the start pointaEndPoint
- the end pointaEndValue
- the raster value 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()
ILcdRaster
on which this distance function is based.getBounds
in interface ILcdCrossCountryDistanceFunction