程序包 wcontour

类 Contour


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

      • Contour

        public Contour()
    • 方法详细资料

      • getVersion

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

        public static java.util.List<PolyLine> tracingContourLines​(double[][] S0,
                                                                   double[] X,
                                                                   double[] Y,
                                                                   int nc,
                                                                   double[] contour,
                                                                   double undefData,
                                                                   java.util.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 java.util.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 java.util.List<PolyLine> cutContourWithPolygon​(java.util.List<PolyLine> alinelist,
                                                                     java.util.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 java.util.List<PolyLine> cutContourLines​(java.util.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 java.util.List<PolyLine> smoothLines​(java.util.List<PolyLine> aLineList)
        Smooth polylines
        参数:
        aLineList - polyline list
        返回:
        polyline list after smoothing
      • smoothPoints

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

        public static java.util.List<Polygon> tracingPolygons​(double[][] S0,
                                                              java.util.List<PolyLine> cLineList,
                                                              java.util.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 java.util.List<Polygon> createCutContourPolygons​(java.util.List<PolyLine> LineList,
                                                                       java.util.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​(java.util.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 java.util.List<PolyLine> clipPolylines​(java.util.List<PolyLine> polylines,
                                                             java.util.List<PointD> clipPList)
        Clip polylines with a border polygon
        参数:
        polylines - polyline list
        clipPList - clipping border point list
        返回:
        clipped polylines
      • clipPolygons

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

        public static java.util.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
      • isClockwise

        public static boolean isClockwise​(java.util.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