Class TLcdVVTerrainProfileModel

java.lang.Object
com.luciad.view.vertical.ALcdVVModel
com.luciad.tea.TLcdVVTerrainProfileModel
All Implemented Interfaces:
ILcdVVModel

@Deprecated public class TLcdVVTerrainProfileModel extends ALcdVVModel
Deprecated.
As of 2023.0, this class has been deprecated. Use TLcdVVTerrainModel instead.

ILcdVVModel to show a terrain profile in a Vertical View.

The preferred way of using this class is:

  • call setGXYView() to set the view that contains the rasters.
  • call setPointListGXYLayer() to set the layer that contains the point list for which the profile should be shown.
  • call setPointList() to set the point list for which the profile should be displayed.
  • call update() to update the model.

For backward compatibility, it is possible to skip the setting of the point list and call updateTerrainProfileModel() to automatically find the first selected point list in the given layer and update the profile model with this one.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected ILcdPointList
    Deprecated.
    An ILcdPointList indicating the terrain profile
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    getDistance(int i, int j)
    Deprecated.
    Returns the distance between the given two points.
    Deprecated.
    Returns the view on which the point list is painted and which contains the rasters.
    getPoint(int aPointIndex)
    Deprecated.
     
    int
    Deprecated.
     
    Deprecated.
    Gets the point list for which the terrain elevation will be displayed.
    Deprecated.
    Returns the layer that contains the point list for which the profile is shown.
    protected ILcdPointList
    Deprecated.
    Preferred usage: set point list manually using setPointList().
    Deprecated.
    Gets the TLcdProfileGenerator utility class that will be used for generating profiles.
    int
    Deprecated.
    Gets the scan resolution.
    getSegmentProfile(int aSegmentIndex)
    Deprecated.
    Returns an array containing the terrain elevation data for a certain segment.
    int
    Deprecated.
     
    boolean
    Deprecated.
     
    boolean
    Deprecated.
    If this property is true, this class will listen for changes to the current point list by adding a listener to the model and update the model (and the view) automatically when the point list is changed.
    boolean
    Deprecated.
     
    boolean
    Deprecated.
    This method has been deprecated.
    double
    maxZ(int aSubProfilePointIndex, int aSegmentIndex, int aSubProfileIndex)
    Deprecated.
     
    double
    minZ(int aSubProfilePointIndex, int aSegmentIndex, int aSubProfileIndex)
    Deprecated.
     
    void
    setAboveTerrain(boolean aAboveTerrain)
    Deprecated.
    If set to true, the terrain elevation will be added to the height of the point list's points.
    void
    setAutoUpdate(boolean aAutoUpdate)
    Deprecated.
    Set autoUpdate on/off.
    static void
    setClassTraceOn(boolean aClassTraceOn)
    Deprecated.
    This method has been deprecated.
    void
    Deprecated.
    Set the view on which the point list is painted and which contains the rasters.
    void
    Deprecated.
    Set the point list for which the terrain elevation will be displayed.
    void
    Deprecated.
    Set the layer that contains the point list for which the profile is shown.
    void
    setPointZ(int aIndex, double aZ, boolean isLastInRow)
    Deprecated.
    This method will be called whenever a point of the main-profile is being dragged so that its Z-dimension needs to be changed.
    void
    Deprecated.
    Set the TLcdProfileGenerator utility class that will be used for generating profiles.
    void
    setScanResolution(int aScanResolution)
    Deprecated.
    Set the resolution of the scan used to build the profile.
    void
    setTraceOn(boolean aTraceOn)
    Deprecated.
    This method has been deprecated.
    float
    stepLenghtRatio(int aSubProfilePointIndex, int aSegmentIndex, int aSubProfileIndex)
    Deprecated.
    Returns where the given sub-profile point is positioned on the X-axis.
    int
    subProfilePointCount(int aSegmentIndex, int aSubProfileIndex)
    Deprecated.
    Returns the number of points (steps) of a sub-profile for the given main profile segment.
    boolean
    update(boolean aFireEvent)
    Deprecated.
    Causes the model to update itself.
    void
    Deprecated.
    Use update( boolean ).

    Methods inherited from class com.luciad.view.vertical.ALcdVVModel

    addChangeListener, fireChangeModel, removeChangeListener

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • fAboveTerrainPointList

      protected ILcdPointList fAboveTerrainPointList
      Deprecated.
      An ILcdPointList indicating the terrain profile
  • Constructor Details

    • TLcdVVTerrainProfileModel

      public TLcdVVTerrainProfileModel()
      Deprecated.
  • Method Details

    • getDistance

      public double getDistance(int i, int j)
      Deprecated.
      Description copied from class: ALcdVVModel
      Returns the distance between the given two points. This distance typically determines the X-axis of a VV panel. The distance unit can be meters, degrees, seconds, ...

      This implementation computes a distance in degrees along a great circle on the globe. Override this method if the distance is not expressed as a length (for example, you're using time) or if you like to use geodetic, rhumb, or cartesian distances.

      Specified by:
      getDistance in interface ILcdVVModel
      Overrides:
      getDistance in class ALcdVVModel
      Parameters:
      i - the index of the first point on the main profile.
      j - the index of the second point on the main profile
      Returns:
      the distance between the 2 points along a great circle on the globe.
    • getProfileGenerator

      public TLcdProfileGenerator getProfileGenerator()
      Deprecated.
      Gets the TLcdProfileGenerator utility class that will be used for generating profiles.
      Returns:
      the TLcdProfileGenerator instance.
      See Also:
    • setProfileGenerator

      public void setProfileGenerator(TLcdProfileGenerator aProfileGenerator)
      Deprecated.
      Set the TLcdProfileGenerator utility class that will be used for generating profiles.
      Parameters:
      aProfileGenerator - the TLcdProfileGenerator instance.
      See Also:
    • setPointList

      public void setPointList(ILcdPointList aPointList)
      Deprecated.
      Set the point list for which the terrain elevation will be displayed.

      Note that when a new pointList and pointListGXYLayer combination is set, the method update(boolean) should be called to update the internal state of this instance.

      Parameters:
      aPointList - The ILcdPointList to be set
      See Also:
    • getPointList

      public ILcdPointList getPointList()
      Deprecated.
      Gets the point list for which the terrain elevation will be displayed.
      Returns:
      The point list for which the terrain elevation will be displayed.
      See Also:
    • setPointListGXYLayer

      public void setPointListGXYLayer(ILcdGXYLayer aGXYLayer)
      Deprecated.
      Set the layer that contains the point list for which the profile is shown.

      Note that when a new pointList and pointListGXYLayer combination is set, the method update(boolean) should be called to update the internal state of this instance.

      Parameters:
      aGXYLayer - the layer that contains the point list for which the profile is shown.
      See Also:
    • getPointListGXYLayer

      public ILcdGXYLayer getPointListGXYLayer()
      Deprecated.
      Returns the layer that contains the point list for which the profile is shown.
      Returns:
      The layer that contains the point list for which the profile is shown.
      See Also:
    • setGXYView

      public void setGXYView(ILcdGXYView aView)
      Deprecated.
      Set the view on which the point list is painted and which contains the rasters.
      Parameters:
      aView - the view on which the point list is painted and which contains the rasters.
      See Also:
    • getGXYView

      public ILcdGXYView getGXYView()
      Deprecated.
      Returns the view on which the point list is painted and which contains the rasters.
      Returns:
      The view on which the point list is painted and which contains the rasters.
      See Also:
    • update

      public boolean update(boolean aFireEvent)
      Deprecated.
      Causes the model to update itself. This method should be invoked whenever the user has set a new pointList and pointListGXYLayer combination to this instance. The method will update the terrain profile it represents and, depending on the fire event argument, will fire a change event when the update is done.
      Parameters:
      aFireEvent - A flag indicating whether a change event should be fired.
      Returns:
      true if terrain data was found, false otherwise.
    • getSegmentProfile

      public ILcdPoint[] getSegmentProfile(int aSegmentIndex)
      Deprecated.
      Returns an array containing the terrain elevation data for a certain segment.
      Parameters:
      aSegmentIndex - The index of the required segment.
      Returns:
      An array of ILcdPoint objects of which the z-component represents the terrain elevation.
    • getScanResolution

      public int getScanResolution()
      Deprecated.
      Gets the scan resolution.
      Returns:
      The resolution.
      See Also:
    • setScanResolution

      public void setScanResolution(int aScanResolution)
      Deprecated.
      Set the resolution of the scan used to build the profile. This is the distance between scanned points in meters.
      Parameters:
      aScanResolution - A positive and non-zero integer.
      See Also:
    • subProfilePointCount

      public int subProfilePointCount(int aSegmentIndex, int aSubProfileIndex) throws IndexOutOfBoundsException
      Deprecated.
      Description copied from interface: ILcdVVModel
      Returns the number of points (steps) of a sub-profile for the given main profile segment.
      Parameters:
      aSegmentIndex - the index of the segment in the main profile
      aSubProfileIndex - the index of the sub-profile to use
      Returns:
      For a given segment and for one specific sub-profile, how many points are contained.
      Throws:
      IndexOutOfBoundsException
    • getPointCount

      public int getPointCount()
      Deprecated.
      Returns:
      the number of points on the main-profile.
    • minZ

      public double minZ(int aSubProfilePointIndex, int aSegmentIndex, int aSubProfileIndex) throws IndexOutOfBoundsException
      Deprecated.
      Parameters:
      aSubProfilePointIndex - the index of the sub-profile point whose altitude to retrieve
      aSegmentIndex - the main-profile segment of the sub-profile point A segment is a line-piece drawn between two main-profile points.
      aSubProfileIndex - the index of the sub-profile to use
      Returns:
      Should return the minimum altitude for one specific sub-profile-point. This minZ value will be used when the rendering mode for this sub-profile is BOTTOM_LINE, FILLED or POLYGON.
      Throws:
      IndexOutOfBoundsException
    • getPoint

      public ILcdPoint getPoint(int aPointIndex) throws IndexOutOfBoundsException
      Deprecated.
      Parameters:
      aPointIndex - the index of the point in the main profile
      Returns:
      a point at a given index on the main-profile.
      Throws:
      IndexOutOfBoundsException
      See Also:
    • setPointZ

      public void setPointZ(int aIndex, double aZ, boolean isLastInRow) throws IndexOutOfBoundsException
      Deprecated.
      Description copied from interface: ILcdVVModel
      This method will be called whenever a point of the main-profile is being dragged so that its Z-dimension needs to be changed. If isLastInRow is false, the user should consider caching the Z-value.
      Parameters:
      aIndex - The index of the point being dragged.
      aZ - The new altitude for the point.
      isLastInRow - While the user is dragging the point, this parameter will be false, at the release of the mouse this parameter will be true.
      Throws:
      IndexOutOfBoundsException
    • getSubProfileCount

      public int getSubProfileCount()
      Deprecated.
      Returns:
      the number of sub-profiles in this ILcdVVModel.
    • isEditable

      public boolean isEditable()
      Deprecated.
      Returns:
      true if editing of the main-profile (dragging the points) is allowed.
    • maxZ

      public double maxZ(int aSubProfilePointIndex, int aSegmentIndex, int aSubProfileIndex) throws IndexOutOfBoundsException
      Deprecated.
      Parameters:
      aSubProfilePointIndex - the index of the sub-profile point whose altitude to retrieve
      aSegmentIndex - the main-profile segment to retrieve the step length for. A segment is a line-piece drawn between two main-profile points.
      aSubProfileIndex - the index of the sub-profile to use
      Returns:
      Should return the maximum altitude for one specific sub-profile-point. This maxZ value will be used when rendering mode for this sub-profile is TOP_LINE, FILLED or POLYGON.
      Throws:
      IndexOutOfBoundsException
    • stepLenghtRatio

      public float stepLenghtRatio(int aSubProfilePointIndex, int aSegmentIndex, int aSubProfileIndex) throws IndexOutOfBoundsException
      Deprecated.
      Description copied from interface: ILcdVVModel
      Returns where the given sub-profile point is positioned on the X-axis. More precisely, this method returns the percentage on the X-axis the given sub-profile point represents on the given main profile segment. The sum of all the ratios for one sub-profile on the segment should be 1.
      Parameters:
      aSubProfilePointIndex - defines the step. It is the point to the right of the step, so it can never be less than 1,
      aSegmentIndex - the main-profile segment to retrieve the step length for. A segment is a line-piece drawn between two main-profile points.
      aSubProfileIndex - the sub-profile to retrieve the step length ratio for
      Returns:
      the percentage on the X-axis the given sub-profile step represents
      Throws:
      IndexOutOfBoundsException
    • isAutoUpdate

      public boolean isAutoUpdate()
      Deprecated.
      If this property is true, this class will listen for changes to the current point list by adding a listener to the model and update the model (and the view) automatically when the point list is changed.
      Returns:
      True if autoUpdate is on.
    • setAutoUpdate

      public void setAutoUpdate(boolean aAutoUpdate)
      Deprecated.
      Set autoUpdate on/off.
      Parameters:
      aAutoUpdate - A flag indicating whether the auto update property is on or off.
      See Also:
    • setAboveTerrain

      public void setAboveTerrain(boolean aAboveTerrain)
      Deprecated.
      If set to true, the terrain elevation will be added to the height of the point list's points.

      Note that the height of the point list's points cannot be edited with setPointZ() when aboveTerrain is true.

      Parameters:
      aAboveTerrain - Indicates whether heights are above terrain or not.
    • isAboveTerrain

      public boolean isAboveTerrain()
      Deprecated.
      Returns:
      whether heights are above terrain or not.
      See Also:
    • 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.
    • updateTerrainProfileModel

      public void updateTerrainProfileModel()
      Deprecated.
      Use update( boolean ).
      This method should be invoked whenever the user has selected a new ILcdPointList in fPointListGXYLayer. This method will search for the first selected ILcdPointList and update itself (and as a side-effect also the Vertical View it belongs to).
      See Also:
    • getPolylineInView

      protected ILcdPointList getPolylineInView()
      Deprecated.
      Preferred usage: set point list manually using setPointList().
      Returns:
      the point list for which the profile will be computed. By default returns the first selected point list in the point list layer.