public class DapperDataset extends PointObsDatasetImpl implements TypedDatasetFactoryIF
| Modifier and Type | Class and Description |
|---|---|
class |
DapperDataset.SeqPointObs |
class |
DapperDataset.SeqStationObs |
| Modifier and Type | Field and Description |
|---|---|
protected ucar.nc2.Variable |
altVar |
protected ucar.nc2.dods.DODSNetcdfFile |
dodsFile |
protected boolean |
fatal |
protected ucar.nc2.dataset.StructureDS |
innerSequence |
protected boolean |
isProfile |
protected ucar.nc2.Variable |
latVar |
protected ucar.nc2.Variable |
lonVar |
protected ucar.nc2.dataset.StructureDS |
outerSequence |
protected ucar.nc2.Variable |
timeVar |
formatter, timeUnitboundingBox, dataVariables, desc, endDate, location, netcdfDataset, parseInfo, startDate, title| Constructor and Description |
|---|
DapperDataset() |
DapperDataset(ucar.nc2.dataset.NetcdfDataset ds) |
| Modifier and Type | Method and Description |
|---|---|
static PointObsDataset |
factory(ucar.nc2.dataset.NetcdfDataset ds) |
java.util.List |
getData(ucar.nc2.util.CancelTask cancel)
Get all data, allow user to cancel.
|
java.util.List |
getData(ucar.unidata.geoloc.LatLonRect boundingBox,
ucar.nc2.util.CancelTask cancel)
Get all data within the specified bounding box, allow user to cancel.
|
java.util.List |
getData(ucar.unidata.geoloc.LatLonRect boundingBox,
java.util.Date start,
java.util.Date end,
ucar.nc2.util.CancelTask cancel)
Get all data within the specified bounding box and date range, allow user to cancel.
|
int |
getDataCount()
Get estimate of number of data records (may not be exact).
|
DataIterator |
getDataIterator(int bufferSize)
Get an efficient iterator over all the data in the Collection.
|
boolean |
isMine(ucar.nc2.dataset.NetcdfDataset ds)
Determine if this dataset belongs to you
|
static boolean |
isValidFile(ucar.nc2.NetcdfFile ds) |
static void |
main(java.lang.String[] args) |
TypedDataset |
open(ucar.nc2.dataset.NetcdfDataset ncd,
ucar.nc2.util.CancelTask task,
java.lang.StringBuilder errlog)
Open a NetcdfDataset as a TypedDataset.
|
java.util.List |
readStationData(ucar.unidata.geoloc.Station s,
ucar.nc2.util.CancelTask cancel) |
void |
readStations(java.util.List stations) |
protected void |
setBoundingBox() |
protected void |
setEndDate() |
protected void |
setStartDate() |
protected void |
setTimeUnits() |
getData, getData, getData, getDataClass, getDetailInfo, getMetersConversionFactor, getScientificDataType, getTime, getTimeUnitsclose, findGlobalAttributeIgnoreCase, getBoundingBox, getDataVariable, getDataVariables, getDescription, getEndDate, getGlobalAttributes, getLocation, getLocationURI, getNetcdfFile, getStartDate, getTitle, removeDataVariable, setDescription, setLocationURI, setTitleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetScientificDataTypeclose, findGlobalAttributeIgnoreCase, getBoundingBox, getDataVariable, getDataVariables, getDescription, getEndDate, getGlobalAttributes, getLocationURI, getNetcdfFile, getStartDate, getTitleprotected ucar.nc2.dods.DODSNetcdfFile dodsFile
protected ucar.nc2.Variable latVar
protected ucar.nc2.Variable lonVar
protected ucar.nc2.Variable altVar
protected ucar.nc2.Variable timeVar
protected ucar.nc2.dataset.StructureDS innerSequence
protected ucar.nc2.dataset.StructureDS outerSequence
protected boolean isProfile
protected boolean fatal
public DapperDataset()
public DapperDataset(ucar.nc2.dataset.NetcdfDataset ds)
throws java.io.IOException
java.io.IOExceptionpublic static boolean isValidFile(ucar.nc2.NetcdfFile ds)
public static PointObsDataset factory(ucar.nc2.dataset.NetcdfDataset ds) throws java.io.IOException
java.io.IOExceptionpublic boolean isMine(ucar.nc2.dataset.NetcdfDataset ds)
TypedDatasetFactoryIFisMine in interface TypedDatasetFactoryIFds - examine this NetcdfDataset to see if it belongs to this class.public TypedDataset open(ucar.nc2.dataset.NetcdfDataset ncd, ucar.nc2.util.CancelTask task, java.lang.StringBuilder errlog) throws java.io.IOException
TypedDatasetFactoryIFopen in interface TypedDatasetFactoryIFncd - already opened NetcdfDataset.task - use may cancelerrlog - place errors herejava.io.IOException - on errorprotected void setTimeUnits()
setTimeUnits in class PointObsDatasetImplprotected void setStartDate()
setStartDate in class TypedDatasetImplprotected void setEndDate()
setEndDate in class TypedDatasetImplprotected void setBoundingBox()
setBoundingBox in class TypedDatasetImplpublic int getDataCount()
PointCollectiongetDataCount in interface PointCollectionpublic java.util.List getData(ucar.nc2.util.CancelTask cancel)
throws java.io.IOException
PointCollectiongetData in interface PointCollectioncancel - allow user to cancel. Implementors should return ASAP.java.io.IOException - on io erroras a (possibly) more efficient alternativepublic java.util.List getData(ucar.unidata.geoloc.LatLonRect boundingBox,
ucar.nc2.util.CancelTask cancel)
throws java.io.IOException
PointCollectiongetData in interface PointCollectionboundingBox - restrict data to this bounding noxcancel - allow user to cancel. Implementors should return ASAP.java.io.IOException - on io erroras a (possibly) more efficient alternativepublic java.util.List getData(ucar.unidata.geoloc.LatLonRect boundingBox,
java.util.Date start,
java.util.Date end,
ucar.nc2.util.CancelTask cancel)
throws java.io.IOException
PointCollectiongetData in interface PointCollectionboundingBox - restrict data to this bounding noxstart - restrict data to after this timeend - restrict data to before this timecancel - allow user to cancel. Implementors should return ASAP.java.io.IOException - on io erroras a (possibly) more efficient alternativepublic void readStations(java.util.List stations)
throws java.io.IOException
java.io.IOExceptionpublic java.util.List readStationData(ucar.unidata.geoloc.Station s,
ucar.nc2.util.CancelTask cancel)
throws java.io.IOException
java.io.IOExceptionpublic DataIterator getDataIterator(int bufferSize) throws java.io.IOException
PointCollectionWe dont need a cancelTask, just stop the iteration if the user want to cancel.
Example for point observations:
Iterator iter = pointObsDataset.getDataIterator();
while (iter.hasNext()) {
PointObsDatatype pobs = (PointObsDatatype) iter.next();
StructureData sdata = pobs.getData();
// process fully
}
getDataIterator in interface PointCollectionbufferSize - if > 0, the internal buffer size, else use the default. Typically 100k - 1M for best results.java.io.IOException - on io errorpublic static void main(java.lang.String[] args)
throws java.io.IOException
java.io.IOException