wContour
类 Contour

java.lang.Object
  继承者 wContour.Contour

public class Contour
extends java.lang.Object

Contour class - including the functions of contour

版本:
$Revision: 1.6 $
作者:
Yaqiang Wang

构造方法摘要
Contour()
           
 
方法摘要
static java.util.List<Polygon> clipPolygons(java.util.List<Polygon> polygons, java.util.List<PointD> clipPList)
          Clip polygons with a border polygon
static java.util.List<PolyLine> clipPolylines(java.util.List<PolyLine> polylines, java.util.List<PointD> clipPList)
          Clip polylines with a border polygon
static PointF getCrossPoint(PointF aP1, PointF aP2, PointF bP1, PointF bP2)
          Get cross point of two line segments
static boolean isClockwise(java.util.List<PointD> pointList)
          Determine if the point list is clockwise
static boolean pointInPolygon(java.util.List<PointD> poly, PointD aPoint)
          Judge if a point is in a polygon
static boolean pointInPolygon(Polygon aPolygon, PointD aPoint)
          Judge if a point is in a polygon
static java.util.List<PolyLine> smoothLines(java.util.List<PolyLine> aLineList)
          Smooth polylines
static java.util.List<PointD> smoothPoints(java.util.List<PointD> pointList)
          Smooth points
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.
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
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
static java.util.List<PolyLine> tracingStreamline(double[][] U, double[][] V, double[] X, double[] Y, double UNDEF, int density)
          Tracing stream lines
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

Contour

public Contour()
方法详细信息

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

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

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