@Override public void getDetailInfo(java.util.Formatter sf) { super.getDetailInfo(sf); int count = 0; for (FeatureCollection fc : collectionList) { sf.format("%nFeatureCollection %d %n", count++); if (fc instanceof PointFeatureCollection) { PointFeatureCollection pfc = (PointFeatureCollection) fc; sf.format(" %s %s\n", pfc.getCollectionFeatureType(), pfc.getName()); sf.format(" npts = %d %n", pfc.size()); sf.format(" bb = %s %n", pfc.getBoundingBox() == null ? "" : pfc.getBoundingBox().toString2()); sf.format(" dates = %s %n", pfc.getDateRange() == null ? "" : pfc.getDateRange().toString()); } else if (fc instanceof StationTimeSeriesFeatureCollection) { StationTimeSeriesFeatureCollection npfc = (StationTimeSeriesFeatureCollection) fc; sf.format(" %s %s\n", npfc.getCollectionFeatureType(), npfc.getName()); sf.format(" npts = %d %n", npfc.size()); sf.format(" bb = %s %n", npfc.getBoundingBox() == null ? "" : npfc.getBoundingBox().toString2()); // sf.format(" dates = %s %n", npfc.getDateRange() == null ? "" : npfc.getDateRange().toString()); } } }
sf.format(" %s %s %n", pfc.getCollectionFeatureType(), pfc.getName()); sf.format(" npts = %d %n", pfc.size()); sf.format(" bb = %s %n", pfc.getBoundingBox() == null ? "" : pfc.getBoundingBox().toString2()); sf.format(" dates = %s %n", pfc.getCalendarDateRange()); List<Variable> extra = pfc.getExtraVariables();
pfc.calcBounds(); if (bb == null) bb = pfc.getBoundingBox(); else bb.extend(pfc.getBoundingBox()); if (dates == null) dates = pfc.getCalendarDateRange();
pfc.calcBounds(); if (bb == null) bb = pfc.getBoundingBox(); else bb.extend(pfc.getBoundingBox()); if (dates == null) dates = pfc.getCalendarDateRange();
System.out.println(" bb= " + pfc.getBoundingBox()); System.out.println(" dateRange= " + pfc.getCalendarDateRange()); System.out.println(" npts= " + pfc.size()); LatLonRect bb = pfc.getBoundingBox(); assert bb != null; CalendarDateRange dr = pfc.getCalendarDateRange();
protected void finishCalcBounds() { if (!calcBounds) return; if ((bb != null) && bb.crossDateline() && (bb.getWidth() > 350.0)) { // call it global - less confusing double lat_min = bb.getLowerLeftPoint().getLatitude(); double deltaLat = bb.getUpperLeftPoint().getLatitude() - lat_min; bb = new LatLonRect(new LatLonPointImpl(lat_min, -180.0), deltaLat, 360.0); } if (collection != null) { if (collection.getBoundingBox() == null) collection.setBoundingBox(bb); if (collection.getCalendarDateRange() == null) { CalendarDateRange dr = getCalendarDateRange(); if (dr != null) collection.setCalendarDateRange(dr); } if (collection.size() <= 0) { if (count < 0) count = 0; collection.setSize(count); } } }
protected void finishCalcBounds() { if (!calcBounds) return; if ((bb != null) && bb.crossDateline() && (bb.getWidth() > 350.0)) { // call it global - less confusing double lat_min = bb.getLowerLeftPoint().getLatitude(); double deltaLat = bb.getUpperLeftPoint().getLatitude() - lat_min; bb = new LatLonRect(new LatLonPointImpl(lat_min, -180.0), deltaLat, 360.0); } if (collection != null) { if (collection.getBoundingBox() == null) collection.setBoundingBox(bb); if (collection.getCalendarDateRange() == null) { CalendarDateRange dr = getCalendarDateRange(); if (dr != null) collection.setCalendarDateRange(dr); } if (collection.size() <= 0) { if (count < 0) count = 0; collection.setSize(count); } } }
countLocations(pfc); LatLonRect bb = pfc.getBoundingBox(); LatLonRect bb2 = new LatLonRect(bb.getLowerLeftPoint(), bb.getHeight() / 2, bb.getWidth() / 2); PointFeatureCollection subset = pfc.subset(bb2, (CalendarDateRange) null);