Class TLcdTerrainDistanceUtil

java.lang.Object
com.luciad.tea.TLcdTerrainDistanceUtil

public class TLcdTerrainDistanceUtil extends Object
Utility class to compute the distance between 2 points, taking into account the terrain underneath.
  • Constructor Details

    • TLcdTerrainDistanceUtil

      public TLcdTerrainDistanceUtil()
  • Method Details

    • terrainDistance

      public double terrainDistance(ILcdPoint aStartPoint, ILcdGeoReference aStartPointReference, ILcdPoint aEndPoint, ILcdGeoReference aEndPointReference, ILcdSegmentScanner aSegmentScanner, ALcdTerrainElevationProvider aTerrainElevationProvider, double aStepSize)
      Computes the distance between two points taking into account the terrain underneath and the path defined by the segment scanner.
      Parameters:
      aStartPoint - the starting point.
      aStartPointReference - the reference the start points coordinates are expressed in.
      aEndPoint - the end point.
      aEndPointReference - the reference the end points coordinates are expressed in.
      aSegmentScanner - defines the path between the start and end point.
      aTerrainElevationProvider - provides elevation information for intermediate points.
      aStepSize - defines the number of points the segment scanner will generate in between the start and end point. Expressed in meters.
      Returns:
      the distance between two points taking into account the terrain underneath and the path defined by the segment scanner. This method will return Double.NaN when the start point or the end point could not be expressed in the reference set in the scanner. The outcome should be checked with the method Double.isNaN(), not the = operator.
    • terrainDistance

      public double terrainDistance(ILcdPoint aStartPoint, ILcdGeoReference aStartPointReference, ILcdPoint aEndPoint, ILcdGeoReference aEndPointReference, ILcdSegmentScanner aSegmentScanner, ALcdTerrainElevationProvider aTerrainElevationProvider, double aStartStepSize, int aMaximumSamples, double aAbsoluteTolerance, double aRelativeTolerance, double aMinStepSize)
      Computes the distance between two points taking into account the terrain underneath and the path defined by the segment scanner. This method adaptively reduces the distance between two intermediate points until one of the stop conditions is met:
      • the difference between two consecutive calculations is smaller than a given absolute tolerance,
      • the difference between two consecutive calculations is relatively smaller than a given relative tolerance,
      • a calculation has used the maximum number of points,
      • a calculation has a step less or equal to the minimum step size.
      Parameters:
      aStartPoint - the starting point.
      aStartPointReference - the reference the start points coordinates are expressed in.
      aEndPoint - the end point.
      aEndPointReference - the reference the end points coordinates are expressed in.
      aSegmentScanner - defines the path between the start and end point.
      aTerrainElevationProvider - provides elevation information for intermediate points.
      aStartStepSize - defines the number of points the segment scanner will generate in between the start and end point in the first calculation. If this is smaller than the minimum step size then the minimum step size is used.
      aMaximumSamples - the maximum number of intermediate points in one calculation step to be used for the distance calculation.
      aAbsoluteTolerance - an upper limit, expressed in meters, for the difference between two consecutive calculations for the distance measurement of one segment.
      aRelativeTolerance - an upper limit for the difference relative to the total distance between two consecutive calculations for the distance measurement calculated for one segment.
      aMinStepSize - the minimum distance between two points used in the calculation.
      Returns:
      the distance between two points taking into account the terrain underneath and the path defined by the segment scanner. This method will return Double.NaN when the start point or the end point could not be expressed in the reference set in the scanner. The outcome should be checked with the method Double.isNaN(), not the = operator.
    • setModelModelTransformation

      public void setModelModelTransformation(ILcdModelModelTransformation aModelModelTransformation)
      Sets the model to model transformation to enable transformation of the start and end point to the segment scanners reference.
      Parameters:
      aModelModelTransformation - the transformation to use to transform the start and end point to the scanners reference. This will enable the scanner to produce meaningful points in between the start and end point.
    • setClassTraceOn

      public static void setClassTraceOn(boolean aClassTraceOn)
      Deprecated.
      This method has been deprecated. It is recommended to use the standard Java logging framework directly.
      Enables tracing for all instances of this class. If the argument is true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
      Parameters:
      aClassTraceOn - if true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
    • setTraceOn

      public void setTraceOn(boolean aTraceOn)
      Deprecated.
      This method has been deprecated. It is recommended to use the standard Java logging framework directly.
      Enables tracing for this class instance. Calling this method with either true or false as argument automatically turns off tracing for all other class instances for which setTraceOn has not been called. If the argument is false then only the informative, warning and error log messages are recorded.
      Parameters:
      aTraceOn - if true then all log messages are recorded for this instance. If false, then only the informative, warning and error log messages are recorded.
    • isTraceOn

      public boolean isTraceOn()
      Deprecated.
      This method has been deprecated. It is recommended to use the standard Java logging framework directly.
      Returns true if tracing is enabled for this class.
      Returns:
      true if tracing is enabled for this class, false otherwise.