public abstract class StationTimeSeriesCollectionImpl extends OneNestedPointCollectionImpl implements StationTimeSeriesFeatureCollection
| Modifier and Type | Field and Description |
|---|---|
protected PointFeatureCollectionIterator |
localIterator |
altUnits, collectionFeatureType, extras, name, npts, timeUnit| Constructor and Description |
|---|
StationTimeSeriesCollectionImpl(java.lang.String name,
DateUnit timeUnit,
java.lang.String altUnits) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract StationHelper |
createStationHelper() |
void |
finish()
Make sure that the internal iterator is complete, and recover resources.
|
PointFeatureCollection |
flatten(LatLonRect boundingBox,
CalendarDateRange dateRange)
Flatten into a PointFeatureCollection, discarding connectedness information.
|
PointFeatureCollection |
flatten(java.util.List<java.lang.String> stationNames,
CalendarDateRange dateRange,
java.util.List<VariableSimpleIF> varList)
Flatten into a PointFeatureCollection, discarding connectedness information.
|
PointFeatureCollection |
flatten(java.util.List<java.lang.String> stations,
DateRange dateRange,
java.util.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(java.lang.String name)
Find a Station by name.
|
StationTimeSeriesFeature |
getStationFeature(Station s)
Get the collection of data for a particular Station.
|
java.util.List<StationFeature> |
getStationFeatures()
Get list of stations as StationFeatures
|
java.util.List<StationFeature> |
getStationFeatures(LatLonRect boundingBox) |
java.util.List<StationFeature> |
getStationFeatures(java.util.List<java.lang.String> stnNames) |
protected StationHelper |
getStationHelper() |
java.util.List<Station> |
getStations()
Get all the Stations in the collection.
|
java.util.List<Station> |
getStations(LatLonRect boundingBox)
Get all the Stations within a bounding box.
|
java.util.List<Station> |
getStations(java.util.List<java.lang.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.
|
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(java.util.List<Station> stations)
Get a subsetted StationCollection based on a list of Stations.
|
StationTimeSeriesFeatureCollection |
subsetFeatures(java.util.List<StationFeature> stationsFeatures)
Get a subsetted StationCollection based on a list of Stations.
|
flatten, getAltUnits, getCollectionFeatureType, getExtraVariables, getName, getTimeUnit, isMultipleNested, setSize, sizeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitflatten, getAltUnits, getExtraVariables, getTimeUnit, isMultipleNested, sizegetCollectionFeatureType, getNameprotected PointFeatureCollectionIterator localIterator
public StationTimeSeriesCollectionImpl(java.lang.String name,
DateUnit timeUnit,
java.lang.String altUnits)
protected StationHelper getStationHelper()
protected abstract StationHelper createStationHelper() throws java.io.IOException
java.io.IOExceptionpublic PointFeatureCollectionIterator getPointFeatureCollectionIterator(int bufferSize) throws java.io.IOException
NestedPointFeatureCollectiongetPointFeatureCollectionIterator in interface NestedPointFeatureCollectionbufferSize - how many bytes can be used to buffer data, use -1 to use default.java.io.IOException - on read errorpublic StationTimeSeriesFeature getStationFeature(Station s) throws java.io.IOException
StationTimeSeriesFeatureCollectiongetStationFeature in interface StationTimeSeriesFeatureCollections - get data for this station, must have come from this Collectionjava.io.IOException - on i/o errorpublic Station getStation(PointFeature feature) throws java.io.IOException
StationTimeSeriesFeatureCollectiongetStation in interface StationTimeSeriesFeatureCollectionfeature - PointFeature obtained from a StationTimeSeriesFeature in this collectionjava.io.IOException - on i/o errorpublic java.util.List<StationFeature> getStationFeatures() throws java.io.IOException
StationTimeSeriesFeatureCollectiongetStationFeatures in interface StationTimeSeriesFeatureCollectionjava.io.IOException - on i/o errorpublic java.util.List<StationFeature> getStationFeatures(java.util.List<java.lang.String> stnNames)
getStationFeatures in interface StationTimeSeriesFeatureCollectionpublic java.util.List<StationFeature> getStationFeatures(LatLonRect boundingBox) throws java.io.IOException
getStationFeatures in interface StationTimeSeriesFeatureCollectionjava.io.IOExceptionpublic StationTimeSeriesFeatureCollection subset(LatLonRect boundingBox) throws java.io.IOException
StationTimeSeriesFeatureCollectionsubset in interface NestedPointFeatureCollectionsubset in interface StationTimeSeriesFeatureCollectionboundingBox - spatial subset. may be nulljava.io.IOException - on i/o errorpublic StationTimeSeriesFeatureCollection subset(java.util.List<Station> stations) throws java.io.IOException
StationTimeSeriesFeatureCollectionsubset in interface StationTimeSeriesFeatureCollectionstations - only contain these stationsjava.io.IOException - on i/o errorpublic StationTimeSeriesFeatureCollection subsetFeatures(java.util.List<StationFeature> stationsFeatures) throws java.io.IOException
StationTimeSeriesFeatureCollectionsubsetFeatures in interface StationTimeSeriesFeatureCollectionstationsFeatures - only contain these stationsjava.io.IOException - on i/o errorpublic PointFeatureCollection flatten(java.util.List<java.lang.String> stationNames, CalendarDateRange dateRange, java.util.List<VariableSimpleIF> varList) throws java.io.IOException
StationTimeSeriesFeatureCollectionflatten in interface StationTimeSeriesFeatureCollectionstationNames - 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 ignoredjava.io.IOException - on read errorpublic PointFeatureCollection flatten(LatLonRect boundingBox, CalendarDateRange dateRange) throws java.io.IOException
NestedPointFeatureCollectionflatten 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.java.io.IOException - on read errorpublic PointFeatureCollection flatten(java.util.List<java.lang.String> stations, DateRange dateRange, java.util.List<VariableSimpleIF> varList) throws java.io.IOException
StationTimeSeriesFeatureCollectionflatten 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 ignoredjava.io.IOException - on read errorpublic java.util.List<Station> getStations()
StationCollectiongetStations in interface StationCollectionpublic java.util.List<Station> getStations(java.util.List<java.lang.String> stnNames)
StationCollectiongetStations in interface StationCollectionstnNames - list of stnNamespublic java.util.List<Station> getStations(LatLonRect boundingBox) throws java.io.IOException
StationCollectiongetStations in interface StationCollectionboundingBox - spatial subsetjava.io.IOException - on i/o errorpublic Station getStation(java.lang.String name)
StationCollectiongetStation in interface StationCollectionname - name/id of the stationpublic LatLonRect getBoundingBox()
StationCollectiongetBoundingBox in interface StationCollectionpublic NestedPointFeatureCollectionIterator getNestedPointFeatureCollectionIterator(int bufferSize) throws java.io.IOException
NestedPointFeatureCollectiongetNestedPointFeatureCollectionIterator in interface NestedPointFeatureCollectiongetNestedPointFeatureCollectionIterator in class OneNestedPointCollectionImplbufferSize - how many bytes can be used to buffer data, use -1 to use default.java.io.IOException - on read errorpublic boolean hasNext()
throws java.io.IOException
StationTimeSeriesFeatureCollectionhasNext in interface StationTimeSeriesFeatureCollectionjava.io.IOException - on read errorpublic void finish()
StationTimeSeriesFeatureCollectionfinish in interface StationTimeSeriesFeatureCollectionPointFeatureIterator.finish()public StationTimeSeriesFeature next() throws java.io.IOException
StationTimeSeriesFeatureCollectionnext in interface StationTimeSeriesFeatureCollectionjava.io.IOException - on read errorpublic void resetIteration()
throws java.io.IOException
StationTimeSeriesFeatureCollectionresetIteration in interface StationTimeSeriesFeatureCollectionjava.io.IOException - on read error