public class OldUnidataStationObsDataset extends StationObsDatasetImpl implements TypedDatasetFactoryIF
Since there is no other way to find what the stations are, or to find what data belongs to what station, we read through the entire dataset at open. We construct the list of StationObsDatatype records, but without the data cached.
stationHelper, stationsformatter, timeUnitboundingBox, dataVariables, desc, endDate, location, ncfile, parseInfo, startDate, title| Constructor and Description |
|---|
OldUnidataStationObsDataset()
Deprecated.
|
OldUnidataStationObsDataset(NetcdfDataset ds)
Deprecated.
|
OldUnidataStationObsDataset(NetcdfDataset ds,
String ncmlURL)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
List |
getData(CancelTask cancel)
Deprecated.
Get all data, allow user to cancel.
|
List |
getData(LatLonRect boundingBox,
CancelTask cancel)
Deprecated.
Get all data within the specified bounding box, allow user to cancel.
|
List |
getData(LatLonRect boundingBox,
Date start,
Date end,
CancelTask cancel)
Deprecated.
Get all data within the specified bounding box and date range, allow user to cancel.
|
List |
getData(Station s,
CancelTask cancel)
Deprecated.
Get all data for this Station, allow user to cancel.
|
int |
getDataCount()
Deprecated.
Get estimate of number of data records (may not be exact).
|
DataIterator |
getDataIterator(int bufferSize)
Deprecated.
Get an efficient iterator over all the data in the Collection.
|
int |
getStationDataCount(Station s)
Deprecated.
How many Data objects are available for this Station?
|
protected void |
init(String ncmlURL)
Deprecated.
|
boolean |
isMine(NetcdfDataset ds)
Deprecated.
Determine if this dataset belongs to you
|
static boolean |
isValidFile(NetcdfFile ds)
Deprecated.
|
TypedDataset |
open(NetcdfDataset ncd,
CancelTask task,
StringBuilder errlog)
Deprecated.
Open a NetcdfDataset as a TypedDataset.
|
protected void |
setBoundingBox()
Deprecated.
|
protected void |
setEndDate()
Deprecated.
|
protected void |
setStartDate()
Deprecated.
|
protected void |
setTimeUnits()
Deprecated.
|
getData, getData, getData, getData, getData, getData, getData, getDataClass, getDataIterator, getDataIterator, getDetailInfo, getScientificDataType, getStation, getStations, getStations, getStations, getStations, sortByTimegetData, getData, getData, getMetersConversionFactor, 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, getTitlegetData, getData, getData, getTimeUnitspublic OldUnidataStationObsDataset()
public OldUnidataStationObsDataset(NetcdfDataset ds) throws IOException
IOExceptionpublic OldUnidataStationObsDataset(NetcdfDataset ds, String ncmlURL) throws IOException
IOExceptionpublic static boolean isValidFile(NetcdfFile ds)
public boolean isMine(NetcdfDataset ds)
TypedDatasetFactoryIFisMine in interface TypedDatasetFactoryIFds - examine this NetcdfDataset to see if it belongs to this class.public TypedDataset open(NetcdfDataset ncd, CancelTask task, StringBuilder errlog) throws IOException
TypedDatasetFactoryIFopen in interface TypedDatasetFactoryIFncd - already opened NetcdfDataset.task - use may cancelerrlog - place errors hereIOException - on errorprotected void init(String ncmlURL) throws IOException
IOExceptionprotected void setTimeUnits()
setTimeUnits in class PointObsDatasetImplprotected void setStartDate()
setStartDate in class TypedDatasetImplprotected void setEndDate()
setEndDate in class TypedDatasetImplprotected void setBoundingBox()
setBoundingBox in class TypedDatasetImplpublic List getData(CancelTask cancel) throws IOException
PointCollectiongetData in interface PointCollectioncancel - allow user to cancel. Implementors should return ASAP.IOException - on io erroras a (possibly) more efficient alternativepublic int getDataCount()
PointCollectiongetDataCount in interface PointCollectionpublic List getData(LatLonRect boundingBox, CancelTask cancel) throws IOException
PointCollectiongetData in interface PointCollectiongetData in class StationObsDatasetImplboundingBox - restrict data to this bounding noxcancel - allow user to cancel. Implementors should return ASAP.IOException - on io erroras a (possibly) more efficient alternativepublic List getData(LatLonRect boundingBox, Date start, Date end, CancelTask cancel) throws IOException
PointCollectiongetData in interface PointCollectiongetData in class StationObsDatasetImplboundingBox - 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.IOException - on io erroras a (possibly) more efficient alternativepublic int getStationDataCount(Station s)
StationCollectiongetStationDataCount in interface StationCollectiongetStationDataCount in class StationObsDatasetImpls - stationpublic List getData(Station s, CancelTask cancel) throws IOException
StationCollectiongetData in interface StationCollections - for this Stationcancel - allow user to cancel. Implementors should return ASAP.IOException - on io errorpublic DataIterator getDataIterator(int bufferSize) throws 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.IOException - on io errorCopyright © 1999–2015 UCAR/Unidata. All rights reserved.