程序包 wcontour

类 Contour


  • public class Contour
    extends Object
    Contour class - including the functions of contour
    版本:
    $Revision: 1.6.1 $
    作者:
    Yaqiang Wang
    • 构造器详细资料

      • Contour

        public Contour()
    • 方法详细资料

      • getVersion

        public static String getVersion()
        Get version
        返回:
        Version
      • tracingContourLines

        public static List<PolyLine> tracingContourLines​(double[][] S0,
                                                         double[] X,
                                                         double[] Y,
                                                         int nc,
                                                         double[] contour,
                                                         double undefData,
                                                         List<Border> borders,
                                                         int[][] S1)
        Tracing contour lines from the grid data with undefine data
        参数:
        S0 - input grid data
        X - X coordinate array
        Y - Y coordinate array
        nc - number of contour values
        contour - contour value array
        undefData - Undefine data
        borders - borders
        S1 - data flag array
        返回:
        Contour line list
      • tracingBorders

        public static List<Border> tracingBorders​(double[][] S0,
                                                  double[] X,
                                                  double[] Y,
                                                  int[][] S1,
                                                  double undefData)
        Tracing contour borders of the grid data with undefined data. Grid data are from left to right and from bottom to top. Grid data array: first dimention is Y, second dimention is X.
        参数:
        S0 - input grid data
        X - x coordinate array
        Y - y coordinate array
        S1 - data flag array
        undefData - undefine data
        返回:
        borderline list
      • cutContourWithPolygon

        public static List<PolyLine> cutContourWithPolygon​(List<PolyLine> alinelist,
                                                           List<PointD> polyList)
        Cut contour lines with a polygon. Return the polylines inside of the polygon
        参数:
        alinelist - polyline list
        polyList - border points of the cut polygon
        返回:
        Inside Polylines after cut
      • cutContourLines

        public static List<PolyLine> cutContourLines​(List<PolyLine> alinelist,
                                                     Border aBorder)
        Cut contour lines with a polygon. Return the polylines inside of the polygon
        参数:
        alinelist - polyline list
        aBorder - border for clipping
        返回:
        inside plylines after clipping
      • smoothLines

        public static List<PolyLine> smoothLines​(List<PolyLine> aLineList)
        Smooth polylines
        参数:
        aLineList - polyline list
        返回:
        polyline list after smoothing
      • smoothPoints

        public static List<PointD> smoothPoints​(List<PointD> pointList)
        Smooth points
        参数:
        pointList - point list
        返回:
        smoothed point list
      • tracingPolygons

        public static List<Polygon> tracingPolygons​(double[][] S0,
                                                    List<PolyLine> cLineList,
                                                    List<Border> borderList,
                                                    double[] contour)
        Tracing polygons from contour lines and borders
        参数:
        S0 - input grid data
        cLineList - contour lines
        borderList - borders
        contour - contour values
        返回:
        traced contour polygons
      • createCutContourPolygons

        public static List<Polygon> createCutContourPolygons​(List<PolyLine> LineList,
                                                             List<PointD> polyList,
                                                             Extent aBound,
                                                             double[] contour)
        Create polygons from cutted contour lines
        参数:
        LineList - polylines
        polyList - border point list
        aBound - extent
        contour - contour values
        返回:
        contour polygons
      • pointInPolygon

        public static boolean pointInPolygon​(List<PointD> poly,
                                             PointD aPoint)
        Judge if a point is in a polygon
        参数:
        poly - polygon border
        aPoint - point
        返回:
        if the point is in the polygon
      • pointInPolygon

        public static boolean pointInPolygon​(Polygon aPolygon,
                                             PointD aPoint)
        Judge if a point is in a polygon
        参数:
        aPolygon - polygon
        aPoint - point
        返回:
        if the point is in the polygon
      • clipPolylines

        public static List<PolyLine> clipPolylines​(List<PolyLine> polylines,
                                                   List<PointD> clipPList)
        Clip polylines with a border polygon
        参数:
        polylines - polyline list
        clipPList - clipping border point list
        返回:
        clipped polylines
      • clipPolygons

        public static List<Polygon> clipPolygons​(List<Polygon> polygons,
                                                 List<PointD> clipPList)
        Clip polygons with a border polygon
        参数:
        polygons - polygon list
        clipPList - clipping border point list
        返回:
        clipped polygons
      • tracingStreamline

        public static List<PolyLine> tracingStreamline​(double[][] U,
                                                       double[][] V,
                                                       double[] X,
                                                       double[] Y,
                                                       double UNDEF,
                                                       int density)
        Tracing stream lines
        参数:
        U - U component array
        V - V component array
        X - X coordinate array
        Y - Y coordinate array
        UNDEF - undefine data
        density - stream line density
        返回:
        streamlines
      • tracingStreamline

        public static List<PolyLine> tracingStreamline​(double[][] U,
                                                       double[][] V,
                                                       double[] X,
                                                       double[] Y,
                                                       int density)
        Tracing stream lines
        参数:
        U - U component array
        V - V component array
        X - X coordinate array
        Y - Y coordinate array
        density - stream line density
        返回:
        streamlines
      • tracingStreamline

        public static List<PolyLine> tracingStreamline​(double[][] U,
                                                       double[][] V,
                                                       double[][] X,
                                                       double[][] Y,
                                                       int density)
        Tracing stream lines
        参数:
        U - U component array
        V - V component array
        X - X coordinate array
        Y - Y coordinate array
        density - stream line density
        返回:
        streamlines
      • tracingStreamline3D

        public static List<PolyLine3D> tracingStreamline3D​(double[][][] U,
                                                           double[][][] V,
                                                           double[][][] W,
                                                           double[][][] M,
                                                           double[] X,
                                                           double[] Y,
                                                           double[] Z,
                                                           int density,
                                                           int loopLimit)
        Tracing 3D stream lines
        参数:
        U - U component array
        V - V component array
        W - W component array
        M - Measurement value array
        X - X coordinate array
        Y - Y coordinate array
        Z - Z coordinate array
        density - stream line density
        loopLimit - Limit loop number
        返回:
        streamlines
      • tracingStreamline3D

        public static List<PolyLine3D> tracingStreamline3D​(double[][][] U,
                                                           double[][][] V,
                                                           double[][][] W,
                                                           double[][][] M,
                                                           double[] X,
                                                           double[] Y,
                                                           double[] Z,
                                                           int density,
                                                           double[] sX,
                                                           double[] sY,
                                                           double[] sZ,
                                                           int loopLimit)
        Tracing 3D stream lines
        参数:
        U - U component array
        V - V component array
        W - W component array
        M - Measurement value array
        X - X coordinate array
        Y - Y coordinate array
        Z - Z coordinate array
        density - stream line density
        loopLimit - Limit loop number
        返回:
        streamlines
      • tracingStreamline3D

        public static List<PolyLine3D> tracingStreamline3D​(double[][][] U,
                                                           double[][][] V,
                                                           double[][][] W,
                                                           double[][][] M,
                                                           double[][][] X,
                                                           double[][][] Y,
                                                           double[][][] Z,
                                                           int density,
                                                           int loopLimit)
        Tracing 3D stream lines
        参数:
        U - U component array
        V - V component array
        W - W component array
        M - Measurement value array
        X - X coordinate array
        Y - Y coordinate array
        Z - Z coordinate array
        density - Streamline density
        loopLimit - Limit loop number
        返回:
        streamlines
      • tracingStreamline3D

        public static List<PolyLine3D> tracingStreamline3D​(double[][][] U,
                                                           double[][][] V,
                                                           double[][][] W,
                                                           double[][][] M,
                                                           double[][][] X,
                                                           double[][][] Y,
                                                           double[][][] Z,
                                                           int density,
                                                           double[] sX,
                                                           double[] sY,
                                                           double[] sZ,
                                                           int loopLimit)
        Tracing 3D stream lines
        参数:
        U - U component array
        V - V component array
        W - W component array
        M - Measurement value array
        X - X coordinate array
        Y - Y coordinate array
        Z - Z coordinate array
        density - Streamline density
        loopLimit - Limit loop number
        返回:
        streamlines
      • isClockwise

        public static boolean isClockwise​(List<PointD> pointList)
        Determine if the point list is clockwise
        参数:
        pointList - point list
        返回:
        is or not clockwise
      • getCrossPoint

        public static PointF getCrossPoint​(PointF aP1,
                                           PointF aP2,
                                           PointF bP1,
                                           PointF bP2)
        Get cross point of two line segments
        参数:
        aP1 - point 1 of line a
        aP2 - point 2 of line a
        bP1 - point 1 of line b
        bP2 - point 2 of line b
        返回:
        cross point