public PointFeatureIterator getPointFeatureIterator(int bufferSize) throws IOException { // only one Cursor object needed - it will be used for each iteration with different structData's Cursor tableData = new Cursor(ft.getNumberOfLevels()); PointFeatureIterator iter = new StandardPointFeatureIterator( ft, timeUnit, ft.getObsDataIterator(tableData, bufferSize), tableData); if ((boundingBox == null) || (dateRange == null) || (npts < 0)) iter.setCalculateBounds(this); return iter; }
public PointFeatureIterator getPointFeatureIterator(int bufferSize) throws IOException { // only one Cursor object needed - it will be used for each iteration with different structData's Cursor tableData = new Cursor(ft.getNumberOfLevels()); PointFeatureIterator iter = new StandardPointFeatureIterator( ft, timeUnit, ft.getObsDataIterator(tableData, bufferSize), tableData); if ((boundingBox == null) || (dateRange == null) || (npts < 0)) iter.setCalculateBounds(this); return iter; }
private PointFeatureIterator getNextIterator() throws IOException { if (!iter.hasNext()) return null; TimedCollection.Dataset td = iter.next(); Formatter errlog = new Formatter(); // open the next dataset currentDataset = (FeatureDatasetPoint) FeatureDatasetFactoryManager.open(FeatureType.STATION, td.getLocation(), null, errlog); if (currentDataset == null) { logger.error("FeatureDatasetFactoryManager failed to open: " + td.getLocation() + " \nerrlog = " + errlog); return getNextIterator(); } if (CompositeDatasetFactory.debug) System.out.printf("CompositeStationCollectionFlattened.Iterator open new dataset: %s%n", td.getLocation()); // it will have a StationTimeSeriesFeatureCollection List<FeatureCollection> fcList = currentDataset.getPointFeatureCollectionList(); StationTimeSeriesFeatureCollection stnCollection = (StationTimeSeriesFeatureCollection) fcList.get(0); PointFeatureCollection pc = null; if (wantStationsubset) pc = stnCollection.flatten(stationsSubset, dateRange, varList); else pc = stnCollection.flatten(bbSubset, dateRange); PointFeatureIterator result = pc.getPointFeatureIterator(bufferSize); if (calcBounds) result.setCalculateBounds(pc); // LOOK barf return result; }
public void calcBounds() throws java.io.IOException { if ((dateRange != null) && (boundingBox != null) && (size() > 0)) return; PointFeatureIterator iter = getPointFeatureIterator(-1); iter.setCalculateBounds(this); try { while (iter.hasNext()) iter.next(); } finally { iter.finish(); } }
public void calcBounds() throws java.io.IOException { if ((dateRange != null) && (boundingBox != null) && (size() > 0)) return; PointFeatureIterator iter = getPointFeatureIterator(-1); iter.setCalculateBounds(this); try { while (iter.hasNext()) iter.next(); } finally { iter.finish(); } }
PointStreamProto.PointFeatureCollection pfc = PointStreamProto.PointFeatureCollection.parseFrom(b); PointFeatureIterator iter = new RemotePointFeatureIterator(in, new PointStream.ProtobufPointFeatureMaker(pfc)); iter.setCalculateBounds(this); return iter;
PointStreamProto.PointFeatureCollection pfc = PointStreamProto.PointFeatureCollection.parseFrom(b); PointFeatureIterator iter = new RemotePointFeatureIterator(in, new PointStream.ProtobufPointFeatureMaker(pfc)); iter.setCalculateBounds(this); return iter;