private void checkLatLonSubset(CoverageCollection gcs, Coverage coverage, LatLonRect bbox, int[] expectedShape) throws Exception { System.out.printf(" coverage llbb = %s width=%f%n", gcs.getLatlonBoundingBox().toString2(), gcs.getLatlonBoundingBox().getWidth()); System.out.printf(" constrain bbox= %s width=%f%n", bbox.toString2(), bbox.getWidth()); SubsetParams params = new SubsetParams().setLatLonBoundingBox(bbox).setTimePresent(); GeoReferencedArray geo = coverage.readData(params); CoverageCoordSys gcs2 = geo.getCoordSysForData(); Assert.assertNotNull("CoordSysForData", gcs2); System.out.printf(" data cs shape=%s%n", Misc.showInts(gcs2.getShape())); System.out.printf(" data shape=%s%n", Misc.showInts(geo.getData().getShape())); Assert.assertArrayEquals("CoordSys=Data shape", gcs2.getShape(), geo.getData().getShape()); Assert.assertArrayEquals("expected data shape", expectedShape, geo.getData().getShape()); }
logger.info("ProjRect2 = {}", projBB2); SubsetParams subset = new SubsetParams().setLatLonBoundingBox(gds.getLatlonBoundingBox()); // should be the same! Optional<CoverageCoordSys> opt = csys.subset(subset); Assert.assertTrue(opt.isPresent());
logger.info("ProjRect2 = {}", projBB2); SubsetParams subset = new SubsetParams().setLatLonBoundingBox(gds.getLatlonBoundingBox()); // should be the same! Optional<CoverageCoordSys> opt = csys.subset(subset); Assert.assertTrue(opt.isPresent());
logger.debug("llbb={} ({})", llbb.toString2(), llbb); SubsetParams subset = new SubsetParams().setLatLonBoundingBox(gds.getLatlonBoundingBox()); // should be the same! Optional<CoverageCoordSys> opt = csys.subset(subset); Assert.assertTrue(opt.isPresent());
SubsetParams params = new SubsetParams().set(SubsetParams.timePresent, true).setLatLonBoundingBox(bbox); GeoReferencedArray geo = coverage.readData(params); logger.debug("geoCs shape={}", Misc.showInts(geo.getCoordSysForData().getShape()));