}
public void calcBounds() throws java.io.IOException {
if ((boundingBox != null) && (dateRange != null)) return;
LatLonRect bb = null;
DateRange dates = null;
for (FeatureCollection fc : collectionList) {
if (fc instanceof PointFeatureCollection) {
PointFeatureCollection pfc = (PointFeatureCollection) fc;
pfc.calcBounds();
if (bb == null)
bb = pfc.getBoundingBox();
else
bb.extend(pfc.getBoundingBox());
if (dates == null)
dates = pfc.getDateRange();
else
dates.extend(pfc.getDateRange());
} else if (fc instanceof StationTimeSeriesFeatureCollection) {
StationTimeSeriesFeatureCollection sc = (StationTimeSeriesFeatureCollection) fc;
if (bb == null)
bb = sc.getBoundingBox();
else
bb.extend(sc.getBoundingBox());
PointFeatureCollection pfc = sc.flatten(null, null);
pfc.calcBounds();
if (dates == null)
dates = pfc.getDateRange();