@Override public StructureData getFeatureData() throws IOException { return stnFeature.getFeatureData(); }
@Nonnull @Override public StructureData getFeatureData() throws IOException { return stnFeature.getFeatureData(); }
@Override protected StationHelper createStationHelper() throws IOException { TimedCollection.Dataset td = dataCollection.getPrototype(); if (td == null) throw new RuntimeException("No datasets in the collection"); Formatter errlog = new Formatter(); try (FeatureDatasetPoint openDataset = (FeatureDatasetPoint) FeatureDatasetFactoryManager.open( FeatureType.STATION, td.getLocation(), null, errlog)) { StationHelper stationHelper = new StationHelper(); List<FeatureCollection> fcList = openDataset.getPointFeatureCollectionList(); StationTimeSeriesCollectionImpl openCollection = (StationTimeSeriesCollectionImpl) fcList.get(0); List<Station> stns = openCollection.getStations(); for (Station s : stns) { StationTimeSeriesFeature stnFeature = openCollection.getStationFeature(s); stationHelper.addStation(new CompositeStationFeature(s, timeUnit, altUnits, stnFeature.getFeatureData(), this.dataCollection)); } dataVariables = openDataset.getDataVariables(); globalAttributes = openDataset.getGlobalAttributes(); return stationHelper; } }
assert pfc instanceof StationTimeSeriesFeatureImpl : pfc.getClass().getName(); StationTimeSeriesFeature s = (StationTimeSeriesFeature) pfc; StructureData sdata = s.getFeatureData(); StructureMembers.Member m = sdata.findMember("stnInfo"); assert m != null : "missing stnInfo";