Package ucar.nc2.dt
Interface PointCollection
-
- All Known Subinterfaces:
PointObsDataset
,StationCollection
,StationObsDataset
,StationRadialDataset
- All Known Implementing Classes:
CFstationObsDataset
,DapperDataset
,MadisPointObsDataset
,MadisStationObsDataset
,NdbcDataset
,OldUnidataPointObsDataset
,OldUnidataStationObsDataset
,PointObsDatasetImpl
,SequenceObsDataset
,StationObsDatasetImpl
,UnidataPointObsDataset
,UnidataStationObsDataset
,UnidataStationObsDataset2
,UnidataStationObsMultidimDataset
public interface PointCollection
Deprecated.A collection of data at unconnected locations. User can subset by bounding box and by date range. Underlying data can be of any type, but all points have the same type.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description List
getData()
Deprecated.Get all data.List
getData(CancelTask cancel)
Deprecated.Get all data, allow user to cancel.List
getData(LatLonRect boundingBox)
Deprecated.Get all data within the specified bounding box.List
getData(LatLonRect boundingBox, Date start, Date end)
Deprecated.Get all data within the specified bounding box and date range.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(LatLonRect boundingBox, CancelTask cancel)
Deprecated.Get all data within the specified bounding box, allow user to cancel.Class
getDataClass()
Deprecated.The getData() methods return objects of this Classint
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.DateUnit
getTimeUnits()
Deprecated.Get the units of Calendar time.
-
-
-
Method Detail
-
getDataClass
Class getDataClass()
Deprecated.The getData() methods return objects of this Class- Returns:
- Class of the data
-
getTimeUnits
DateUnit getTimeUnits()
Deprecated.Get the units of Calendar time. To get a Date, from a time value, call DateUnit.makeDate(double value). To get units as a String, call DateUnit.getUnitsString().- Returns:
- the units of Calendar time.
-
getData
List getData() throws IOException
Deprecated.Get all data. Return null if too expensive to implement. Call getDataCount() to get estimate of size. This will return a list of getDataClass(), but the actual data may or may not already be read in to memory. In any case, you call dataType.getData() to get the data.- Returns:
- List of type getDataClass()
- Throws:
IOException
- on io error- See Also:
as a (possibly) more efficient alternative
-
getData
List getData(CancelTask cancel) throws IOException
Deprecated.Get all data, allow user to cancel. Return null if too expensive to implement. Call getDataCount() to get estimate of size. This will return a list of getDataClass(), but the actual data may or may not already be read in to memory. In any case, you call dataType.getData() to get the data.- Parameters:
cancel
- allow user to cancel. Implementors should return ASAP.- Returns:
- List of type getDataClass()
- Throws:
IOException
- on io error- See Also:
as a (possibly) more efficient alternative
-
getDataCount
int getDataCount()
Deprecated.Get estimate of number of data records (may not be exact). Return -1 if not able to estimate.- Returns:
- number of data records or -1
-
getData
List getData(LatLonRect boundingBox) throws IOException
Deprecated.Get all data within the specified bounding box.- Parameters:
boundingBox
- restrict data to this bounding nox- Returns:
- List of type getDataClass()
- Throws:
IOException
- on io error- See Also:
as a (possibly) more efficient alternative
-
getData
List getData(LatLonRect boundingBox, CancelTask cancel) throws IOException
Deprecated.Get all data within the specified bounding box, allow user to cancel.- Parameters:
boundingBox
- restrict data to this bounding noxcancel
- allow user to cancel. Implementors should return ASAP.- Returns:
- List of type getDataClass()
- Throws:
IOException
- on io error- See Also:
as a (possibly) more efficient alternative
-
getData
List getData(LatLonRect boundingBox, Date start, Date end) throws IOException
Deprecated.Get all data within the specified bounding box and date range.- Parameters:
boundingBox
- restrict data to this bounding noxstart
- restrict data to after this timeend
- restrict data to before this time- Returns:
- List of type getDataClass()
- Throws:
IOException
- on io error- See Also:
as a (possibly) more efficient alternative
-
getData
List getData(LatLonRect boundingBox, Date start, Date end, CancelTask cancel) throws IOException
Deprecated.Get all data within the specified bounding box and date range, allow user to cancel.- Parameters:
boundingBox
- 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.- Returns:
- List of type getDataClass()
- Throws:
IOException
- on io error- See Also:
as a (possibly) more efficient alternative
-
getDataIterator
DataIterator getDataIterator(int bufferSize) throws IOException
Deprecated.Get an efficient iterator over all the data in the Collection. You must fully process the data, or copy it out of the StructureData, as you iterate over it. DO NOT KEEP ANY REFERENCES to the dataType object or the StructureData object. This is the efficient way to get all the data, it can be 100 times faster than getData(). This will return an iterator over type getDataClass(), and the actual data has already been read into memory, that is, dataType.getData() will not incur any I/O. This is accomplished by buffering bufferSize amount of data at once.We 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 }
- Parameters:
bufferSize
- if > 0, the internal buffer size, else use the default. Typically 100k - 1M for best results.- Returns:
- iterator over type getDataClass(), no guarenteed order.
- Throws:
IOException
- on io error
-
-