public class RecordDatasetHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected double |
altScaleFactor |
protected LatLonRect |
boundingBox |
protected java.util.Formatter |
errs |
protected java.lang.String |
latVName |
protected java.lang.String |
lonVName |
protected double |
maxDate |
protected double |
minDate |
protected NetcdfDataset |
ncfile |
protected java.lang.String |
nomTimeVName |
protected Dimension |
obsDim |
protected java.lang.String |
obsTimeVName |
protected StructureDS |
recordVar |
protected boolean |
showErrors |
protected StationHelper |
stationHelper |
protected DataType |
stationIdType |
protected java.lang.String |
stnDescVName |
protected java.lang.String |
stnIdVName |
protected java.lang.String |
stnIndexVName |
protected DateUnit |
timeUnit |
protected java.lang.String |
zcoordUnits |
protected java.lang.String |
zcoordVName |
Constructor and Description |
---|
RecordDatasetHelper(NetcdfDataset ncfile,
java.lang.String obsTimeVName,
java.lang.String nomTimeVName,
java.util.List<VariableSimpleIF> typedDataVariables,
java.lang.String recDimName,
java.util.Formatter errBuffer)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
PointFeature |
factory(StationImpl s,
StructureData sdata,
int recno) |
double |
getLatitude(StructureData sdata) |
LatLonPoint |
getLocation(StructureData sdata) |
double |
getLongitude(StructureData sdata) |
protected static double |
getMetersConversionFactor(java.lang.String unitsString) |
double |
getObservationTime(StructureData sdata) |
java.util.Date |
getObservationTimeAsDate(StructureData sdata) |
int |
getRecordCount() |
Structure |
getRecordVar() |
DateUnit |
getTimeUnit() |
double |
getZcoordinate(StructureData sdata) |
java.lang.String |
getZcoordUnits() |
void |
setLocationInfo(java.lang.String latVName,
java.lang.String lonVName,
java.lang.String zcoordVName) |
void |
setShortNames(java.lang.String latVName,
java.lang.String lonVName,
java.lang.String altVName,
java.lang.String obsTimeVName,
java.lang.String nomTimeVName) |
void |
setStationInfo(java.lang.String stnIdVName,
java.lang.String stnDescVName,
java.lang.String stnIndexVName,
StationHelper stationHelper)
Set extra information used by station obs datasets.
|
void |
setTimeUnit(DateUnit timeUnit) |
protected NetcdfDataset ncfile
protected java.lang.String obsTimeVName
protected java.lang.String nomTimeVName
protected java.lang.String latVName
protected java.lang.String lonVName
protected java.lang.String zcoordVName
protected java.lang.String zcoordUnits
protected java.lang.String stnIdVName
protected java.lang.String stnIndexVName
protected java.lang.String stnDescVName
protected StationHelper stationHelper
protected DataType stationIdType
protected StructureDS recordVar
protected Dimension obsDim
protected LatLonRect boundingBox
protected double minDate
protected double maxDate
protected DateUnit timeUnit
protected double altScaleFactor
protected java.util.Formatter errs
protected boolean showErrors
public RecordDatasetHelper(NetcdfDataset ncfile, java.lang.String obsTimeVName, java.lang.String nomTimeVName, java.util.List<VariableSimpleIF> typedDataVariables, java.lang.String recDimName, java.util.Formatter errBuffer)
ncfile
- the netccdf filetypedDataVariables
- list of data variables; all record variables will be added to this list, except . You
can remove extraobsTimeVName
- observation time variable name (required)nomTimeVName
- nominal time variable name (may be null)java.lang.IllegalArgumentException
- if ncfile has no unlimited dimension and recDimName is null.public void setStationInfo(java.lang.String stnIdVName, java.lang.String stnDescVName, java.lang.String stnIndexVName, StationHelper stationHelper)
stnIdVName
- the obs variable that is used to find the station in the stnHash; may be type int or a String (char).stnDescVName
- optional station var containing station descriptionpublic void setLocationInfo(java.lang.String latVName, java.lang.String lonVName, java.lang.String zcoordVName)
public void setShortNames(java.lang.String latVName, java.lang.String lonVName, java.lang.String altVName, java.lang.String obsTimeVName, java.lang.String nomTimeVName)
protected static double getMetersConversionFactor(java.lang.String unitsString) throws java.lang.Exception
java.lang.Exception
public Structure getRecordVar()
public int getRecordCount()
public void setTimeUnit(DateUnit timeUnit)
public DateUnit getTimeUnit()
public LatLonPoint getLocation(StructureData sdata)
public double getLatitude(StructureData sdata)
public double getLongitude(StructureData sdata)
public double getZcoordinate(StructureData sdata)
public java.lang.String getZcoordUnits()
public java.util.Date getObservationTimeAsDate(StructureData sdata)
public double getObservationTime(StructureData sdata)
public PointFeature factory(StationImpl s, StructureData sdata, int recno)