类 TableUtil


  • public class TableUtil
    extends Object
    作者:
    yaqiang
    • 构造器详细资料

      • TableUtil

        public TableUtil()
    • 方法详细资料

      • readASCIIFile

        public static TableData readASCIIFile​(String fileName,
                                              String delimiter,
                                              int headerLines,
                                              String formatSpec,
                                              String encoding,
                                              boolean readVarNames,
                                              List<Object> usecolsin)
                                       throws FileNotFoundException,
                                              IOException,
                                              Exception
        Read data table from ASCII file
        参数:
        fileName - File name
        delimiter - Delimiter
        headerLines - Number of lines to skip at begining of the file
        formatSpec - Format specifiers string
        encoding - Fle encoding
        readVarNames - Read variable names or not
        usecolsin - Filter columns by column names or indices
        返回:
        TableData object
        抛出:
        FileNotFoundException
        IOException
        Exception
      • getFormats

        public static List<String> getFormats​(String formatSpec)
        Get format list
        参数:
        formatSpec - Input format specific string
        返回:
        Format list
      • toDataTypes

        public static org.meteoinfo.ndarray.DataType toDataTypes​(String dt)
        To data type - MeteoInfo
        参数:
        dt - Data type string
        返回:
        Data type
      • getDateFormat

        public static String getDateFormat​(String dt)
        Get date format string
        参数:
        dt - Format string
        返回:
        Date format string
      • ave_Month

        public static DataTable ave_Month​(List<org.meteoinfo.ndarray.Array> data,
                                          List<String> colNames,
                                          List<LocalDateTime> time)
                                   throws Exception
        Average month by month
        参数:
        data - Data array list
        colNames - Column names
        time - Time list
        返回:
        Result data table
        抛出:
        Exception
      • getYearMonths

        public static List<String> getYearMonths​(List<LocalDateTime> time)
        Get year months
        参数:
        time - Date list
        返回:
        Year month list