类 ArrayUtil


  • public class ArrayUtil
    extends java.lang.Object
    作者:
    yaqiang
    • 构造器概要

      构造器 
      构造器 说明
      ArrayUtil()  
    • 方法概要

      所有方法 静态方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      static ucar.ma2.Array argSort​(ucar.ma2.Array a, java.lang.Integer axis)
      Get sorted array index along an axis
      static ucar.ma2.Array array​(java.lang.Object data)
      Create an array
      static ucar.ma2.Array array​(java.util.ArrayList data)
      Create an array
      static ucar.ma2.Array array​(java.util.List<java.lang.Object> data)
      Create an array
      static ucar.ma2.Array arrayRange​(java.lang.Number start, java.lang.Number stop, java.lang.Number step)
      Array range
      static ucar.ma2.Array arrayRange_bak​(java.lang.Number start, java.lang.Number stop, java.lang.Number step)
      Array range
      static ucar.ma2.Array arrayRange1​(java.lang.Number start, int length, java.lang.Number step)
      Array range
      static ucar.ma2.Array broadcast​(ucar.ma2.Array a, int[] shape)
      Broadcast array to a new shape
      static ucar.ma2.Array broadcast​(ucar.ma2.Array a, java.util.List<java.lang.Integer> shape)
      Broadcast array to a new shape
      static ucar.ma2.Array concatenate​(java.util.List<ucar.ma2.Array> arrays, java.lang.Integer axis)
      Concatenate arrays to one array along a axis
      static ucar.ma2.Array concatenate​(ucar.ma2.Array a, ucar.ma2.Array b, java.lang.Integer axis)
      Concatenate two arrays to one array along a axis
      static java.lang.String convertToString​(ucar.ma2.Array a)
      Array to string
      static PolygonShape convexHull​(ucar.ma2.Array x, ucar.ma2.Array y)
      Computes the smallest convex Polygon that contains all the points
      protected static void copyTo1DJavaArray​(ucar.ma2.IndexIterator iter, java.lang.Object javaArray)  
      protected static void copyTo1DJavaArray_Long​(ucar.ma2.IndexIterator iter, java.lang.Object javaArray)  
      static java.lang.Object copyToNDJavaArray​(ucar.ma2.Array a)
      Convert array to N-Dimension double Java array
      static java.lang.Object copyToNDJavaArray​(ucar.ma2.Array a, java.lang.String dtype)
      Convert array to N-Dimension double Java array
      static java.lang.Object copyToNDJavaArray_Double​(ucar.ma2.Array a)
      Convert array to N-Dimension double Java array
      static java.lang.Object copyToNDJavaArray_Long​(ucar.ma2.Array a)
      Convert array to N-Dimension double Java array
      static ucar.ma2.Array cressman​(java.util.List<java.lang.Number> x_s, java.util.List<java.lang.Number> y_s, ucar.ma2.Array v_s, java.util.List<java.lang.Number> X, java.util.List<java.lang.Number> Y, java.util.List<java.lang.Number> radList)
      Cressman analysis
      static ucar.ma2.Array cressman_bak​(java.util.List<java.lang.Number> x_s, java.util.List<java.lang.Number> y_s, ucar.ma2.Array v_s, java.util.List<java.lang.Number> X, java.util.List<java.lang.Number> Y, java.util.List<java.lang.Number> radList)
      Cressman analysis
      static java.lang.String dataTypeString​(ucar.ma2.DataType dt)
      Get data type string
      static ucar.ma2.Array delete​(ucar.ma2.Array a, int idx, int axis)
      Return a new array with sub-arrays along an axis deleted
      static ucar.ma2.Array delete​(ucar.ma2.Array a, java.util.List<java.lang.Integer> idx, int axis)
      Return a new array with sub-arrays along an axis deleted
      static ucar.ma2.Array diag​(ucar.ma2.Array a, int k)
      Extract a diagonal or construct a diagonal array.
      static ucar.ma2.Array[] extendHalfCell​(ucar.ma2.Array x, ucar.ma2.Array y)
      Extend the grid to half cell, so the grid points are the centers of the cells
      static ucar.ma2.Array eye​(int n, int m, int k, java.lang.String dtype)
      Return a 2-D array with ones on the diagonal and zeros elsewhere.
      static ucar.ma2.Array factory​(ucar.ma2.DataType dt, int[] shape)
      Array factory
      static ucar.ma2.Array factory​(ucar.ma2.DataType dt, int[] shape, java.lang.Object storage)
      Array factory
      static java.lang.Object[] findIndices​(java.util.List<java.util.List<java.lang.Number>> points, java.util.List<java.lang.Number> xi)
      Find indices
      static java.lang.Object[] findIndices​(java.util.List<ucar.ma2.Array> points, ucar.ma2.Array xi)
      Find indices
      static ucar.ma2.Array full​(java.util.List<java.lang.Integer> shape, java.lang.Object fillValue, ucar.ma2.DataType dtype)
      Return a new array of given shape and type, filled with fill value.
      static java.util.List<ucar.ma2.Array> getArraysFromStationData​(StationData stdata)
      Get array list from StationData
      static int getDimIndex​(ucar.ma2.Array dim, double v)
      Get value index in a dimension array
      static java.util.List<ucar.ma2.Array> histogram​(ucar.ma2.Array a, double[] bins)
      Histogram x/y array
      static java.util.List<ucar.ma2.Array> histogram​(ucar.ma2.Array a, int nbins)
      Histogram x/y array
      static java.util.List<ucar.ma2.Array> histogram​(ucar.ma2.Array a, ucar.ma2.Array bins)
      Histogram x/y array
      static ucar.ma2.Array identity​(int n, java.lang.String dtype)
      Return the identity array - a square array with ones on the main diagonal.
      static ucar.ma2.Array interpn​(java.util.List<ucar.ma2.Array> points, ucar.ma2.Array values, java.util.List<ucar.ma2.Array> xi)
      Multidimensional interpolation on regular grids.
      static java.lang.Object interpn​(java.util.List<ucar.ma2.Array> points, ucar.ma2.Array values, ucar.ma2.Array xi)
      Multidimensional interpolation on regular grids.
      static double interpn_s​(java.util.List<java.util.List<java.lang.Number>> points, ucar.ma2.Array values, java.util.List<java.lang.Number> xi)
      Multidimensional interpolation on regular grids.
      static double interpn_s​(java.util.List<ucar.ma2.Array> points, ucar.ma2.Array values, ucar.ma2.Array xi)
      Multidimensional interpolation on regular grids.
      ucar.ma2.Array interpolate​(ucar.ma2.Array a, java.util.List<java.lang.Number> X, java.util.List<java.lang.Number> Y)
      Interpolate array data
      static ucar.ma2.Array interpolation_IDW_Neighbor​(java.util.List<java.lang.Number> x_s, java.util.List<java.lang.Number> y_s, ucar.ma2.Array a, java.util.List<java.lang.Number> X, java.util.List<java.lang.Number> Y, int NumberOfNearestNeighbors)
      Interpolation with IDW neighbor method
      static ucar.ma2.Array interpolation_IDW_Radius​(java.util.List<java.lang.Number> x_s, java.util.List<java.lang.Number> y_s, ucar.ma2.Array a, java.util.List<java.lang.Number> X, java.util.List<java.lang.Number> Y, int NeededPointNum, double radius)
      Interpolation with IDW radius method
      static ucar.ma2.Array interpolation_Inside​(java.util.List<java.lang.Number> x_s, java.util.List<java.lang.Number> y_s, ucar.ma2.Array a, java.util.List<java.lang.Number> X, java.util.List<java.lang.Number> Y)
      Interpolate with inside method - The grid cell value is the average value of the inside points or fill value if no inside point.
      static ucar.ma2.Array interpolation_Inside​(ucar.ma2.Array x_s, ucar.ma2.Array y_s, ucar.ma2.Array a, ucar.ma2.Array X, ucar.ma2.Array Y, boolean center)
      Interpolate with inside method - The grid cell value is the average value of the inside points or fill value if no inside point.
      static java.lang.Object interpolation_Inside_Count​(java.util.List<java.lang.Number> x_s, java.util.List<java.lang.Number> y_s, java.util.List<java.lang.Number> X, java.util.List<java.lang.Number> Y, boolean pointDensity)
      Interpolate with inside method - The grid cell value is the count number of the inside points or fill value if no inside point.
      static ucar.ma2.Array interpolation_Inside_Max​(java.util.List<java.lang.Number> x_s, java.util.List<java.lang.Number> y_s, ucar.ma2.Array a, java.util.List<java.lang.Number> X, java.util.List<java.lang.Number> Y)
      Interpolate with inside method - The grid cell value is the maximum value of the inside points or fill value if no inside point.
      static ucar.ma2.Array interpolation_Inside_Min​(java.util.List<java.lang.Number> x_s, java.util.List<java.lang.Number> y_s, ucar.ma2.Array a, java.util.List<java.lang.Number> X, java.util.List<java.lang.Number> Y)
      Interpolate with inside method - The grid cell value is the minimum value of the inside points or fill value if no inside point.
      static ucar.ma2.Array interpolation_Nearest​(java.util.List<java.lang.Number> x_s, java.util.List<java.lang.Number> y_s, ucar.ma2.Array a, java.util.List<java.lang.Number> X, java.util.List<java.lang.Number> Y, double radius)
      Interpolate with nearest method
      static ucar.ma2.Array interpolation_Nearest_1​(java.util.List<java.lang.Number> x_s, java.util.List<java.lang.Number> y_s, ucar.ma2.Array a, java.util.List<java.lang.Number> X, java.util.List<java.lang.Number> Y, double radius, double fill_value)
      Interpolate with nearest method
      static ucar.ma2.Array interpolation_Surface​(ucar.ma2.Array x_s, ucar.ma2.Array y_s, ucar.ma2.Array a, ucar.ma2.Array X, ucar.ma2.Array Y)
      Interpolate with surface method
      static ucar.ma2.Array interpolation_Surface_1​(ucar.ma2.Array x_s, ucar.ma2.Array y_s, ucar.ma2.Array a, ucar.ma2.Array X, ucar.ma2.Array Y, double unDefData)
      Interpolate with surface method
      static ucar.ma2.Array interpolation_Surface_bak​(ucar.ma2.Array x_s, ucar.ma2.Array y_s, ucar.ma2.Array a, ucar.ma2.Array X, ucar.ma2.Array Y)
      Interpolate with surface method
      static ucar.ma2.Array lineSpace​(java.lang.Number start, java.lang.Number stop, int n, boolean endpoint)
      Array line space
      static ucar.ma2.Array lineSpace_bak​(java.lang.Number start, java.lang.Number stop, int n, boolean endpoint)
      Array line space
      static ucar.ma2.Array linint2​(ucar.ma2.Array a, ucar.ma2.Array X, ucar.ma2.Array Y, ucar.ma2.Array newX, ucar.ma2.Array newY)
      Interpolates from a rectilinear grid to another rectilinear grid using bilinear interpolation.
      static ucar.ma2.DataType mergeDataType​(ucar.ma2.DataType dt1, ucar.ma2.DataType dt2)
      Merge data type to one data type
      static ucar.ma2.Array[] meshgrid​(ucar.ma2.Array... xs)
      Mesh grid
      static ucar.ma2.Array[] meshgrid​(ucar.ma2.Array x, ucar.ma2.Array y)
      Mesh grid
      static VectorLayer meshLayer​(ucar.ma2.Array x_s, ucar.ma2.Array y_s, ucar.ma2.Array a, LegendScheme ls)
      Create mesh polygon layer
      static VectorLayer meshLayer​(ucar.ma2.Array x_s, ucar.ma2.Array y_s, ucar.ma2.Array a, LegendScheme ls, double lonlim)
      Create mesh polygon layer
      static int numASCIICol​(java.lang.String fileName, java.lang.String delimiter, int headerLines)
      Get row number of a ASCII file
      static int numASCIIRow​(java.lang.String fileName)
      Get row number of a ASCII file
      static ucar.ma2.Array ones​(int n)
      Get ones array
      static ucar.ma2.Array ones​(java.util.List<java.lang.Integer> shape, java.lang.String dtype)
      Get ones array
      static double rand()
      Get random value
      static ucar.ma2.Array rand​(int n)
      Get random array - one dimension
      static ucar.ma2.Array rand​(java.util.List<java.lang.Integer> shape)
      Get random array
      static ucar.ma2.Array readASCIIFile​(java.lang.String fileName, java.lang.String delimiter, int headerLines, java.lang.String dataType, java.util.List<java.lang.Integer> shape, boolean readFirstCol)
      Read ASCII data file to an array
      static ucar.ma2.Array readBinFile​(java.lang.String fn, java.util.List<java.lang.Integer> dims, java.lang.String dataType, int skip, java.lang.String byteOrder)
      Read array from a binary file
      static ucar.ma2.Array repeat​(java.lang.Number v, int n)
      Repeat a value n times
      static ucar.ma2.Array repeat​(ucar.ma2.Array a, java.util.List<java.lang.Integer> repeats)
      Repeat elements of an array.
      static ucar.ma2.Array repeat​(ucar.ma2.Array a, java.util.List<java.lang.Integer> repeats, int axis)
      Repeat elements of an array.
      static ucar.ma2.Array reproject​(ucar.ma2.Array data, java.util.List<java.lang.Number> x, java.util.List<java.lang.Number> y, java.util.List<java.lang.Number> rx, java.util.List<java.lang.Number> ry, ProjectionInfo fromProj, ProjectionInfo toProj, double fill_value, ResampleMethods resampleMethod)
      Reproject
      static java.lang.Object[] reproject​(ucar.ma2.Array data, java.util.List<java.lang.Number> xx, java.util.List<java.lang.Number> yy, ProjectionInfo fromProj, ProjectionInfo toProj)
      Project grid data
      static java.lang.Object[] reproject​(ucar.ma2.Array data, java.util.List<java.lang.Number> xx, java.util.List<java.lang.Number> yy, ProjectionInfo fromProj, ProjectionInfo toProj, ResampleMethods method)
      Project grid data
      static ucar.ma2.Array reproject​(ucar.ma2.Array data, java.util.List<java.lang.Number> x, java.util.List<java.lang.Number> y, ucar.ma2.Array rx, ucar.ma2.Array ry, ProjectionInfo fromProj, ProjectionInfo toProj, double fill_value, ResampleMethods resampleMethod)
      Reproject
      static ucar.ma2.Array reproject​(ucar.ma2.Array data, java.util.List<java.lang.Number> x, java.util.List<java.lang.Number> y, ucar.ma2.Array rx, ucar.ma2.Array ry, ProjectionInfo fromProj, ProjectionInfo toProj, ResampleMethods resampleMethod)
      Reproject
      static ucar.ma2.Array[] reproject​(ucar.ma2.Array x, ucar.ma2.Array y, ProjectionInfo toProj)
      Reproject
      static ucar.ma2.Array[] reproject​(ucar.ma2.Array x, ucar.ma2.Array y, ProjectionInfo fromProj, ProjectionInfo toProj)
      Reproject
      static java.lang.Object[] reproject_back​(ucar.ma2.Array data, java.util.List<java.lang.Number> xx, java.util.List<java.lang.Number> yy, ProjectionInfo fromProj, ProjectionInfo toProj)
      Project grid data
      static ucar.ma2.Array resample_Bilinear​(ucar.ma2.Array a, java.util.List<java.lang.Number> X, java.util.List<java.lang.Number> Y, java.util.List<java.lang.Number> newX, java.util.List<java.lang.Number> newY)
      Resample grid array with bilinear method
      static ucar.ma2.Array resample_Bilinear​(ucar.ma2.Array a, ucar.ma2.Array X, ucar.ma2.Array Y, ucar.ma2.Array newX, ucar.ma2.Array newY)
      Resample grid array with bilinear method
      static ucar.ma2.Array resample_Neighbor​(ucar.ma2.Array a, ucar.ma2.Array X, ucar.ma2.Array Y, ucar.ma2.Array newX, ucar.ma2.Array newY)
      Resample grid array with neighbor method
      static void saveASCIIFile​(java.lang.String fn, ucar.ma2.Array a, int colNum, java.lang.String format, java.lang.String delimiter)
      Save an array data to a ASCII file
      static void saveBinFile​(java.lang.String fn, ucar.ma2.Array a, java.lang.String byteOrder, boolean append, boolean sequential)
      Save an array data to a binary file
      static int searchSorted​(java.util.List<java.lang.Number> a, double v)
      Search sorted list index
      static int searchSorted​(ucar.ma2.Array a, double v)
      Search sorted list index
      static ucar.ma2.Array smooth5​(ucar.ma2.Array a)
      Smooth with 5 points
      static ucar.ma2.Array smooth5​(ucar.ma2.Array a, int rowNum, int colNum, double unDefData)
      Smooth with 5 points
      static ucar.ma2.Array smooth9​(ucar.ma2.Array a)
      Smooth with 9 points
      static ucar.ma2.Array sort​(ucar.ma2.Array a, java.lang.Integer axis)
      Sort array along an axis
      static ucar.ma2.Array tile​(java.lang.Number v, int n)
      Repeat a value n times
      static ucar.ma2.Array tile​(java.lang.Number v, java.util.List<java.lang.Integer> repeats)
      Repeat a value n times
      static ucar.ma2.Array tile​(ucar.ma2.Array a, java.util.List<java.lang.Integer> repeats)
      Repeat elements of an array.
      static ucar.ma2.Array toBoolean​(ucar.ma2.Array a)
      Convert array to boolean type
      static ucar.ma2.DataType toDataType​(java.lang.String dt)
      To data type - ucar.ma2
      static ucar.ma2.Array toDouble​(ucar.ma2.Array a)
      Convert array to double type
      static ucar.ma2.Array toFloat​(ucar.ma2.Array a)
      Convert array to float type
      static ucar.ma2.Array toInteger​(ucar.ma2.Array a)
      Convert array to integer type
      static double toStation​(ucar.ma2.Array data, java.util.List<java.lang.Number> xArray, java.util.List<java.lang.Number> yArray, double x, double y)
      Interpolate data to a station point
      static double toStation​(ucar.ma2.Array data, java.util.List<java.lang.Number> xArray, java.util.List<java.lang.Number> yArray, double x, double y, double missingValue)
      Interpolate data to a station point
      static double toStation​(ucar.ma2.Array data, ucar.ma2.Array xArray, ucar.ma2.Array yArray, double x, double y)
      Interpolate data to a station point
      static double toStation_Neighbor​(ucar.ma2.Array data, java.util.List<java.lang.Number> xArray, java.util.List<java.lang.Number> yArray, double x, double y)
      Interpolate data to a station point
      static double toStation_Neighbor​(ucar.ma2.Array data, java.util.List<java.lang.Number> xArray, java.util.List<java.lang.Number> yArray, double x, double y, double missingValue)
      Interpolate data to a station point
      static double toStation_Neighbor​(ucar.ma2.Array data, ucar.ma2.Array xArray, ucar.ma2.Array yArray, double x, double y)
      Interpolate data to a station point
      static java.lang.String toString_old​(ucar.ma2.Array a)
      Array to string
      static ucar.ma2.Array zeros​(int n)
      Get zero array
      static ucar.ma2.Array zeros​(java.util.List<java.lang.Integer> shape, java.lang.String dtype)
      Get zero array
      static ucar.ma2.Array zeros​(java.util.List<java.lang.Integer> shape, ucar.ma2.DataType dtype)
      Get zero array
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • ArrayUtil

        public ArrayUtil()
    • 方法详细资料

      • readASCIIFile

        public static ucar.ma2.Array readASCIIFile​(java.lang.String fileName,
                                                   java.lang.String delimiter,
                                                   int headerLines,
                                                   java.lang.String dataType,
                                                   java.util.List<java.lang.Integer> shape,
                                                   boolean readFirstCol)
                                            throws java.io.UnsupportedEncodingException,
                                                   java.io.FileNotFoundException,
                                                   java.io.IOException
        Read ASCII data file to an array
        参数:
        fileName - File name
        delimiter - Delimiter
        headerLines - Headerline number
        dataType - Data type string
        shape - Shape
        readFirstCol - Read first column data or not
        返回:
        Result array
        抛出:
        java.io.UnsupportedEncodingException
        java.io.FileNotFoundException
        java.io.IOException
      • numASCIIRow

        public static int numASCIIRow​(java.lang.String fileName)
                               throws java.io.FileNotFoundException
        Get row number of a ASCII file
        参数:
        fileName - File name
        返回:
        Row number
        抛出:
        java.io.FileNotFoundException
      • numASCIICol

        public static int numASCIICol​(java.lang.String fileName,
                                      java.lang.String delimiter,
                                      int headerLines)
                               throws java.io.FileNotFoundException,
                                      java.io.IOException
        Get row number of a ASCII file
        参数:
        fileName - File name
        delimiter -
        headerLines -
        返回:
        Row number
        抛出:
        java.io.FileNotFoundException
        java.io.IOException
      • saveBinFile

        public static void saveBinFile​(java.lang.String fn,
                                       ucar.ma2.Array a,
                                       java.lang.String byteOrder,
                                       boolean append,
                                       boolean sequential)
        Save an array data to a binary file
        参数:
        fn - File path
        a - Array
        byteOrder - Byte order
        append - If append to existing file
        sequential - If write as sequential binary file - Fortran
      • saveASCIIFile

        public static void saveASCIIFile​(java.lang.String fn,
                                         ucar.ma2.Array a,
                                         int colNum,
                                         java.lang.String format,
                                         java.lang.String delimiter)
                                  throws java.io.IOException
        Save an array data to a ASCII file
        参数:
        fn - File path
        a - Array
        colNum - Column number of each line
        format - String format
        delimiter - Delimiter
        抛出:
        java.io.IOException
      • readBinFile

        public static ucar.ma2.Array readBinFile​(java.lang.String fn,
                                                 java.util.List<java.lang.Integer> dims,
                                                 java.lang.String dataType,
                                                 int skip,
                                                 java.lang.String byteOrder)
        Read array from a binary file
        参数:
        fn - Binary file name
        dims - Dimensions
        dataType - Data type string
        skip - Skip bytes
        byteOrder - Byte order
        返回:
        Result array
      • factory

        public static ucar.ma2.Array factory​(ucar.ma2.DataType dt,
                                             int[] shape)
        Array factory
        参数:
        dt - Data type
        shape - Shape
        返回:
        Array
      • factory

        public static ucar.ma2.Array factory​(ucar.ma2.DataType dt,
                                             int[] shape,
                                             java.lang.Object storage)
        Array factory
        参数:
        dt - Data type
        shape - Shape
        storage - Array values
        返回:
        Array
      • array

        public static ucar.ma2.Array array​(java.lang.Object data)
        Create an array
        参数:
        data - Object
        返回:
        Array
      • array

        public static ucar.ma2.Array array​(java.util.ArrayList data)
        Create an array
        参数:
        data - Array like data
        返回:
      • array

        public static ucar.ma2.Array array​(java.util.List<java.lang.Object> data)
        Create an array
        参数:
        data - Array like data
        返回:
        Array
      • arrayRange_bak

        public static ucar.ma2.Array arrayRange_bak​(java.lang.Number start,
                                                    java.lang.Number stop,
                                                    java.lang.Number step)
        Array range
        参数:
        start - Start value
        stop - Stop value
        step - Step value
        返回:
        Array
      • arrayRange

        public static ucar.ma2.Array arrayRange​(java.lang.Number start,
                                                java.lang.Number stop,
                                                java.lang.Number step)
        Array range
        参数:
        start - Start value
        stop - Stop value
        step - Step value
        返回:
        Array
      • arrayRange1

        public static ucar.ma2.Array arrayRange1​(java.lang.Number start,
                                                 int length,
                                                 java.lang.Number step)
        Array range
        参数:
        start - Start value
        length - Length
        step - Step value
        返回:
        Array
      • lineSpace

        public static ucar.ma2.Array lineSpace​(java.lang.Number start,
                                               java.lang.Number stop,
                                               int n,
                                               boolean endpoint)
        Array line space
        参数:
        start - Start value
        stop - Stop value
        n - Number value
        endpoint - If stop is included
        返回:
        Array
      • lineSpace_bak

        public static ucar.ma2.Array lineSpace_bak​(java.lang.Number start,
                                                   java.lang.Number stop,
                                                   int n,
                                                   boolean endpoint)
        Array line space
        参数:
        start - Start value
        stop - Stop value
        n - Number value
        endpoint - If stop is included
        返回:
        Array
      • zeros

        public static ucar.ma2.Array zeros​(int n)
        Get zero array
        参数:
        n - Number
        返回:
        Array
      • zeros

        public static ucar.ma2.Array zeros​(java.util.List<java.lang.Integer> shape,
                                           java.lang.String dtype)
        Get zero array
        参数:
        shape - Shape
        dtype - Data type
        返回:
        Array Result array
      • zeros

        public static ucar.ma2.Array zeros​(java.util.List<java.lang.Integer> shape,
                                           ucar.ma2.DataType dtype)
        Get zero array
        参数:
        shape - Shape
        dtype - Data type
        返回:
        Array Result array
      • full

        public static ucar.ma2.Array full​(java.util.List<java.lang.Integer> shape,
                                          java.lang.Object fillValue,
                                          ucar.ma2.DataType dtype)
        Return a new array of given shape and type, filled with fill value.
        参数:
        shape - Shape
        fillValue - Fill value
        dtype - Data type
        返回:
        Array Result array
      • ones

        public static ucar.ma2.Array ones​(int n)
        Get ones array
        参数:
        n - Number
        返回:
        Array Result array
      • ones

        public static ucar.ma2.Array ones​(java.util.List<java.lang.Integer> shape,
                                          java.lang.String dtype)
        Get ones array
        参数:
        shape - Shape
        dtype - Data type
        返回:
        Array Result array
      • identity

        public static ucar.ma2.Array identity​(int n,
                                              java.lang.String dtype)
        Return the identity array - a square array with ones on the main diagonal.
        参数:
        n - Number of rows (and columns) in n x n output.
        dtype - Data type
        返回:
        Identity array
      • eye

        public static ucar.ma2.Array eye​(int n,
                                         int m,
                                         int k,
                                         java.lang.String dtype)
        Return a 2-D array with ones on the diagonal and zeros elsewhere.
        参数:
        n - Number of rows in the output.
        m - Number of columns in the output.
        k - Index of the diagonal: 0 (the default) refers to the main diagonal, a positive value refers to an upper diagonal, and a negative value to a lower diagonal.
        dtype - Data type
        返回:
        Created array
      • diag

        public static ucar.ma2.Array diag​(ucar.ma2.Array a,
                                          int k)
        Extract a diagonal or construct a diagonal array.
        参数:
        a - If a is a 2-D array, return a copy of its k-th diagonal. If a is a 1-D array, return a 2-D array with a on the k-th diagonal.
        k - Diagonal in question.
        返回:
        Diagonal array
      • repeat

        public static ucar.ma2.Array repeat​(java.lang.Number v,
                                            int n)
        Repeat a value n times
        参数:
        v - The value
        n - N times
        返回:
        Repeated array
      • repeat

        public static ucar.ma2.Array repeat​(ucar.ma2.Array a,
                                            java.util.List<java.lang.Integer> repeats)
        Repeat elements of an array.
        参数:
        a - The value
        repeats - The number of repetitions for each element
        返回:
        Repeated array
      • repeat

        public static ucar.ma2.Array repeat​(ucar.ma2.Array a,
                                            java.util.List<java.lang.Integer> repeats,
                                            int axis)
        Repeat elements of an array.
        参数:
        a - The value
        repeats - The number of repetitions for each element
        axis - The axis
        返回:
        Repeated array
      • tile

        public static ucar.ma2.Array tile​(java.lang.Number v,
                                          int n)
        Repeat a value n times
        参数:
        v - The value
        n - N times
        返回:
        Repeated array
      • tile

        public static ucar.ma2.Array tile​(java.lang.Number v,
                                          java.util.List<java.lang.Integer> repeats)
        Repeat a value n times
        参数:
        v - The value
        repeats - The number of repetitions for each element
        返回:
        Repeated array
      • tile

        public static ucar.ma2.Array tile​(ucar.ma2.Array a,
                                          java.util.List<java.lang.Integer> repeats)
        Repeat elements of an array.
        参数:
        a - The value
        repeats - The number of repetitions for each element
        返回:
        Repeated array
      • rand

        public static double rand()
        Get random value
        返回:
        Random value
      • rand

        public static ucar.ma2.Array rand​(int n)
        Get random array - one dimension
        参数:
        n - Array length
        返回:
        Result array
      • rand

        public static ucar.ma2.Array rand​(java.util.List<java.lang.Integer> shape)
        Get random array
        参数:
        shape - Shape
        返回:
        Array Result array
      • mergeDataType

        public static ucar.ma2.DataType mergeDataType​(ucar.ma2.DataType dt1,
                                                      ucar.ma2.DataType dt2)
        Merge data type to one data type
        参数:
        dt1 - Data type 1
        dt2 - Data type 2
        返回:
        Merged data type
      • convertToString

        public static java.lang.String convertToString​(ucar.ma2.Array a)
        Array to string
        参数:
        a - Array a
        返回:
        String
      • toString_old

        public static java.lang.String toString_old​(ucar.ma2.Array a)
        Array to string
        参数:
        a - Array a
        返回:
        String
      • getArraysFromStationData

        public static java.util.List<ucar.ma2.Array> getArraysFromStationData​(StationData stdata)
        Get array list from StationData
        参数:
        stdata - StationData
        返回:
        Array list
      • dataTypeString

        public static java.lang.String dataTypeString​(ucar.ma2.DataType dt)
        Get data type string
        参数:
        dt - The data type
        返回:
        Data type string
      • toDataType

        public static ucar.ma2.DataType toDataType​(java.lang.String dt)
        To data type - ucar.ma2
        参数:
        dt - Data type string
        返回:
        Data type
      • toInteger

        public static ucar.ma2.Array toInteger​(ucar.ma2.Array a)
        Convert array to integer type
        参数:
        a - Array a
        返回:
        Result array
      • toFloat

        public static ucar.ma2.Array toFloat​(ucar.ma2.Array a)
        Convert array to float type
        参数:
        a - Array a
        返回:
        Result array
      • toDouble

        public static ucar.ma2.Array toDouble​(ucar.ma2.Array a)
        Convert array to double type
        参数:
        a - Array a
        返回:
        Result array
      • toBoolean

        public static ucar.ma2.Array toBoolean​(ucar.ma2.Array a)
        Convert array to boolean type
        参数:
        a - Array a
        返回:
        Result array
      • concatenate

        public static ucar.ma2.Array concatenate​(java.util.List<ucar.ma2.Array> arrays,
                                                 java.lang.Integer axis)
                                          throws ucar.ma2.InvalidRangeException
        Concatenate arrays to one array along a axis
        参数:
        arrays - Array list
        axis - The axis
        返回:
        Concatenated array
        抛出:
        ucar.ma2.InvalidRangeException
      • concatenate

        public static ucar.ma2.Array concatenate​(ucar.ma2.Array a,
                                                 ucar.ma2.Array b,
                                                 java.lang.Integer axis)
                                          throws ucar.ma2.InvalidRangeException
        Concatenate two arrays to one array along a axis
        参数:
        a - Array a
        b - Array b
        axis - The axis
        返回:
        Concatenated array
        抛出:
        ucar.ma2.InvalidRangeException
      • sort

        public static ucar.ma2.Array sort​(ucar.ma2.Array a,
                                          java.lang.Integer axis)
                                   throws ucar.ma2.InvalidRangeException
        Sort array along an axis
        参数:
        a - Array a
        axis - The axis
        返回:
        Sorted array
        抛出:
        ucar.ma2.InvalidRangeException
      • argSort

        public static ucar.ma2.Array argSort​(ucar.ma2.Array a,
                                             java.lang.Integer axis)
                                      throws ucar.ma2.InvalidRangeException
        Get sorted array index along an axis
        参数:
        a - Array a
        axis - The axis
        返回:
        Index of sorted array
        抛出:
        ucar.ma2.InvalidRangeException
      • copyToNDJavaArray

        public static java.lang.Object copyToNDJavaArray​(ucar.ma2.Array a,
                                                         java.lang.String dtype)
        Convert array to N-Dimension double Java array
        参数:
        a - Array a
        dtype - Data type string
        返回:
        N-D Java array
      • copyToNDJavaArray

        public static java.lang.Object copyToNDJavaArray​(ucar.ma2.Array a)
        Convert array to N-Dimension double Java array
        参数:
        a - Array a
        返回:
        N-D Java array
      • copyToNDJavaArray_Long

        public static java.lang.Object copyToNDJavaArray_Long​(ucar.ma2.Array a)
        Convert array to N-Dimension double Java array
        参数:
        a - Array a
        返回:
        N-D Java array
      • copyToNDJavaArray_Double

        public static java.lang.Object copyToNDJavaArray_Double​(ucar.ma2.Array a)
        Convert array to N-Dimension double Java array
        参数:
        a - Array a
        返回:
        N-D Java array
      • copyTo1DJavaArray

        protected static void copyTo1DJavaArray​(ucar.ma2.IndexIterator iter,
                                                java.lang.Object javaArray)
      • copyTo1DJavaArray_Long

        protected static void copyTo1DJavaArray_Long​(ucar.ma2.IndexIterator iter,
                                                     java.lang.Object javaArray)
      • delete

        public static ucar.ma2.Array delete​(ucar.ma2.Array a,
                                            int idx,
                                            int axis)
        Return a new array with sub-arrays along an axis deleted
        参数:
        a - Input array
        idx - Index
        axis - The axis
        返回:
      • delete

        public static ucar.ma2.Array delete​(ucar.ma2.Array a,
                                            java.util.List<java.lang.Integer> idx,
                                            int axis)
        Return a new array with sub-arrays along an axis deleted
        参数:
        a - Input array
        idx - Index
        axis - The axis
        返回:
      • histogram

        public static java.util.List<ucar.ma2.Array> histogram​(ucar.ma2.Array a,
                                                               int nbins)
        Histogram x/y array
        参数:
        a - Data array
        nbins - bin number
        返回:
        X/Y arrays
      • histogram

        public static java.util.List<ucar.ma2.Array> histogram​(ucar.ma2.Array a,
                                                               ucar.ma2.Array bins)
        Histogram x/y array
        参数:
        a - Data array
        bins - bin edges
        返回:
        X/Y arrays
      • histogram

        public static java.util.List<ucar.ma2.Array> histogram​(ucar.ma2.Array a,
                                                               double[] bins)
        Histogram x/y array
        参数:
        a - Data array
        bins - bin edges
        返回:
        X/Y arrays
      • broadcast

        public static ucar.ma2.Array broadcast​(ucar.ma2.Array a,
                                               int[] shape)
        Broadcast array to a new shape
        参数:
        a - Array a
        shape - Shape
        返回:
        Result array
      • broadcast

        public static ucar.ma2.Array broadcast​(ucar.ma2.Array a,
                                               java.util.List<java.lang.Integer> shape)
        Broadcast array to a new shape
        参数:
        a - Array a
        shape - Shape
        返回:
        Result array
      • meshgrid

        public static ucar.ma2.Array[] meshgrid​(ucar.ma2.Array x,
                                                ucar.ma2.Array y)
        Mesh grid
        参数:
        x - X array - vector
        y - Y array - vector
        返回:
        Result arrays - matrix
      • meshgrid

        public static ucar.ma2.Array[] meshgrid​(ucar.ma2.Array... xs)
        Mesh grid
        参数:
        xs - X arrays
        返回:
        Result arrays - matrix
      • meshLayer

        public static VectorLayer meshLayer​(ucar.ma2.Array x_s,
                                            ucar.ma2.Array y_s,
                                            ucar.ma2.Array a,
                                            LegendScheme ls,
                                            double lonlim)
        Create mesh polygon layer
        参数:
        x_s - scatter X array
        y_s - scatter Y array
        a - scatter value array
        ls - Legend scheme
        lonlim - Longiutde limitation - to avoid the polygon cross -180/180
        返回:
        Mesh polygon layer
      • meshLayer

        public static VectorLayer meshLayer​(ucar.ma2.Array x_s,
                                            ucar.ma2.Array y_s,
                                            ucar.ma2.Array a,
                                            LegendScheme ls)
        Create mesh polygon layer
        参数:
        x_s - scatter X array
        y_s - scatter Y array
        a - scatter value array
        ls - Legend scheme
        返回:
        Mesh polygon layer
      • smooth5

        public static ucar.ma2.Array smooth5​(ucar.ma2.Array a,
                                             int rowNum,
                                             int colNum,
                                             double unDefData)
        Smooth with 5 points
        参数:
        a - Array
        rowNum - Row number
        colNum - Column number
        unDefData - Missing value
        返回:
        Result array
      • smooth5

        public static ucar.ma2.Array smooth5​(ucar.ma2.Array a)
        Smooth with 5 points
        参数:
        a - Array
        返回:
        Result array
      • smooth9

        public static ucar.ma2.Array smooth9​(ucar.ma2.Array a)
        Smooth with 9 points
        参数:
        a - Array
        返回:
        Result array
      • interpolation_IDW_Radius

        public static ucar.ma2.Array interpolation_IDW_Radius​(java.util.List<java.lang.Number> x_s,
                                                              java.util.List<java.lang.Number> y_s,
                                                              ucar.ma2.Array a,
                                                              java.util.List<java.lang.Number> X,
                                                              java.util.List<java.lang.Number> Y,
                                                              int NeededPointNum,
                                                              double radius)
        Interpolation with IDW radius method
        参数:
        x_s - scatter X array
        y_s - scatter Y array
        a - scatter value array
        X - grid X array
        Y - grid Y array
        NeededPointNum - needed at least point number
        radius - search radius
        返回:
        interpolated grid data
      • interpolation_IDW_Neighbor

        public static ucar.ma2.Array interpolation_IDW_Neighbor​(java.util.List<java.lang.Number> x_s,
                                                                java.util.List<java.lang.Number> y_s,
                                                                ucar.ma2.Array a,
                                                                java.util.List<java.lang.Number> X,
                                                                java.util.List<java.lang.Number> Y,
                                                                int NumberOfNearestNeighbors)
        Interpolation with IDW neighbor method
        参数:
        x_s - scatter X array
        y_s - scatter Y array
        a - scatter value array
        X - grid X array
        Y - grid Y array
        NumberOfNearestNeighbors -
        返回:
        interpolated grid data
      • interpolation_Nearest_1

        public static ucar.ma2.Array interpolation_Nearest_1​(java.util.List<java.lang.Number> x_s,
                                                             java.util.List<java.lang.Number> y_s,
                                                             ucar.ma2.Array a,
                                                             java.util.List<java.lang.Number> X,
                                                             java.util.List<java.lang.Number> Y,
                                                             double radius,
                                                             double fill_value)
        Interpolate with nearest method
        参数:
        x_s - scatter X array
        y_s - scatter Y array
        a - scatter value array
        X - x coordinate
        Y - y coordinate
        radius - Radius
        fill_value - undefine value
        返回:
        grid data
      • interpolation_Nearest

        public static ucar.ma2.Array interpolation_Nearest​(java.util.List<java.lang.Number> x_s,
                                                           java.util.List<java.lang.Number> y_s,
                                                           ucar.ma2.Array a,
                                                           java.util.List<java.lang.Number> X,
                                                           java.util.List<java.lang.Number> Y,
                                                           double radius)
        Interpolate with nearest method
        参数:
        x_s - scatter X array
        y_s - scatter Y array
        a - scatter value array
        X - x coordinate
        Y - y coordinate
        radius - Radius
        返回:
        grid data
      • extendHalfCell

        public static ucar.ma2.Array[] extendHalfCell​(ucar.ma2.Array x,
                                                      ucar.ma2.Array y)
        Extend the grid to half cell, so the grid points are the centers of the cells
        参数:
        x - Input x coordinate
        y - Input y coordinate
        返回:
        Result x and y coordinates
      • interpolation_Inside

        public static ucar.ma2.Array interpolation_Inside​(java.util.List<java.lang.Number> x_s,
                                                          java.util.List<java.lang.Number> y_s,
                                                          ucar.ma2.Array a,
                                                          java.util.List<java.lang.Number> X,
                                                          java.util.List<java.lang.Number> Y)
        Interpolate with inside method - The grid cell value is the average value of the inside points or fill value if no inside point.
        参数:
        x_s - scatter X array
        y_s - scatter Y array
        a - scatter value array
        X - x coordinate
        Y - y coordinate
        返回:
        grid data
      • interpolation_Inside

        public static ucar.ma2.Array interpolation_Inside​(ucar.ma2.Array x_s,
                                                          ucar.ma2.Array y_s,
                                                          ucar.ma2.Array a,
                                                          ucar.ma2.Array X,
                                                          ucar.ma2.Array Y,
                                                          boolean center)
        Interpolate with inside method - The grid cell value is the average value of the inside points or fill value if no inside point.
        参数:
        x_s - scatter X array
        y_s - scatter Y array
        a - scatter value array
        X - x coordinate
        Y - y coordinate
        center - If the grid point is center or border
        返回:
        grid data
      • interpolation_Inside_Max

        public static ucar.ma2.Array interpolation_Inside_Max​(java.util.List<java.lang.Number> x_s,
                                                              java.util.List<java.lang.Number> y_s,
                                                              ucar.ma2.Array a,
                                                              java.util.List<java.lang.Number> X,
                                                              java.util.List<java.lang.Number> Y)
        Interpolate with inside method - The grid cell value is the maximum value of the inside points or fill value if no inside point.
        参数:
        x_s - scatter X array
        y_s - scatter Y array
        a - scatter value array
        X - x coordinate
        Y - y coordinate
        返回:
        grid data
      • interpolation_Inside_Min

        public static ucar.ma2.Array interpolation_Inside_Min​(java.util.List<java.lang.Number> x_s,
                                                              java.util.List<java.lang.Number> y_s,
                                                              ucar.ma2.Array a,
                                                              java.util.List<java.lang.Number> X,
                                                              java.util.List<java.lang.Number> Y)
        Interpolate with inside method - The grid cell value is the minimum value of the inside points or fill value if no inside point.
        参数:
        x_s - scatter X array
        y_s - scatter Y array
        a - scatter value array
        X - x coordinate
        Y - y coordinate
        返回:
        grid data
      • interpolation_Inside_Count

        public static java.lang.Object interpolation_Inside_Count​(java.util.List<java.lang.Number> x_s,
                                                                  java.util.List<java.lang.Number> y_s,
                                                                  java.util.List<java.lang.Number> X,
                                                                  java.util.List<java.lang.Number> Y,
                                                                  boolean pointDensity)
        Interpolate with inside method - The grid cell value is the count number of the inside points or fill value if no inside point.
        参数:
        x_s - scatter X array
        y_s - scatter Y array
        X - x coordinate
        Y - y coordinate
        pointDensity - If return point density value
        返回:
        grid data
      • interpolation_Surface_1

        public static ucar.ma2.Array interpolation_Surface_1​(ucar.ma2.Array x_s,
                                                             ucar.ma2.Array y_s,
                                                             ucar.ma2.Array a,
                                                             ucar.ma2.Array X,
                                                             ucar.ma2.Array Y,
                                                             double unDefData)
        Interpolate with surface method
        参数:
        x_s - scatter X array
        y_s - scatter Y array
        a - scatter value array
        X - x coordinate
        Y - y coordinate
        unDefData - undefine value
        返回:
        grid data
      • interpolation_Surface

        public static ucar.ma2.Array interpolation_Surface​(ucar.ma2.Array x_s,
                                                           ucar.ma2.Array y_s,
                                                           ucar.ma2.Array a,
                                                           ucar.ma2.Array X,
                                                           ucar.ma2.Array Y)
        Interpolate with surface method
        参数:
        x_s - scatter X array
        y_s - scatter Y array
        a - scatter value array
        X - x coordinate
        Y - y coordinate
        返回:
        grid data
      • interpolation_Surface_bak

        public static ucar.ma2.Array interpolation_Surface_bak​(ucar.ma2.Array x_s,
                                                               ucar.ma2.Array y_s,
                                                               ucar.ma2.Array a,
                                                               ucar.ma2.Array X,
                                                               ucar.ma2.Array Y)
        Interpolate with surface method
        参数:
        x_s - scatter X array
        y_s - scatter Y array
        a - scatter value array
        X - x coordinate
        Y - y coordinate
        返回:
        grid data
      • cressman

        public static ucar.ma2.Array cressman​(java.util.List<java.lang.Number> x_s,
                                              java.util.List<java.lang.Number> y_s,
                                              ucar.ma2.Array v_s,
                                              java.util.List<java.lang.Number> X,
                                              java.util.List<java.lang.Number> Y,
                                              java.util.List<java.lang.Number> radList)
        Cressman analysis
        参数:
        x_s - scatter X array
        y_s - scatter Y array
        v_s - scatter value array
        X - x array
        Y - y array
        radList - radii list
        返回:
        result grid data
      • cressman_bak

        public static ucar.ma2.Array cressman_bak​(java.util.List<java.lang.Number> x_s,
                                                  java.util.List<java.lang.Number> y_s,
                                                  ucar.ma2.Array v_s,
                                                  java.util.List<java.lang.Number> X,
                                                  java.util.List<java.lang.Number> Y,
                                                  java.util.List<java.lang.Number> radList)
        Cressman analysis
        参数:
        x_s - scatter X array
        y_s - scatter Y array
        v_s - scatter value array
        X - x array
        Y - y array
        radList - radii list
        返回:
        result grid data
      • linint2

        public static ucar.ma2.Array linint2​(ucar.ma2.Array a,
                                             ucar.ma2.Array X,
                                             ucar.ma2.Array Y,
                                             ucar.ma2.Array newX,
                                             ucar.ma2.Array newY)
        Interpolates from a rectilinear grid to another rectilinear grid using bilinear interpolation.
        参数:
        a - The sample array
        X - X coordinate of the sample array
        Y - Y coordinate of the sample array
        newX - X coordinate of the query points
        newY - Y coordinate of the query points
        返回:
        Resampled array
      • resample_Bilinear

        public static ucar.ma2.Array resample_Bilinear​(ucar.ma2.Array a,
                                                       java.util.List<java.lang.Number> X,
                                                       java.util.List<java.lang.Number> Y,
                                                       java.util.List<java.lang.Number> newX,
                                                       java.util.List<java.lang.Number> newY)
        Resample grid array with bilinear method
        参数:
        a - The sample array
        X - X coordinate of the sample array
        Y - Y coordinate of the sample array
        newX - X coordinate of the query points
        newY - Y coordinate of the query points
        返回:
        Resampled array
      • resample_Bilinear

        public static ucar.ma2.Array resample_Bilinear​(ucar.ma2.Array a,
                                                       ucar.ma2.Array X,
                                                       ucar.ma2.Array Y,
                                                       ucar.ma2.Array newX,
                                                       ucar.ma2.Array newY)
        Resample grid array with bilinear method
        参数:
        a - The sample array
        X - X coordinate of the sample array
        Y - Y coordinate of the sample array
        newX - X coordinate of the query points
        newY - Y coordinate of the query points
        返回:
        Resampled array
      • resample_Neighbor

        public static ucar.ma2.Array resample_Neighbor​(ucar.ma2.Array a,
                                                       ucar.ma2.Array X,
                                                       ucar.ma2.Array Y,
                                                       ucar.ma2.Array newX,
                                                       ucar.ma2.Array newY)
        Resample grid array with neighbor method
        参数:
        a - The sample array
        X - X coordinate of the sample array
        Y - Y coordinate of the sample array
        newX - X coordinate of the query points
        newY - Y coordinate of the query points
        返回:
        Resampled array
      • interpolate

        public ucar.ma2.Array interpolate​(ucar.ma2.Array a,
                                          java.util.List<java.lang.Number> X,
                                          java.util.List<java.lang.Number> Y)
        Interpolate array data
        参数:
        a - Array
        X - X coordinates
        Y - Y coordinates
        返回:
        Result array data
      • interpn_s

        public static double interpn_s​(java.util.List<java.util.List<java.lang.Number>> points,
                                       ucar.ma2.Array values,
                                       java.util.List<java.lang.Number> xi)
        Multidimensional interpolation on regular grids.
        参数:
        points - The points defining the regular grid in n dimensions.
        values - The data on the regular grid in n dimensions.
        xi - The coordinates to sample the gridded data at
        返回:
        Interpolation value
      • interpn_s

        public static double interpn_s​(java.util.List<ucar.ma2.Array> points,
                                       ucar.ma2.Array values,
                                       ucar.ma2.Array xi)
        Multidimensional interpolation on regular grids.
        参数:
        points - The points defining the regular grid in n dimensions.
        values - The data on the regular grid in n dimensions.
        xi - The coordinates to sample the gridded data at
        返回:
        Interpolation value
      • interpn

        public static ucar.ma2.Array interpn​(java.util.List<ucar.ma2.Array> points,
                                             ucar.ma2.Array values,
                                             java.util.List<ucar.ma2.Array> xi)
        Multidimensional interpolation on regular grids.
        参数:
        points - The points defining the regular grid in n dimensions.
        values - The data on the regular grid in n dimensions.
        xi - The coordinates to sample the gridded data at - 2D
        返回:
        Interpolation value
      • interpn

        public static java.lang.Object interpn​(java.util.List<ucar.ma2.Array> points,
                                               ucar.ma2.Array values,
                                               ucar.ma2.Array xi)
                                        throws ucar.ma2.InvalidRangeException
        Multidimensional interpolation on regular grids.
        参数:
        points - The points defining the regular grid in n dimensions.
        values - The data on the regular grid in n dimensions.
        xi - The coordinates to sample the gridded data at - 2D
        返回:
        Interpolation value
        抛出:
        ucar.ma2.InvalidRangeException
      • findIndices

        public static java.lang.Object[] findIndices​(java.util.List<java.util.List<java.lang.Number>> points,
                                                     java.util.List<java.lang.Number> xi)
        Find indices
        参数:
        points - The points defining the regular grid in n dimensions.
        xi - The coordinates to sample the gridded data at
        返回:
        Indices
      • findIndices

        public static java.lang.Object[] findIndices​(java.util.List<ucar.ma2.Array> points,
                                                     ucar.ma2.Array xi)
        Find indices
        参数:
        points - The points defining the regular grid in n dimensions.
        xi - The coordinates to sample the gridded data at
        返回:
        Indices
      • searchSorted

        public static int searchSorted​(java.util.List<java.lang.Number> a,
                                       double v)
        Search sorted list index
        参数:
        a - Sorted list
        v - value
        返回:
        Index
      • searchSorted

        public static int searchSorted​(ucar.ma2.Array a,
                                       double v)
        Search sorted list index
        参数:
        a - Sorted list
        v - value
        返回:
        Index
      • reproject

        public static ucar.ma2.Array[] reproject​(ucar.ma2.Array x,
                                                 ucar.ma2.Array y,
                                                 ProjectionInfo toProj)
        Reproject
        参数:
        x - X array
        y - Y array
        toProj - To projection
        返回:
        Result arrays
      • reproject

        public static ucar.ma2.Array[] reproject​(ucar.ma2.Array x,
                                                 ucar.ma2.Array y,
                                                 ProjectionInfo fromProj,
                                                 ProjectionInfo toProj)
        Reproject
        参数:
        x - X array
        y - Y array
        fromProj - From projection
        toProj - To projection
        返回:
        Result arrays
      • toStation

        public static double toStation​(ucar.ma2.Array data,
                                       java.util.List<java.lang.Number> xArray,
                                       java.util.List<java.lang.Number> yArray,
                                       double x,
                                       double y,
                                       double missingValue)
        Interpolate data to a station point
        参数:
        data - Data array
        xArray - X array
        yArray - Y array
        x - X coordinate of the station
        y - Y coordinate of the station
        missingValue - Missing value
        返回:
        Interpolated value
      • toStation

        public static double toStation​(ucar.ma2.Array data,
                                       java.util.List<java.lang.Number> xArray,
                                       java.util.List<java.lang.Number> yArray,
                                       double x,
                                       double y)
        Interpolate data to a station point
        参数:
        data - Data array
        xArray - X array
        yArray - Y array
        x - X coordinate of the station
        y - Y coordinate of the station
        返回:
        Interpolated value
      • getDimIndex

        public static int getDimIndex​(ucar.ma2.Array dim,
                                      double v)
        Get value index in a dimension array
        参数:
        dim - Dimension array
        v - The value
        返回:
        value index
      • toStation

        public static double toStation​(ucar.ma2.Array data,
                                       ucar.ma2.Array xArray,
                                       ucar.ma2.Array yArray,
                                       double x,
                                       double y)
        Interpolate data to a station point
        参数:
        data - Data array
        xArray - X array
        yArray - Y array
        x - X coordinate of the station
        y - Y coordinate of the station
        返回:
        Interpolated value
      • toStation_Neighbor

        public static double toStation_Neighbor​(ucar.ma2.Array data,
                                                java.util.List<java.lang.Number> xArray,
                                                java.util.List<java.lang.Number> yArray,
                                                double x,
                                                double y,
                                                double missingValue)
        Interpolate data to a station point
        参数:
        data - Data array
        xArray - X array
        yArray - Y array
        x - X coordinate of the station
        y - Y coordinate of the station
        missingValue - Missing value
        返回:
        Interpolated value
      • toStation_Neighbor

        public static double toStation_Neighbor​(ucar.ma2.Array data,
                                                java.util.List<java.lang.Number> xArray,
                                                java.util.List<java.lang.Number> yArray,
                                                double x,
                                                double y)
        Interpolate data to a station point
        参数:
        data - Data array
        xArray - X array
        yArray - Y array
        x - X coordinate of the station
        y - Y coordinate of the station
        返回:
        Interpolated value
      • toStation_Neighbor

        public static double toStation_Neighbor​(ucar.ma2.Array data,
                                                ucar.ma2.Array xArray,
                                                ucar.ma2.Array yArray,
                                                double x,
                                                double y)
        Interpolate data to a station point
        参数:
        data - Data array
        xArray - X array
        yArray - Y array
        x - X coordinate of the station
        y - Y coordinate of the station
        返回:
        Interpolated value
      • reproject_back

        public static java.lang.Object[] reproject_back​(ucar.ma2.Array data,
                                                        java.util.List<java.lang.Number> xx,
                                                        java.util.List<java.lang.Number> yy,
                                                        ProjectionInfo fromProj,
                                                        ProjectionInfo toProj)
                                                 throws ucar.ma2.InvalidRangeException
        Project grid data
        参数:
        data - Data array
        xx - X array
        yy - Y array
        fromProj - From projection
        toProj - To projection
        返回:
        Porjected grid data
        抛出:
        ucar.ma2.InvalidRangeException
      • reproject

        public static java.lang.Object[] reproject​(ucar.ma2.Array data,
                                                   java.util.List<java.lang.Number> xx,
                                                   java.util.List<java.lang.Number> yy,
                                                   ProjectionInfo fromProj,
                                                   ProjectionInfo toProj,
                                                   ResampleMethods method)
                                            throws ucar.ma2.InvalidRangeException
        Project grid data
        参数:
        data - Data array
        xx - X array
        yy - Y array
        fromProj - From projection
        toProj - To projection
        method - Resample method
        返回:
        Porjected grid data
        抛出:
        ucar.ma2.InvalidRangeException
      • reproject

        public static java.lang.Object[] reproject​(ucar.ma2.Array data,
                                                   java.util.List<java.lang.Number> xx,
                                                   java.util.List<java.lang.Number> yy,
                                                   ProjectionInfo fromProj,
                                                   ProjectionInfo toProj)
                                            throws ucar.ma2.InvalidRangeException
        Project grid data
        参数:
        data - Data array
        xx - X array
        yy - Y array
        fromProj - From projection
        toProj - To projection
        返回:
        Porjected grid data
        抛出:
        ucar.ma2.InvalidRangeException
      • reproject

        public static ucar.ma2.Array reproject​(ucar.ma2.Array data,
                                               java.util.List<java.lang.Number> x,
                                               java.util.List<java.lang.Number> y,
                                               ucar.ma2.Array rx,
                                               ucar.ma2.Array ry,
                                               ProjectionInfo fromProj,
                                               ProjectionInfo toProj,
                                               double fill_value,
                                               ResampleMethods resampleMethod)
                                        throws ucar.ma2.InvalidRangeException
        Reproject
        参数:
        data - Data array
        x - X array
        y - Y array
        rx - Result x array
        ry - Result y array
        fromProj - From projection
        toProj - To projection
        fill_value - Fill value
        resampleMethod - Resample method
        返回:
        Result arrays
        抛出:
        ucar.ma2.InvalidRangeException
      • reproject

        public static ucar.ma2.Array reproject​(ucar.ma2.Array data,
                                               java.util.List<java.lang.Number> x,
                                               java.util.List<java.lang.Number> y,
                                               ucar.ma2.Array rx,
                                               ucar.ma2.Array ry,
                                               ProjectionInfo fromProj,
                                               ProjectionInfo toProj,
                                               ResampleMethods resampleMethod)
                                        throws ucar.ma2.InvalidRangeException
        Reproject
        参数:
        data - Data array
        x - X array
        y - Y array
        rx - Result x array
        ry - Result y array
        fromProj - From projection
        toProj - To projection
        resampleMethod - Resample method
        返回:
        Result arrays
        抛出:
        ucar.ma2.InvalidRangeException
      • reproject

        public static ucar.ma2.Array reproject​(ucar.ma2.Array data,
                                               java.util.List<java.lang.Number> x,
                                               java.util.List<java.lang.Number> y,
                                               java.util.List<java.lang.Number> rx,
                                               java.util.List<java.lang.Number> ry,
                                               ProjectionInfo fromProj,
                                               ProjectionInfo toProj,
                                               double fill_value,
                                               ResampleMethods resampleMethod)
        Reproject
        参数:
        data - Data array
        x - X array
        y - Y array
        rx - Result x array
        ry - Result y array
        fromProj - From projection
        toProj - To projection
        fill_value - Fill value
        resampleMethod - Resample method
        返回:
        Result arrays
      • convexHull

        public static PolygonShape convexHull​(ucar.ma2.Array x,
                                              ucar.ma2.Array y)
        Computes the smallest convex Polygon that contains all the points
        参数:
        x - X array
        y - Y array
        返回:
        PolygonShape