sf.format("%nPointFeatureCollection %d %n", count); 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());
@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()); } } }
static int checkPointFeatureCollectionBB(PointFeatureCollection pfc, boolean show) throws IOException { if (show) { System.out.printf("----------- testPointFeatureCollection -----------------%n"); System.out.println(" test PointFeatureCollection " + pfc.getName()); System.out.println(" calcBounds"); System.out.println(" empty " + pfc.getName()); return 0; // empty checkPointFeature(pf, pfc.getTimeUnit()); if (!bb.contains(pf.getLocation().getLatLon())) System.out.printf(" point not in BB = %s on %s %n", pf.getLocation().getLatLon(), pfc.getName()); System.out.printf(" date out of Range= %s on %s %n", pf.getObservationTimeAsCalendarDate(), pfc.getName()); count++; LatLonPoint llpt = pf.getLocation().getLatLon(); if (!bb2.contains(llpt)) { System.out.printf(" point not in BB = %s on %s %n", llpt, pfc.getName()); bb2.contains(llpt);