ucar.nc2.ft.point.remote
Class RemoteStationCollection

java.lang.Object
  extended by ucar.nc2.ft.point.OneNestedPointCollectionImpl
      extended by ucar.nc2.ft.point.StationTimeSeriesCollectionImpl
          extended by ucar.nc2.ft.point.remote.RemoteStationCollection
All Implemented Interfaces:
FeatureCollection, NestedPointFeatureCollection, StationCollection, StationTimeSeriesFeatureCollection

public class RemoteStationCollection
extends StationTimeSeriesCollectionImpl

Connect to remote Station Collection

Author:
caron

Field Summary
protected  LatLonRect boundingBox
           
protected  DateRange dateRange
           
 
Fields inherited from class ucar.nc2.ft.point.StationTimeSeriesCollectionImpl
localIterator, stationHelper
 
Fields inherited from class ucar.nc2.ft.point.OneNestedPointCollectionImpl
npts
 
Constructor Summary
  RemoteStationCollection(java.lang.String name, NcStreamRemote ncremote)
           
protected RemoteStationCollection(java.lang.String name, NcStreamRemote ncremote, StationHelper sh)
           
 
Method Summary
 PointFeatureCollection flatten(LatLonRect boundingBox, DateRange dateRange)
          Flatten into a PointFeatureCollection, discarding connectedness information.
 PointFeatureCollectionIterator getPointFeatureCollectionIterator(int bufferSize)
          Iterate through the collection, composed of PointFeatureCollection.
 StationTimeSeriesFeature getStationFeature(Station s)
          Get the collection of data for a particular Station.
 StationTimeSeriesFeatureCollection subset(LatLonRect boundingBox)
          Get a subsetted StationCollection based on a LatLonRect
 StationTimeSeriesFeatureCollection subset(java.util.List<Station> stations)
          Get a subsetted StationCollection based on a list of Stations.
 
Methods inherited from class ucar.nc2.ft.point.StationTimeSeriesCollectionImpl
getBoundingBox, getNestedPointFeatureCollectionIterator, getStation, getStations, getStations, getStations, hasNext, next, resetIteration
 
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

boundingBox

protected LatLonRect boundingBox

dateRange

protected DateRange dateRange
Constructor Detail

RemoteStationCollection

public RemoteStationCollection(java.lang.String name,
                               NcStreamRemote ncremote)
                        throws java.io.IOException
Throws:
java.io.IOException

RemoteStationCollection

protected RemoteStationCollection(java.lang.String name,
                                  NcStreamRemote ncremote,
                                  StationHelper sh)
                           throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getPointFeatureCollectionIterator

public PointFeatureCollectionIterator getPointFeatureCollectionIterator(int bufferSize)
                                                                 throws java.io.IOException
Description copied from interface: NestedPointFeatureCollection
Iterate through the collection, composed of PointFeatureCollection. Use this only if isMultipleNested() = false.

Parameters:
bufferSize - how many bytes can be used to buffer data, use -1 to use default.
Returns:
an iterator through PointFeatureCollection objects.
Throws:
java.io.IOException - on read error

subset

public StationTimeSeriesFeatureCollection subset(java.util.List<Station> stations)
                                          throws java.io.IOException
Description copied from interface: StationTimeSeriesFeatureCollection
Get a subsetted StationCollection based on a list of Stations.

Specified by:
subset in interface StationTimeSeriesFeatureCollection
Overrides:
subset in class StationTimeSeriesCollectionImpl
Parameters:
stations - only contain these stations
Returns:
subsetted collection
Throws:
java.io.IOException - on i/o error

subset

public StationTimeSeriesFeatureCollection subset(LatLonRect boundingBox)
                                          throws java.io.IOException
Description copied from interface: StationTimeSeriesFeatureCollection
Get a subsetted StationCollection based on a LatLonRect

Specified by:
subset in interface NestedPointFeatureCollection
Specified by:
subset in interface StationTimeSeriesFeatureCollection
Overrides:
subset in class StationTimeSeriesCollectionImpl
Parameters:
boundingBox - spatial subset
Returns:
subsetted collection
Throws:
java.io.IOException - on i/o error

getStationFeature

public StationTimeSeriesFeature getStationFeature(Station s)
                                           throws java.io.IOException
Description copied from interface: StationTimeSeriesFeatureCollection
Get the collection of data for a particular Station.

Specified by:
getStationFeature in interface StationTimeSeriesFeatureCollection
Overrides:
getStationFeature in class StationTimeSeriesCollectionImpl
Parameters:
s - get data for this station, must have come from
Returns:
collection of data for this Station.
Throws:
java.io.IOException - on i/o error

flatten

public PointFeatureCollection flatten(LatLonRect boundingBox,
                                      DateRange dateRange)
                               throws java.io.IOException
Description copied from interface: NestedPointFeatureCollection
Flatten into a PointFeatureCollection, discarding connectedness information. Optionally subset.

Specified by:
flatten in interface NestedPointFeatureCollection
Overrides:
flatten in class OneNestedPointCollectionImpl
Parameters:
boundingBox - only points in this lat/lon bounding box. may be null.
dateRange - only points in this date range. may be null.
Returns:
a PointFeatureCollection, may be null if its empty.
Throws:
java.io.IOException - on read error