@Override public PointFeatureCollectionIterator getPointFeatureCollectionIterator(int bufferSize) throws IOException { // an anonymous class iterating over the stations return new PointFeatureCollectionIterator() { Iterator<Station> stationIter = stationHelper.getStations().iterator(); public boolean hasNext() throws IOException { return stationIter.hasNext(); } public PointFeatureCollection next() throws IOException { return (PointFeatureCollection) stationIter.next(); } public void setBufferSize(int bytes) { } public void finish() { } }; }
@Override public List<Station> getStations() { return getStationHelper().getStations(); }
public List<Station> getStations() { if (stationHelper == null) initStationHelper(); return stationHelper.getStations(); }
public List<Station> getStations(List<String> stnNames) { if (stationHelper == null) initStationHelper(); return stationHelper.getStations(stnNames); }
@Override public List<Station> getStations(LatLonRect boundingBox) throws IOException { return getStationHelper().getStations(boundingBox); }
public List<Station> getStations(LatLonRect boundingBox) throws IOException { if (stationHelper == null) initStationHelper(); return stationHelper.getStations(boundingBox); }
public List<Station> getStations(List<String> stnNames) { if (stationHelper == null) initStationHelper(); return stationHelper.getStations(stnNames); }
@Override public List<Station> getStations(List<String> stnNames) { return getStationHelper().getStations(stnNames); }
public List<Station> getStations(LatLonRect boundingBox) throws IOException { return getStationHelper().getStations(boundingBox); }
public List<Station> getStations() { if (stationHelper == null) initStationHelper(); return stationHelper.getStations(); }
public List<Station> getStations(LatLonRect boundingBox) throws IOException { if (stationHelper == null) initStationHelper(); return stationHelper.getStations(boundingBox); }
public List<Station> getStations() { return getStationHelper().getStations(); }
public String makeQuery() { StringBuilder query = new StringBuilder("stns="); for (Station s : stationHelper.getStations()) { query.append(s.getName()); query.append(","); } return PointDatasetRemote.makeQuery(query.toString(), boundingBoxSubset, dateRangeSubset); } }
@Override public String makeQuery() { StringBuilder query = new StringBuilder("stns="); for (Station s : getStationHelper().getStations()) { query.append(s.getName()); query.append(","); } return PointDatasetRemote.makeQuery(query.toString(), boundingBoxSubset, dateRangeSubset); } }
@Override public StationTimeSeriesFeatureCollection subset(ucar.unidata.geoloc.LatLonRect boundingBox) throws IOException { if (boundingBox == null) return this; List<Station> stations = stationHelper.getStations(boundingBox); return new CompositeStationCollection(getName(), dataCollection, stations, dataVariables); }
@Override protected void initStationHelper() { from.initStationHelper(); this.stationHelper = new StationHelper(); try { this.stationHelper.setStations(this.stationHelper.getStations(boundingBoxSubset)); } catch (IOException e) { throw new RuntimeException(e); } }
public List<Station> getStations(LatLonRect boundingBox) throws IOException { if (boundingBox == null) return getStations(); LatLonPointImpl latlonPt = new LatLonPointImpl(); List<Station> result = new ArrayList<>(); for (StationFeature s : stations) { latlonPt.set(s.getLatitude(), s.getLongitude()); if (boundingBox.contains(latlonPt)) result.add(s); } return result; }
public List<Station> getStations(LatLonRect boundingBox) throws IOException { if (boundingBox == null) return getStations(); LatLonPointImpl latlonPt = new LatLonPointImpl(); List<Station> result = new ArrayList<>(); for (StationFeature s : stations) { latlonPt.set(s.getLatitude(), s.getLongitude()); if (boundingBox.contains(latlonPt)) result.add(s); } return result; }
public PointFeatureCollection flatten(List<String> stations, CalendarDateRange dateRange, List<VariableSimpleIF> varList) throws IOException { if ((stations == null) || (stations.size() == 0)) return new StationTimeSeriesCollectionFlattened(this, dateRange); initStationHelper(); List<Station> subsetStations = stationHelper.getStations(stations); return new StationTimeSeriesCollectionFlattened(new StationTimeSeriesCollectionSubset(this, subsetStations), dateRange); }
public PointFeatureCollection flatten(LatLonRect boundingBox, CalendarDateRange dateRange) throws IOException { if (boundingBox == null) return new StationTimeSeriesCollectionFlattened(this, dateRange); initStationHelper(); List<Station> subsetStations = stationHelper.getStations(boundingBox); return new StationTimeSeriesCollectionFlattened(new StationTimeSeriesCollectionSubset(this, subsetStations), dateRange); }