Class TLcdAverageVisibilityComposite

java.lang.Object
com.luciad.tea.viewshed.TLcdAverageVisibilityComposite
All Implemented Interfaces:
ILcdVisibilityComposite

public class TLcdAverageVisibilityComposite extends Object implements ILcdVisibilityComposite

This ILcdVisibilityComposite will output an average of all the provided viewshed visibilities.

For instance, if an instance of TLcdAverageVisibilityComposite would obtain visibilities 0.0, 0.0 and 1.0 respectively, then the result of this composite would be (1.0/3.0).

A possible use case for this composite implementation is the combination of multiple observers for the same 3D scene. The values can be interpreted as gradations of visibility as a function of visibility to amount of observers. For the above example of three observers this would mean that that the returned visibility times 3 can be interpreted the amount of observers the point is visible to. (1.0/3.0) means the point is visible to only one of three observers.

Figure 1: This class combines several visibilities to output their average. This is useful for example for visualizing the number of observers that can see a given region.
 TLcdAverageViewshedComposite
Since:
11.0
  • Constructor Details

    • TLcdAverageVisibilityComposite

      public TLcdAverageVisibilityComposite(int aNbViewsheds)
      Creates a new instance of TLcdAverageVisibilityComposite
      Parameters:
      aNbViewsheds - The number of viewsheds for which the average is computed
  • Method Details

    • initialVisibility

      public double initialVisibility()
      Description copied from interface: ILcdVisibilityComposite
      Returns the visibility value with which the compositing should be initialized.
      Specified by:
      initialVisibility in interface ILcdVisibilityComposite
      Returns:
      the visibility value with which the compositing should be initialized.
    • compose

      public double compose(double aPreviousVisibility, double aCurrentVisibility)
      Description copied from interface: ILcdVisibilityComposite
      Performs one compositing step by combining the previously accumulated visibility value with a new value.
      Specified by:
      compose in interface ILcdVisibilityComposite
      Parameters:
      aPreviousVisibility - the previously accumulated visibility value
      aCurrentVisibility - new visibility value
      Returns:
      the new composited visibility value
    • stop

      public boolean stop(double aVisibility)
      Description copied from interface: ILcdVisibilityComposite
      Checks whether additional compositing steps are useful.
      Specified by:
      stop in interface ILcdVisibilityComposite
      Parameters:
      aVisibility - the accumulated visibility value so far.
      Returns:
      whether compositing should be terminated