类 DataInfo
- java.lang.Object
-
- org.meteoinfo.data.meteodata.DataInfo
-
- 直接已知子类:
ARLDataInfo,ASCIIGridDataInfo,AWXDataInfo,BaseRadarDataInfo,BILDataInfo,GeoTiffDataInfo,GrADSDataInfo,GRIB2DataInfo,HYSPLITConcDataInfo,HYSPLITPartDataInfo,HYSPLITTrajDataInfo,LonLatStationDataInfo,MatLabDataInfo,MDFSDataInfo,METARDataInfo,MICAPS11DataInfo,MICAPS120DataInfo,MICAPS131DataInfo,MICAPS13DataInfo,MICAPS1DataInfo,MICAPS2DataInfo,MICAPS3DataInfo,MICAPS4DataInfo,MICAPS7DataInfo,MM5DataInfo,MM5IMDataInfo,NetCDFDataInfo,NumpyDataInfo,SurferGridDataInfo,SYNOPDataInfo
public abstract class DataInfo extends Object
Template- 作者:
- Yaqiang Wang
-
-
字段概要
字段 修饰符和类型 字段 说明 protected List<Attribute>attributesprotected List<Dimension>dimensionsprotected StringfileNameprotected booleanisGlobalprotected MeteoDataTypemeteoDataTypeprotected doublemissingValueprotected ProjectionInfoprojInfoprotected DimensiontDimprotected List<Variable>variablesprotected DimensionxDimprotected booleanxReverseprotected DimensionyDimprotected booleanyReverseprotected DimensionzDim
-
构造器概要
构造器 构造器 说明 DataInfo()
-
方法概要
所有方法 静态方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 voidaddAttribute(Attribute attr)Add a global attributevoidaddDimension(Dimension dim)Add a dimensionvoidaddVariable(Variable var)Add a variableAttributefindGlobalAttribute(String attName)Find global attributeStringgenerateInfoText()Generate data info textMeteoDataTypegetDataType()Get data typeList<Dimension>getDimensions()Get dimensionsStringgetFileName()Get file nameList<Attribute>getGlobalAttributes()Get global attributesdoublegetMissingValue()Get missing dataList<Variable>getPlottableVariables()Get plottable variablesProjectionInfogetProjectionInfo()Get projection infoLocalDateTimegetTime(int timeIdx)Get timeDimensiongetTimeDimension()Get time dimensionintgetTimeNum()Get time numberList<LocalDateTime>getTimes()Get timesdoublegetTimeValue(int timeIdx)Get time double valuestatic intgetTimeValue(LocalDateTime time, LocalDateTime baseDate, String tDelta)Get time valueList<Integer>getTimeValues(LocalDateTime baseDate, String tDelta)Get time values - Time delta values of base dateVariablegetVariable(String varName)Get variable by nameintgetVariableIndex(String varName)Get variable indexList<String>getVariableNames()Get variable namesintgetVariableNum()Get variable numberList<Variable>getVariables()Get variablesDimensiongetXDimension()Get x dimensionDimensiongetYDimension()Get y dimensionDimensiongetZDimension()Get z dimensionbooleanisGlobal()Get if is global databooleanisRadial()Get the data is Radial (Radar) or notabstract booleanisValidFile(RandomAccessFile raf)booleanisXReverse()Get if x reversedbooleanisYReverse()Get if y reversedabstract org.meteoinfo.ndarray.Arrayread(String varName)Read array dataabstract org.meteoinfo.ndarray.Arrayread(String varName, int[] origin, int[] size, int[] stride)Read array dataabstract voidreadDataInfo(String fileName)Read data infovoidreadDataInfo(String fileName, boolean keepOpen)Read data infoDimArrayreadDimArray(String varName)Read dimension array dataDimArrayreadDimArray(String varName, int[] origin, int[] size, int[] stride)Read dimension array dataDimArrayreadDimArray(String varName, List<org.meteoinfo.ndarray.Range> ranges)Read dimension array datavoidsetDataType(MeteoDataType value)Set data typevoidsetDimensions(List<Dimension> dims)Set dimensionsvoidsetFileName(String name)Set file namevoidsetGlobal(boolean value)Set if is global datavoidsetMissingValue(double value)Set missing datavoidsetProjectionInfo(ProjectionInfo value)Set projection infovoidsetTimeDimension(Dimension tDim)Set time dimensionvoidsetTimes(List<LocalDateTime> value)Set timesvoidsetVariables(List<Variable> value)Set variablesvoidsetXDimension(Dimension xDim)Set x dimensionvoidsetXReverse(boolean value)Set if x reversedvoidsetYDimension(Dimension yDim)Set y dimensionvoidsetYReverse(boolean value)Set if y reversedvoidsetZDimension(Dimension zDim)Set z dimension
-
-
-
字段详细资料
-
fileName
protected String fileName
-
tDim
protected Dimension tDim
-
xDim
protected Dimension xDim
-
yDim
protected Dimension yDim
-
zDim
protected Dimension zDim
-
xReverse
protected boolean xReverse
-
yReverse
protected boolean yReverse
-
isGlobal
protected boolean isGlobal
-
missingValue
protected double missingValue
-
projInfo
protected ProjectionInfo projInfo
-
meteoDataType
protected MeteoDataType meteoDataType
-
-
方法详细资料
-
getFileName
public String getFileName()
Get file name- 返回:
- File name
-
setFileName
public void setFileName(String name)
Set file name- 参数:
name- File name
-
getPlottableVariables
public List<Variable> getPlottableVariables()
Get plottable variables- 返回:
- Plottable variables
-
getVariableNum
public int getVariableNum()
Get variable number- 返回:
- Variable number
-
getTimes
public List<LocalDateTime> getTimes()
Get times- 返回:
- Times
-
getTime
public LocalDateTime getTime(int timeIdx)
Get time- 参数:
timeIdx- Time index- 返回:
- Time
-
getTimeValue
public double getTimeValue(int timeIdx)
Get time double value- 参数:
timeIdx- Time index- 返回:
- Time double value
-
getTimeValue
public static int getTimeValue(LocalDateTime time, LocalDateTime baseDate, String tDelta)
Get time value- 参数:
time- TimebaseDate- Base timetDelta- Delta time- 返回:
- Time value
-
getTimeValues
public List<Integer> getTimeValues(LocalDateTime baseDate, String tDelta)
Get time values - Time delta values of base date- 参数:
baseDate- Base datetDelta- Time delta type - days/hours/...- 返回:
- Time values
-
setTimes
public void setTimes(List<LocalDateTime> value)
Set times- 参数:
value- Times
-
getTimeNum
public int getTimeNum()
Get time number- 返回:
- Time number
-
getTimeDimension
public Dimension getTimeDimension()
Get time dimension- 返回:
- Time dimension
-
setTimeDimension
public void setTimeDimension(Dimension tDim)
Set time dimension- 参数:
tDim- Time dimension
-
getXDimension
public Dimension getXDimension()
Get x dimension- 返回:
- X dimension
-
setXDimension
public void setXDimension(Dimension xDim)
Set x dimension- 参数:
xDim- X dimension
-
getYDimension
public Dimension getYDimension()
Get y dimension- 返回:
- Y dimension
-
setYDimension
public void setYDimension(Dimension yDim)
Set y dimension- 参数:
yDim- Y dimension
-
getZDimension
public Dimension getZDimension()
Get z dimension- 返回:
- Z dimension
-
setZDimension
public void setZDimension(Dimension zDim)
Set z dimension- 参数:
zDim- Z dimension
-
isXReverse
public boolean isXReverse()
Get if x reversed- 返回:
- Boolean
-
setXReverse
public void setXReverse(boolean value)
Set if x reversed- 参数:
value- Boolean
-
isYReverse
public boolean isYReverse()
Get if y reversed- 返回:
- Boolean
-
setYReverse
public void setYReverse(boolean value)
Set if y reversed- 参数:
value- Boolean
-
isGlobal
public boolean isGlobal()
Get if is global data- 返回:
- Boolean
-
setGlobal
public void setGlobal(boolean value)
Set if is global data- 参数:
value-
-
getMissingValue
public double getMissingValue()
Get missing data- 返回:
- Missing data
-
setMissingValue
public void setMissingValue(double value)
Set missing data- 参数:
value- Missing data
-
getProjectionInfo
public ProjectionInfo getProjectionInfo()
Get projection info- 返回:
- Projection info
-
setProjectionInfo
public void setProjectionInfo(ProjectionInfo value)
Set projection info- 参数:
value- Projection info
-
getDataType
public MeteoDataType getDataType()
Get data type- 返回:
- The data type
-
setDataType
public void setDataType(MeteoDataType value)
Set data type- 参数:
value- The data type
-
isValidFile
public abstract boolean isValidFile(RandomAccessFile raf)
-
readDataInfo
public abstract void readDataInfo(String fileName)
Read data info- 参数:
fileName- File name
-
readDataInfo
public void readDataInfo(String fileName, boolean keepOpen)
Read data info- 参数:
fileName- File namekeepOpen- Keep file opened or not
-
generateInfoText
public String generateInfoText()
Generate data info text- 返回:
- Data info text
-
read
public abstract org.meteoinfo.ndarray.Array read(String varName)
Read array data- 参数:
varName- Variable name- 返回:
- Array
-
readDimArray
public DimArray readDimArray(String varName)
Read dimension array data- 参数:
varName- Variable name- 返回:
- Dimension array
-
read
public abstract org.meteoinfo.ndarray.Array read(String varName, int[] origin, int[] size, int[] stride)
Read array data- 参数:
varName- Variable nameorigin- Origin arraysize- Size arraystride- Stride array- 返回:
- Array
-
readDimArray
public DimArray readDimArray(String varName, int[] origin, int[] size, int[] stride)
Read dimension array data- 参数:
varName- Variable nameorigin- Origin arraysize- Size arraystride- Stride array- 返回:
- Dimension array
-
readDimArray
public DimArray readDimArray(String varName, List<org.meteoinfo.ndarray.Range> ranges)
Read dimension array data- 参数:
varName- Variable nameranges- Range list- 返回:
- Dimension array
-
getGlobalAttributes
public List<Attribute> getGlobalAttributes()
Get global attributes- 返回:
- Global attributes
-
getVariable
public Variable getVariable(String varName)
Get variable by name- 参数:
varName- Variable name- 返回:
- The variable
-
getVariableIndex
public int getVariableIndex(String varName)
Get variable index- 参数:
varName- Variable name- 返回:
- Variable index
-
addVariable
public void addVariable(Variable var)
Add a variable- 参数:
var- Variable
-
addDimension
public void addDimension(Dimension dim)
Add a dimension- 参数:
dim- Dimension
-
addAttribute
public void addAttribute(Attribute attr)
Add a global attribute- 参数:
attr- The attribute
-
findGlobalAttribute
public Attribute findGlobalAttribute(String attName)
Find global attribute- 参数:
attName- Attribute name- 返回:
- Global attribute
-
isRadial
public boolean isRadial()
Get the data is Radial (Radar) or not- 返回:
- Is Radial or not
-
-