类 GridData

    • 字段概要

      字段 
      修饰符和类型 字段 说明
      protected double[][] data
      Grid data
      protected java.lang.String fieldName  
      protected double missingValue  
      protected org.meteoinfo.projection.ProjectionInfo projInfo
      Projection information
      protected double[] xArray  
      protected double[] yArray  
    • 构造器概要

      构造器 
      构造器 说明
      GridData​(double[][] data, double[] xArray, double[] yArray)
      Constructor
      GridData​(double[][] data, double[] xArray, double[] yArray, double missingValue)
      Constructor
      GridData​(double[][] data, double[] xArray, double[] yArray, double missingValue, org.meteoinfo.projection.ProjectionInfo projInfo)
      Constructor
      GridData​(double[][] data, double[] xArray, double[] yArray, org.meteoinfo.projection.ProjectionInfo projInfo)
      Constructor
      GridData​(double[] xArray, double[] yArray)
      Constructor
      GridData​(double xStart, double xDelta, int xNum, double yStart, double yDelta, int yNum)
      Constructor
      GridData​(int yNum, int xNum)
      Constructor
      GridData​(GridData aGridData)
      Constructor
      GridData​(org.meteoinfo.ndarray.Array array, java.util.List<java.lang.Number> xdata, java.util.List<java.lang.Number> ydata, double missingValue, org.meteoinfo.projection.ProjectionInfo projInfo)
      Constructor
      GridData​(org.meteoinfo.ndarray.Array array, org.meteoinfo.ndarray.Array xdata, org.meteoinfo.ndarray.Array ydata)
      Constructor
      GridData​(org.meteoinfo.ndarray.Array array, org.meteoinfo.ndarray.Array xdata, org.meteoinfo.ndarray.Array ydata, java.lang.Number missingValue)
      Constructor
      GridData​(org.meteoinfo.ndarray.Array array, org.meteoinfo.ndarray.Array xdata, org.meteoinfo.ndarray.Array ydata, java.lang.Number missingValue, org.meteoinfo.projection.ProjectionInfo projInfo)
      Constructor
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      GridData abs()
      Calculate abstract grid data
      GridData acos()
      Calculate anti-cosine grid data
      GridData add​(double value)
      Add operation with a double value
      GridData add​(GridData bGrid)
      Add operation with another grid data
      void aggregate​(GridData toGridData, boolean isAverage)
      Aggregate the grid data to coarser resolution
      GridData asin()
      Calculate anti-sine grid data
      GridData atan()
      Calculate anti-tangent grid data
      double average()
      Calculate average value
      double[] average​(GridData bGrid, double[] tValues)
      Calculate average data array by another grid data and threshold values
      java.lang.Object clone()
      Clone
      GridData cos()
      Calculate cosine grid data
      GridData div​(double value)
      Divide operation with a double value
      GridData div​(GridData bGrid)
      Divide operation with another grid data
      GridData exp()
      Calculate e raised specific power value of grid data
      void extendToGlobal()
      Extend the grid data to global by add a new column data
      GridData extract​(double sX, double eX, double sY, double eY)
      Extract grid data by extent
      GridData extract​(int sXIdx, int sYIdx, int xNum, int yNum)
      Extract grid data by extent index
      GridData extract​(int sXIdx, int eXIdx, int xstep, int sYIdx, int eYIdx, int ystep)
      Extract grid data by extent index
      GridData extract​(org.meteoinfo.common.Extent extent)
      Extract grid data by extent
      void gassianToLatLon()
      Convert Gassian grid to lat/lon grid
      void GassianToLatLon_Simple()
      Convert Gassian grid to lat/lon grid - only convert Y coordinate
      org.meteoinfo.ndarray.Array getArray()
      Get array from data
      double getBorderXMax()
      Get maximum x of the grid border
      double getBorderXMin()
      Get minimum x of the grid border
      double getBorderYMax()
      Get maximum y of the grid border
      double getBorderYMin()
      Get minimum y of the grid border
      double[][] getData()
      Get data array
      java.util.List<org.meteoinfo.ndarray.Dimension> getDimensions()
      Get dimensions
      double getDoubleMissingValue()
      Get missing value
      double getDoubleValue​(int i, int j)
      Get double value
      org.meteoinfo.common.Extent getExtent()
      Get Extent
      java.lang.String getFieldName()
      Get field name
      GridDataSetting getGridDataSetting()
      Get grid data setting
      int[] getIJIndex​(double x, double y)
      Get i/j index of a point in the grid
      double[] getMaxMinValue()
      Get maximum and minimum values
      boolean getMaxMinValue​(double[] maxmin)
      Get maximum and minimum values
      double getMaxValue()
      Get maximum value
      double getMinValue()
      Get minimum value
      org.meteoinfo.projection.ProjectionInfo getProjInfo()
      Get projection
      java.util.List<java.lang.Number> getUniqueValues()
      Get unique values
      double getValue​(double x, double y)
      Get a cell value by X/Y coordinate - nearest cell
      java.lang.Number getValue​(int i, int j)
      Get value
      double[] getXArray()
      Get x array
      double getXDelta()
      Get xArray delta
      double getXMax()
      Get maximum x
      double getXMin()
      Get minimum x
      int getXNum()
      Get xArray number
      double[] getYArray()
      Get y array
      double getYDelta()
      Get yArray delta
      double getYMax()
      Get maximum y
      double getYMin()
      Get minimum y
      int getYNum()
      Get yArray number
      boolean hasMissing()
      Get if has missing value
      boolean hasNaN()
      Get if has NaN value
      GridData interpolate()
      Interpolate grid data
      GridData interpolate_old()
      Interpolate grid data
      double[][] interpolation_Grid​(double[][] GridData, double[] X, double[] Y, double unDefData, double[] nX, double[] nY)
      Interpolate from grid data
      boolean isGlobal()
      Get if the data is global
      boolean isXStagger()
      Get if is x stagger
      boolean isYStagger()
      Get if is y stagger
      GridData log()
      Calculate logrithm grid data
      GridData log10()
      Calculate base 10 logrithm grid data
      GridData maskout​(GridData maskGrid)
      Mask out grid data by a mask grid data
      GridData max​(GridData bGrid)
      Maximum operation with another grid data
      GridData merge​(GridData bGrid)
      Merge grid values by anthor grid data - the two grids should have same extent replace missing value with valid data
      GridData min​(GridData bGrid)
      Minimum operation with another grid data
      GridData mul​(double value)
      Multiply operation with a double value
      GridData mul​(GridData bGrid)
      Multiply operation with another grid data
      GridData pow​(double p)
      Calculate power grid data
      GridData project​(org.meteoinfo.projection.ProjectionInfo toProj)
      Project grid data
      GridData project​(org.meteoinfo.projection.ProjectionInfo toProj, double[] newX, double[] newY)
      Project grid data
      GridData project​(org.meteoinfo.projection.ProjectionInfo toProj, double[] newX, double[] newY, org.meteoinfo.common.ResampleMethods resampleMethod)
      Project grid data
      GridData project​(org.meteoinfo.projection.ProjectionInfo fromProj, org.meteoinfo.projection.ProjectionInfo toProj)
      Project grid data
      GridData project​(org.meteoinfo.projection.ProjectionInfo fromProj, org.meteoinfo.projection.ProjectionInfo toProj, double[] newX, double[] newY, org.meteoinfo.common.ResampleMethods resampleMethod)
      Project grid data
      GridData project​(org.meteoinfo.projection.ProjectionInfo fromProj, org.meteoinfo.projection.ProjectionInfo toProj, org.meteoinfo.common.ResampleMethods resampleMethod)
      Project grid data
      StationData project​(org.meteoinfo.projection.ProjectionInfo fromProj, org.meteoinfo.projection.ProjectionInfo toProj, StationData stData, org.meteoinfo.common.ResampleMethods resampleMethod)
      Project grid data to station data
      void regrid​(GridData gridData)
      Regrid data with double linear interpolation method
      void replaceValue​(double aValue, double bValue)
      Replace a certain grid data value by a new value
      void replaceValue​(double aValue, double bValue, boolean bigger)
      Replace grid data value by a threshold - the values bigger/smaller than the threshold value will be replaced by the new value
      GridData resample​(GridData toGridData, org.meteoinfo.common.ResampleMethods method)
      Resample grid data
      void saveAsBILFile​(java.lang.String fileName)
      Save as BIL data file
      void saveAsESRIASCIIFile​(java.lang.String aFile)
      Save as ESRI ASCII data file
      void saveAsStationData​(java.lang.String filePath, java.lang.String fieldName)
      Save as station data file
      void saveAsSurferASCIIFile​(java.lang.String aFile)
      Save as Surfer ASCII data file
      void setFieldName​(java.lang.String value)
      Set field name
      void setMissingValue​(double value)
      Set missing value
      void setMissingValue​(double value, boolean isBigger)
      Set missing value - bigger or smaller than the given value
      void setProjInfo​(org.meteoinfo.projection.ProjectionInfo value)
      Set projection
      GridData setValue​(double aValue)
      Set constant value to all grid cells
      void setValue​(int i, int j, double v)
      Set value
      void setValue​(int i, int j, java.lang.Number v)
      Set value
      GridData setValue​(GridData bGrid)
      Set grid values by anthor grid data - overlay
      GridData setValue​(GridData bGrid, boolean useMissingData)
      Set grid values by anthor grid data - overlay
      void setXArray​(double[] value)
      Set x array
      void setXStagger​(boolean value)
      Set if is x stagger
      void setYArray​(double[] value)
      Set y array
      void setYStagger​(boolean value)
      Set if is y stagger
      GridData sin()
      Calculate sine grid data
      GridData skip​(int skipI, int skipJ)
      Skip the grid data by two dimension skip factor
      GridData sqrt()
      Calculate square root grid data
      double[] statistics()
      Simple statistics of the grid data
      GridData sub​(double value)
      Subtraction operation with a double value
      GridData sub​(GridData bGrid)
      Subtraction operation with another grid data
      double sum()
      Calculate summary value
      GridData tan()
      Calculate tangent grid data
      boolean testUniqueValues()
      Test unique values
      GridArray toGridArray()
      Convert to GridArray object
      double toStation​(double x, double y)
      Interpolate grid data to a station point
      void toStation​(java.lang.String inFile, java.lang.String outFile)
      Interpolate grid data to stations imported from station file
      java.util.List<java.lang.Double> toStation​(java.util.List<java.lang.Number> xlist, java.util.List<java.lang.Number> ylist)
      Interpolate grid data to station points
      StationData toStation​(StationData stData)
      Interpolate grid data to station data
      void toStation​(StationTableData stData)
      Interpolate grid data to station data
      double toStation_Gaussian​(double x, double y)
      Interpolate grid data to a station point
      GridData unStagger_X()
      Un stag grid data through x dimension
      GridData unStagger_Y()
      Un stag grid data through y dimension
      void xReverse()
      xArray reverse to the grid data
      void yReverse()
      yArray reverse to the grid data
      • 从类继承的方法 java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 字段详细资料

      • data

        protected double[][] data
        Grid data
      • xArray

        protected double[] xArray
      • yArray

        protected double[] yArray
      • missingValue

        protected double missingValue
      • projInfo

        protected org.meteoinfo.projection.ProjectionInfo projInfo
        Projection information
      • fieldName

        protected java.lang.String fieldName
    • 构造器详细资料

      • GridData

        public GridData​(GridData aGridData)
        Constructor
        参数:
        aGridData - The grid data
      • GridData

        public GridData​(double[][] data,
                        double[] xArray,
                        double[] yArray,
                        double missingValue,
                        org.meteoinfo.projection.ProjectionInfo projInfo)
        Constructor
        参数:
        data - Data array
        xArray - X array
        yArray - Y array
        missingValue - Missing value
        projInfo - Projection info
      • GridData

        public GridData​(double[][] data,
                        double[] xArray,
                        double[] yArray,
                        double missingValue)
        Constructor
        参数:
        data - Data array
        xArray - X array
        yArray - Y array
        missingValue - Missing value
      • GridData

        public GridData​(double[][] data,
                        double[] xArray,
                        double[] yArray,
                        org.meteoinfo.projection.ProjectionInfo projInfo)
        Constructor
        参数:
        data - Data array
        xArray - X array
        yArray - Y array
        missingValue - Missing value
        projInfo - Projection info
      • GridData

        public GridData​(double[][] data,
                        double[] xArray,
                        double[] yArray)
        Constructor
        参数:
        data - Data array
        xArray - X array
        yArray - Y array
      • GridData

        public GridData​(int yNum,
                        int xNum)
        Constructor
        参数:
        yNum - Y number
        xNum - X number
      • GridData

        public GridData​(double[] xArray,
                        double[] yArray)
        Constructor
        参数:
        xArray - Y array
        yArray - X array
      • GridData

        public GridData​(double xStart,
                        double xDelta,
                        int xNum,
                        double yStart,
                        double yDelta,
                        int yNum)
        Constructor
        参数:
        xStart - xArray start
        xDelta - xArray delt
        xNum - xArray number
        yStart - yArray start
        yDelta - yArray delt
        yNum - yArray number
      • GridData

        public GridData​(org.meteoinfo.ndarray.Array array,
                        java.util.List<java.lang.Number> xdata,
                        java.util.List<java.lang.Number> ydata,
                        double missingValue,
                        org.meteoinfo.projection.ProjectionInfo projInfo)
        Constructor
        参数:
        array - Data array
        xdata - X data
        ydata - Y data
        missingValue - Missing value
        projInfo - Projection info
      • GridData

        public GridData​(org.meteoinfo.ndarray.Array array,
                        org.meteoinfo.ndarray.Array xdata,
                        org.meteoinfo.ndarray.Array ydata)
        Constructor
        参数:
        array - Data array
        xdata - X data
        ydata - Y data
      • GridData

        public GridData​(org.meteoinfo.ndarray.Array array,
                        org.meteoinfo.ndarray.Array xdata,
                        org.meteoinfo.ndarray.Array ydata,
                        java.lang.Number missingValue)
        Constructor
        参数:
        array - Data array
        xdata - X data
        ydata - Y data
        missingValue - Missing value
      • GridData

        public GridData​(org.meteoinfo.ndarray.Array array,
                        org.meteoinfo.ndarray.Array xdata,
                        org.meteoinfo.ndarray.Array ydata,
                        java.lang.Number missingValue,
                        org.meteoinfo.projection.ProjectionInfo projInfo)
        Constructor
        参数:
        array - Data array
        xdata - X data
        ydata - Y data
        missingValue - Missing value
    • 方法详细资料

      • getData

        public double[][] getData()
        Get data array
        返回:
        Data array
      • getXArray

        public double[] getXArray()
        Get x array
        返回:
        X array
      • setXArray

        public void setXArray​(double[] value)
        Set x array
        参数:
        value - X array
      • getYArray

        public double[] getYArray()
        Get y array
        返回:
        Y array
      • setYArray

        public void setYArray​(double[] value)
        Set y array
        参数:
        value - Y array
      • getDoubleMissingValue

        public double getDoubleMissingValue()
        Get missing value
        返回:
        Missing value
      • getProjInfo

        public org.meteoinfo.projection.ProjectionInfo getProjInfo()
        Get projection
        返回:
        Projection
      • setProjInfo

        public void setProjInfo​(org.meteoinfo.projection.ProjectionInfo value)
        Set projection
        参数:
        value - Projection
      • getFieldName

        public java.lang.String getFieldName()
        Get field name
        返回:
        Field name
      • setFieldName

        public void setFieldName​(java.lang.String value)
        Set field name
        参数:
        value - Field name
      • getXNum

        public int getXNum()
        Get xArray number
        返回:
        xArray number
      • getYNum

        public int getYNum()
        Get yArray number
        返回:
        yArray number
      • getXDelta

        public double getXDelta()
        Get xArray delta
        返回:
        xArray delta
      • getYDelta

        public double getYDelta()
        Get yArray delta
        返回:
        yArray delta
      • getExtent

        public org.meteoinfo.common.Extent getExtent()
        Get Extent
        返回:
        Extent
      • isGlobal

        public boolean isGlobal()
        Get if the data is global
        返回:
        If the data is global
      • isXStagger

        public boolean isXStagger()
        Get if is x stagger
        返回:
        Boolean
      • setXStagger

        public void setXStagger​(boolean value)
        Set if is x stagger
        参数:
        value - Boolean
      • isYStagger

        public boolean isYStagger()
        Get if is y stagger
        返回:
        Boolean
      • setYStagger

        public void setYStagger​(boolean value)
        Set if is y stagger
        参数:
        value - Boolean
      • getValue

        public java.lang.Number getValue​(int i,
                                         int j)
        Get value
        参数:
        i - I index
        j - J index
        返回:
        Value
      • setValue

        public void setValue​(int i,
                             int j,
                             java.lang.Number v)
        Set value
        参数:
        i - I index
        j - J index
        v - Value
      • setValue

        public void setValue​(int i,
                             int j,
                             double v)
        Set value
        参数:
        i - I index
        j - J index
        v - Value
      • getDoubleValue

        public double getDoubleValue​(int i,
                                     int j)
        Get double value
        参数:
        i - I index
        j - J index
        返回:
        Double value
      • add

        public GridData add​(GridData bGrid)
        Add operation with another grid data
        参数:
        bGrid - The grid data
        返回:
        Added grid data
      • add

        public GridData add​(double value)
        Add operation with a double value
        参数:
        value - Double value
        返回:
        Added grid data
      • sub

        public GridData sub​(GridData bGrid)
        Subtraction operation with another grid data
        参数:
        bGrid - The grid data
        返回:
        Subtracted grid data
      • sub

        public GridData sub​(double value)
        Subtraction operation with a double value
        参数:
        value - The double value
        返回:
        Subtracted grid data
      • mul

        public GridData mul​(GridData bGrid)
        Multiply operation with another grid data
        参数:
        bGrid - The grid data
        返回:
        Result grid data
      • mul

        public GridData mul​(double value)
        Multiply operation with a double value
        参数:
        value - Double value
        返回:
        Result grid data
      • div

        public GridData div​(GridData bGrid)
        Divide operation with another grid data
        参数:
        bGrid - The grid data
        返回:
        Result grid data
      • div

        public GridData div​(double value)
        Divide operation with a double value
        参数:
        value - Double value
        返回:
        Result grid data
      • regrid

        public void regrid​(GridData gridData)
        Regrid data with double linear interpolation method
        参数:
        gridData - Result grid data
      • toStation

        public double toStation​(double x,
                                double y)
        Interpolate grid data to a station point
        参数:
        x - X coordinate of the station
        y - Y coordinate of the station
        返回:
        Interpolated value
      • toStation

        public java.util.List<java.lang.Double> toStation​(java.util.List<java.lang.Number> xlist,
                                                          java.util.List<java.lang.Number> ylist)
        Interpolate grid data to station points
        参数:
        xlist - X coordinate list
        ylist - Y coordinate list
        返回:
        Result data list
      • toStation

        public StationData toStation​(StationData stData)
        Interpolate grid data to station data
        参数:
        stData - Station data
        返回:
        Interpolated station data
      • toStation

        public void toStation​(StationTableData stData)
        Interpolate grid data to station data
        参数:
        stData - Station table data
      • toStation

        public void toStation​(java.lang.String inFile,
                              java.lang.String outFile)
                       throws java.io.UnsupportedEncodingException,
                              java.io.FileNotFoundException,
                              java.io.IOException
        Interpolate grid data to stations imported from station file
        参数:
        inFile - Input station file
        outFile - Output station file
        抛出:
        java.io.UnsupportedEncodingException
        java.io.FileNotFoundException
        java.io.IOException
      • setValue

        public GridData setValue​(GridData bGrid)
        Set grid values by anthor grid data - overlay
        参数:
        bGrid - The grid data
        返回:
        Result grid data
      • setValue

        public GridData setValue​(GridData bGrid,
                                 boolean useMissingData)
        Set grid values by anthor grid data - overlay
        参数:
        bGrid - The grid data
        useMissingData - if set missing data
        返回:
        Result grid data
      • setValue

        public GridData setValue​(double aValue)
        Set constant value to all grid cells
        参数:
        aValue - The value
        返回:
        Result grid data
      • replaceValue

        public void replaceValue​(double aValue,
                                 double bValue)
        Replace a certain grid data value by a new value
        参数:
        aValue - Old value
        bValue - New value
      • replaceValue

        public void replaceValue​(double aValue,
                                 double bValue,
                                 boolean bigger)
        Replace grid data value by a threshold - the values bigger/smaller than the threshold value will be replaced by the new value
        参数:
        aValue - Threshold value
        bValue - New value
        bigger - Bigger or smaller
      • merge

        public GridData merge​(GridData bGrid)
        Merge grid values by anthor grid data - the two grids should have same extent replace missing value with valid data
        参数:
        bGrid - The grid data
        返回:
        Result grid data
      • max

        public GridData max​(GridData bGrid)
        Maximum operation with another grid data
        参数:
        bGrid - The grid data
        返回:
        Maximum grid data
      • min

        public GridData min​(GridData bGrid)
        Minimum operation with another grid data
        参数:
        bGrid - The grid data
        返回:
        Minimum grid data
      • sum

        public double sum()
        Calculate summary value
        返回:
        Summary value
      • average

        public double average()
        Calculate average value
        返回:
        Average value
      • average

        public double[] average​(GridData bGrid,
                                double[] tValues)
        Calculate average data array by another grid data and threshold values
        参数:
        bGrid - The grid data
        tValues - Threshold values
        返回:
        Average values
      • statistics

        public double[] statistics()
        Simple statistics of the grid data
        返回:
        Result array - average, standard deviation
      • abs

        public GridData abs()
        Calculate abstract grid data
        返回:
        Result grid data
      • acos

        public GridData acos()
        Calculate anti-cosine grid data
        返回:
        Result grid data
      • asin

        public GridData asin()
        Calculate anti-sine grid data
        返回:
        Result grid data
      • atan

        public GridData atan()
        Calculate anti-tangent grid data
        返回:
        Result grid data
      • cos

        public GridData cos()
        Calculate cosine grid data
        返回:
        Result grid data
      • sin

        public GridData sin()
        Calculate sine grid data
        返回:
        Result grid data
      • tan

        public GridData tan()
        Calculate tangent grid data
        返回:
        Result grid data
      • exp

        public GridData exp()
        Calculate e raised specific power value of grid data
        返回:
        Result grid data
      • pow

        public GridData pow​(double p)
        Calculate power grid data
        参数:
        p - Power value
        返回:
        Result grid data
      • sqrt

        public GridData sqrt()
        Calculate square root grid data
        返回:
        Result grid data
      • log

        public GridData log()
        Calculate logrithm grid data
        返回:
        Result grid data
      • log10

        public GridData log10()
        Calculate base 10 logrithm grid data
        返回:
        Result grid data
      • extendToGlobal

        public void extendToGlobal()
        Extend the grid data to global by add a new column data
      • getArray

        public org.meteoinfo.ndarray.Array getArray()
        Get array from data
        返回:
        Array
      • getDimensions

        public java.util.List<org.meteoinfo.ndarray.Dimension> getDimensions()
        Get dimensions
        返回:
        Dimensions
      • extract

        public GridData extract​(org.meteoinfo.common.Extent extent)
        Extract grid data by extent
        参数:
        extent - Extent
        返回:
        Extracted grid data
      • extract

        public GridData extract​(double sX,
                                double eX,
                                double sY,
                                double eY)
        Extract grid data by extent
        参数:
        sX - Start X
        eX - End X
        sY - Start Y
        eY - End Y
        返回:
        Grid data
      • extract

        public GridData extract​(int sXIdx,
                                int sYIdx,
                                int xNum,
                                int yNum)
        Extract grid data by extent index
        参数:
        sXIdx - Start x index
        sYIdx - Start y index
        xNum - X number
        yNum - Y number
        返回:
        Extracted grid data
      • extract

        public GridData extract​(int sXIdx,
                                int eXIdx,
                                int xstep,
                                int sYIdx,
                                int eYIdx,
                                int ystep)
        Extract grid data by extent index
        参数:
        sXIdx - Start x index
        eXIdx - End x index
        xstep - X step
        sYIdx - Start y index
        eYIdx - End y index
        ystep - Y step
        返回:
        Extracted grid data
      • setMissingValue

        public void setMissingValue​(double value,
                                    boolean isBigger)
        Set missing value - bigger or smaller than the given value
        参数:
        value - The given value
        isBigger - Is bigger or not
      • skip

        public GridData skip​(int skipI,
                             int skipJ)
        Skip the grid data by two dimension skip factor
        参数:
        skipI - Skip number in x coordinate
        skipJ - Skip number in y coordinate
        返回:
        Grid data
      • getValue

        public double getValue​(double x,
                               double y)
        Get a cell value by X/Y coordinate - nearest cell
        参数:
        x - X coordinate
        y - Y coordinate
        返回:
        Cell value
      • toStation_Gaussian

        public double toStation_Gaussian​(double x,
                                         double y)
        Interpolate grid data to a station point
        参数:
        x - X coordinate of the station
        y - Y coordinate of the station
        返回:
        Interpolated value
      • gassianToLatLon

        public void gassianToLatLon()
        Convert Gassian grid to lat/lon grid
      • GassianToLatLon_Simple

        public void GassianToLatLon_Simple()
        Convert Gassian grid to lat/lon grid - only convert Y coordinate
      • getXMin

        public double getXMin()
        Get minimum x
        返回:
        Minimum x
      • getXMax

        public double getXMax()
        Get maximum x
        返回:
        Maximum x
      • getYMin

        public double getYMin()
        Get minimum y
        返回:
        Minimum y
      • getYMax

        public double getYMax()
        Get maximum y
        返回:
        Maximum y
      • getBorderXMin

        public double getBorderXMin()
        Get minimum x of the grid border
        返回:
        Minimum x of the grid border
      • getBorderXMax

        public double getBorderXMax()
        Get maximum x of the grid border
        返回:
        Maximum x of the grid border
      • getBorderYMin

        public double getBorderYMin()
        Get minimum y of the grid border
        返回:
        Minimum y of the grid border
      • getBorderYMax

        public double getBorderYMax()
        Get maximum y of the grid border
        返回:
        Maximum y of the grid border
      • getIJIndex

        public int[] getIJIndex​(double x,
                                double y)
        Get i/j index of a point in the grid
        参数:
        x - The x coordinate
        y - The y coordinate
        返回:
        I/J index array
      • saveAsSurferASCIIFile

        public void saveAsSurferASCIIFile​(java.lang.String aFile)
        Save as Surfer ASCII data file
        参数:
        aFile - File path
      • saveAsESRIASCIIFile

        public void saveAsESRIASCIIFile​(java.lang.String aFile)
        Save as ESRI ASCII data file
        参数:
        aFile - File path
      • saveAsBILFile

        public void saveAsBILFile​(java.lang.String fileName)
                           throws java.io.IOException
        Save as BIL data file
        参数:
        fileName - File path
        抛出:
        java.io.IOException
      • saveAsStationData

        public void saveAsStationData​(java.lang.String filePath,
                                      java.lang.String fieldName)
        Save as station data file
        参数:
        filePath - File Path
        fieldName - Field name
      • getMaxMinValue

        public boolean getMaxMinValue​(double[] maxmin)
        Get maximum and minimum values
        参数:
        maxmin - Max/Min array
        返回:
        If has undefine data
      • hasMissing

        public boolean hasMissing()
        Get if has missing value
        返回:
        Boolean
      • setMissingValue

        public void setMissingValue​(double value)
        Set missing value
        参数:
        value - Missing value
      • hasNaN

        public boolean hasNaN()
        Get if has NaN value
        返回:
        Boolean
      • getMaxMinValue

        public double[] getMaxMinValue()
        Get maximum and minimum values
        返回:
        Max/Min array
      • getMaxValue

        public double getMaxValue()
        Get maximum value
        返回:
        Maximum value
      • getMinValue

        public double getMinValue()
        Get minimum value
        返回:
        Minimum value
      • testUniqueValues

        public boolean testUniqueValues()
        Test unique values
        返回:
        True if unique value number less then 20
      • getUniqueValues

        public java.util.List<java.lang.Number> getUniqueValues()
        Get unique values
        返回:
        Unique values
      • getGridDataSetting

        public GridDataSetting getGridDataSetting()
        Get grid data setting
        返回:
        Grid data setting
      • maskout

        public GridData maskout​(GridData maskGrid)
        Mask out grid data by a mask grid data
        参数:
        maskGrid - Mask grid data
        返回:
        Result grid data
      • resample

        public GridData resample​(GridData toGridData,
                                 org.meteoinfo.common.ResampleMethods method)
        Resample grid data
        参数:
        toGridData - The grid data
        method - The resample method
        返回:
        Result grid data
      • interpolate

        public GridData interpolate()
        Interpolate grid data
        返回:
        Result grid data
      • interpolation_Grid

        public double[][] interpolation_Grid​(double[][] GridData,
                                             double[] X,
                                             double[] Y,
                                             double unDefData,
                                             double[] nX,
                                             double[] nY)
        Interpolate from grid data
        参数:
        GridData - input grid data
        X - input x coordinates
        Y - input y coordinates
        unDefData - undefine data
        nX - output x coordinate
        nY - output y coordinate
        返回:
        output grid data
      • interpolate_old

        public GridData interpolate_old()
        Interpolate grid data
        返回:
        Result grid data
      • project

        public GridData project​(org.meteoinfo.projection.ProjectionInfo toProj)
        Project grid data
        参数:
        toProj - To projection
        返回:
        Projected grid data
      • project

        public GridData project​(org.meteoinfo.projection.ProjectionInfo fromProj,
                                org.meteoinfo.projection.ProjectionInfo toProj)
        Project grid data
        参数:
        fromProj - From projection
        toProj - To projection
        返回:
        Porjected grid data
      • project

        public GridData project​(org.meteoinfo.projection.ProjectionInfo fromProj,
                                org.meteoinfo.projection.ProjectionInfo toProj,
                                org.meteoinfo.common.ResampleMethods resampleMethod)
        Project grid data
        参数:
        fromProj - From projection
        toProj - To projection
        resampleMethod - Interpolation method
        返回:
        Porjected grid data
      • project

        public GridData project​(org.meteoinfo.projection.ProjectionInfo toProj,
                                double[] newX,
                                double[] newY)
        Project grid data
        参数:
        toProj - To projection info
        newX - New xArray coordinates
        newY - New yArray coordinates
        返回:
        Projected grid data
      • project

        public GridData project​(org.meteoinfo.projection.ProjectionInfo toProj,
                                double[] newX,
                                double[] newY,
                                org.meteoinfo.common.ResampleMethods resampleMethod)
        Project grid data
        参数:
        toProj - To projection info
        newX - New xArray coordinates
        newY - New yArray coordinates
        resampleMethod - Interpolation method
        返回:
        Projected grid data
      • project

        public GridData project​(org.meteoinfo.projection.ProjectionInfo fromProj,
                                org.meteoinfo.projection.ProjectionInfo toProj,
                                double[] newX,
                                double[] newY,
                                org.meteoinfo.common.ResampleMethods resampleMethod)
        Project grid data
        参数:
        fromProj - From projection info
        toProj - To projection info
        newX - New xArray coordinates
        newY - New yArray coordinates
        resampleMethod - Interpolation method
        返回:
        Projected grid data
      • project

        public StationData project​(org.meteoinfo.projection.ProjectionInfo fromProj,
                                   org.meteoinfo.projection.ProjectionInfo toProj,
                                   StationData stData,
                                   org.meteoinfo.common.ResampleMethods resampleMethod)
        Project grid data to station data
        参数:
        fromProj - From projection info
        toProj - To projection info
        stData - Station data
        resampleMethod - Interpolation method
        返回:
        Projected station data
      • aggregate

        public void aggregate​(GridData toGridData,
                              boolean isAverage)
        Aggregate the grid data to coarser resolution
        参数:
        toGridData - To grid data
        isAverage - If is average
      • unStagger_X

        public GridData unStagger_X()
        Un stag grid data through x dimension
        返回:
        Un stagged grid data
      • unStagger_Y

        public GridData unStagger_Y()
        Un stag grid data through y dimension
        返回:
        Un stagged grid data
      • clone

        public java.lang.Object clone()
        Clone
        覆盖:
        clone 在类中 java.lang.Object
        返回:
        Grid data object
      • yReverse

        public void yReverse()
        yArray reverse to the grid data
      • xReverse

        public void xReverse()
        xArray reverse to the grid data
      • toGridArray

        public GridArray toGridArray()
        Convert to GridArray object
        返回:
        GridArray object