Class TLcdLonLatComplexPolygonContourBuilder

java.lang.Object
com.luciad.contour.TLcdLonLatComplexPolygonContourBuilder
All Implemented Interfaces:
ILcdContourBuilder

public class TLcdLonLatComplexPolygonContourBuilder extends Object implements ILcdContourBuilder
ILcdContourBuilder implementation for usage with the TLcdComplexPolygonContourFinder. It will create a complex polygon in a TLcdIntervalContour or TLcdValuedContour and provide it to the ILcdFunction only when endLevel is called by the contour finder.
Since:
10.1
  • Constructor Summary

    Constructors
    Constructor
    Description
    Construct a new TLcdLonLatComplexPolygonContourBuilder.
    TLcdLonLatComplexPolygonContourBuilder(ILcdFunction aFunction, boolean aSplitComplexPolygon)
    Construct a new TLcdLonLatComplexPolygonContourBuilder.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    createContour(double[] aXCoordinates, double[] aYCoordinates, int aPointCount, boolean aClosed)
    Collect a single open or closed contour for the level the contour finder is calculating.
    void
    This method is called by the contour finder when it is done finding contours for the current level.
    void
    startLevel(double aValue)
    This method is called by the contour finder when it starts finding contours for a new level, when the contour represents an exact value.
    void
    This method is called by the contour finder when it starts finding contours for a new level, when the contour represents a range of values (an interval).

    Methods inherited from class java.lang.Object

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

    • TLcdLonLatComplexPolygonContourBuilder

      public TLcdLonLatComplexPolygonContourBuilder(ILcdFunction aFunction)
      Construct a new TLcdLonLatComplexPolygonContourBuilder.
      Parameters:
      aFunction - A function that will be provided with TLcdIntervalContour and TLcdValuedContour instances which contain ILcdComplexPolygon as base shape.
    • TLcdLonLatComplexPolygonContourBuilder

      public TLcdLonLatComplexPolygonContourBuilder(ILcdFunction aFunction, boolean aSplitComplexPolygon)
      Construct a new TLcdLonLatComplexPolygonContourBuilder.
      Parameters:
      aFunction - A function that will be provided with TLcdIntervalContour and TLcdValuedContour instances which contain ILcdComplexPolygon as base shape.
      aSplitComplexPolygon - If false, one large complex polygon per contour level will be created. If true, then if possible, the complex polygon is post-processed to be split into multiple complex polygons, where each complex polygon has exactly one outer shell and multiple holes. This gives the same overall data, but it is more efficient for a painter to draw multiple smaller complex polygons, than one big complex polygon. This post-processing itself requires more calculation time however.
  • Method Details

    • createContour

      public void createContour(double[] aXCoordinates, double[] aYCoordinates, int aPointCount, boolean aClosed)
      Description copied from interface: ILcdContourBuilder
      Collect a single open or closed contour for the level the contour finder is calculating.
      Specified by:
      createContour in interface ILcdContourBuilder
      Parameters:
      aXCoordinates - The array of x-coordinates.
      aYCoordinates - The array of y-coordinates.
      aPointCount - The number of coordinates to take into account.
      aClosed - Whether the given array of points represents an open or a closed contour. In the case of a closed contour, the first and the last provided coordinate are not the same. Some shapes, such as ILcdPolyline, require that the first and last point of a closed contour are the same, in that case it needs to be added by the implementation.
    • startLevel

      public void startLevel(ILcdInterval aInterval)
      Description copied from interface: ILcdContourBuilder
      This method is called by the contour finder when it starts finding contours for a new level, when the contour represents a range of values (an interval).
      Specified by:
      startLevel in interface ILcdContourBuilder
      Parameters:
      aInterval - The interval representing this level. The is the range of values represented by the lines or areas of the contours of this level.
    • startLevel

      public void startLevel(double aValue)
      Description copied from interface: ILcdContourBuilder
      This method is called by the contour finder when it starts finding contours for a new level, when the contour represents an exact value.
      Specified by:
      startLevel in interface ILcdContourBuilder
      Parameters:
      aValue - The value of the contour.
    • endLevel

      public void endLevel()
      Description copied from interface: ILcdContourBuilder
      This method is called by the contour finder when it is done finding contours for the current level.
      Specified by:
      endLevel in interface ILcdContourBuilder