/** * Retrieves the band description for the given product type and band name * * @param prodType * @param bandName * @return the band description */ public ModisBandDescription getBandDescription(final String prodType, final String bandName) { ModisBandDescription bandDesc = null; try { final ModisProductDescription prod = getProductDescription(prodType); bandDesc = prod.getBandDescription(bandName); } catch (IOException e) { logger.severe( "Unable to retrieve information for band '" + bandName + "' of product type '" + prodType + "'."); } return bandDesc; }
@Test public void testDefaultConstruction() { assertEquals(0, prod.getBandNames().length); assertNull(prod.getBandDescription("no_band")); assertEquals(false, prod.mustFlipTopDown()); assertArrayEquals(null, prod.getGeolocationDatasetNames()); assertEquals(null, prod.getExternalGeolocationPattern()); assertEquals(false, prod.hasExternalGeolocation()); assertEquals(0, prod.getTiePointNames().length); }
ModisBandDescription band = prod.getBandDescription(expB_1_Name); assertNotNull(band); assertEquals(expB_1_Name, band.getName()); band = prod.getBandDescription(expB_2_Name); assertNotNull(band); assertEquals(expB_2_Name, band.getName()); assertNull(prod.getBandDescription("no_band")); assertNull(prod.getBandDescription("nonsense"));