|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectucar.nc2.ft.point.OneNestedPointCollectionImpl
ucar.nc2.ft.point.StationTimeSeriesCollectionImpl
public abstract class StationTimeSeriesCollectionImpl
Abstract superclass for implementations of StationFeatureCollection. Subclass must supply initStationHelper, may need to override getPointFeatureCollectionIterator().
| Field Summary | |
|---|---|
protected PointFeatureCollectionIterator |
localIterator
|
protected StationHelper |
stationHelper
|
| Fields inherited from class ucar.nc2.ft.point.OneNestedPointCollectionImpl |
|---|
npts |
| Constructor Summary | |
|---|---|
StationTimeSeriesCollectionImpl(String name)
|
|
| Method Summary | |
|---|---|
void |
finish()
Make sure that the internal iterator is complete, and recover resources. |
PointFeatureCollection |
flatten(LatLonRect boundingBox,
DateRange dateRange)
Flatten into a PointFeatureCollection, discarding connectedness information. |
PointFeatureCollection |
flatten(List<String> stations,
DateRange dateRange,
List<VariableSimpleIF> varList)
Flatten into a PointFeatureCollection, discarding connectedness information. |
LatLonRect |
getBoundingBox()
Get the bounding box including all the stations. |
NestedPointFeatureCollectionIterator |
getNestedPointFeatureCollectionIterator(int bufferSize)
Iterate through the collection, composed of NestedPointFeatureCollection. |
PointFeatureCollectionIterator |
getPointFeatureCollectionIterator(int bufferSize)
Iterate through the collection, composed of PointFeatureCollection. |
Station |
getStation(PointFeature feature)
Get the station that belongs to this feature |
Station |
getStation(String name)
Find a Station by name. |
StationTimeSeriesFeature |
getStationFeature(Station s)
Get the collection of data for a particular Station. |
List<Station> |
getStations()
Get all the Stations in the collection. |
List<Station> |
getStations(LatLonRect boundingBox)
Get all the Stations within a bounding box. |
List<Station> |
getStations(List<String> stnNames)
Translate list of station names to list of Stations. |
boolean |
hasNext()
Use the internal iterator to check if there is another StationTimeSeriesFeature in the iteration. |
protected abstract void |
initStationHelper()
|
StationTimeSeriesFeature |
next()
Use the internal iterator to get the next StationTimeSeriesFeature in the iteration. |
void |
resetIteration()
Reset the internal iterator for another iteration over the StationTimeSeriesFeatures in this Collection. |
StationTimeSeriesFeatureCollection |
subset(LatLonRect boundingBox)
Get a subsetted StationCollection from a LatLonRect |
StationTimeSeriesFeatureCollection |
subset(List<Station> stations)
Get a subsetted StationCollection based on a list of Stations. |
| Methods inherited from class ucar.nc2.ft.point.OneNestedPointCollectionImpl |
|---|
getCollectionFeatureType, getName, isMultipleNested, setSize, size |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface ucar.nc2.ft.NestedPointFeatureCollection |
|---|
isMultipleNested, size |
| Methods inherited from interface ucar.nc2.ft.FeatureCollection |
|---|
getCollectionFeatureType, getName |
| Field Detail |
|---|
protected StationHelper stationHelper
protected PointFeatureCollectionIterator localIterator
| Constructor Detail |
|---|
public StationTimeSeriesCollectionImpl(String name)
| Method Detail |
|---|
protected abstract void initStationHelper()
public PointFeatureCollectionIterator getPointFeatureCollectionIterator(int bufferSize)
throws IOException
NestedPointFeatureCollection
getPointFeatureCollectionIterator in interface NestedPointFeatureCollectionbufferSize - how many bytes can be used to buffer data, use -1 to use default.
IOException - on read error
public StationTimeSeriesFeature getStationFeature(Station s)
throws IOException
StationTimeSeriesFeatureCollection
getStationFeature in interface StationTimeSeriesFeatureCollections - get data for this station, must have come from this Collection
IOException - on i/o error
public Station getStation(PointFeature feature)
throws IOException
StationTimeSeriesFeatureCollection
getStation in interface StationTimeSeriesFeatureCollectionfeature - PointFeature obtained from a StationTimeSeriesFeature in this collection
IOException - on i/o error
public StationTimeSeriesFeatureCollection subset(LatLonRect boundingBox)
throws IOException
StationTimeSeriesFeatureCollection
subset in interface NestedPointFeatureCollectionsubset in interface StationTimeSeriesFeatureCollectionboundingBox - spatial subset. may be null
IOException - on i/o error
public StationTimeSeriesFeatureCollection subset(List<Station> stations)
throws IOException
StationTimeSeriesFeatureCollection
subset in interface StationTimeSeriesFeatureCollectionstations - only contain these stations
IOException - on i/o error
public PointFeatureCollection flatten(List<String> stations,
DateRange dateRange,
List<VariableSimpleIF> varList)
throws IOException
StationTimeSeriesFeatureCollection
flatten in interface StationTimeSeriesFeatureCollectionstations - only contain these stations; if null or empty use alldateRange - only points in this date range. may be null.varList - only these member variables. may be null. currently ignored
IOException - on read error
public PointFeatureCollection flatten(LatLonRect boundingBox,
DateRange dateRange)
throws IOException
NestedPointFeatureCollection
flatten in interface NestedPointFeatureCollectionflatten in class OneNestedPointCollectionImplboundingBox - only points in this lat/lon bounding box. may be null.dateRange - only points in this date range. may be null.
IOException - on read errorpublic List<Station> getStations()
StationCollection
getStations in interface StationCollectionpublic List<Station> getStations(List<String> stnNames)
StationCollection
getStations in interface StationCollectionstnNames - list of stnNames
public List<Station> getStations(LatLonRect boundingBox)
throws IOException
StationCollection
getStations in interface StationCollectionboundingBox - spatial subset
IOException - on i/o errorpublic Station getStation(String name)
StationCollection
getStation in interface StationCollectionname - name/id of the station
public LatLonRect getBoundingBox()
StationCollection
getBoundingBox in interface StationCollection
public NestedPointFeatureCollectionIterator getNestedPointFeatureCollectionIterator(int bufferSize)
throws IOException
NestedPointFeatureCollection
getNestedPointFeatureCollectionIterator in interface NestedPointFeatureCollectiongetNestedPointFeatureCollectionIterator in class OneNestedPointCollectionImplbufferSize - how many bytes can be used to buffer data, use -1 to use default.
IOException - on read error
public boolean hasNext()
throws IOException
StationTimeSeriesFeatureCollection
hasNext in interface StationTimeSeriesFeatureCollectionIOException - on read errorpublic void finish()
StationTimeSeriesFeatureCollection
finish in interface StationTimeSeriesFeatureCollectionPointFeatureIterator.finish()
public StationTimeSeriesFeature next()
throws IOException
StationTimeSeriesFeatureCollection
next in interface StationTimeSeriesFeatureCollectionIOException - on read error
public void resetIteration()
throws IOException
StationTimeSeriesFeatureCollection
resetIteration in interface StationTimeSeriesFeatureCollectionIOException - on read error
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||