ProductRecordSource implements RecordSource { @Override public Header getHeader() { return pixelExtractor.getHeader(); } ProductRecordSource(Product product,
                               Header referenceRecordHeader,
                               Iterable<PixelPosProvider.PixelPosRecord> pixelPosRecords,
                               MAConfig config,
                               AffineTransform transform); @Override Header getHeader(); @Override Iterable<Record> getRecords(); @Override String getTimeAndLocationColumnDescription(); static final String SOURCE_NAME_ATT_NAME; static final String PIXEL_X_ATT_NAME; static final String PIXEL_Y_ATT_NAME; static final String PIXEL_LAT_ATT_NAME; static final String PIXEL_LON_ATT_NAME; static final String PIXEL_TIME_ATT_NAME; static final String PIXEL_MASK_ATT_NAME; }
@Test public void testThatHeaderIsCorrect() throws Exception { MAConfig config = new MAConfig(); config.setCopyInput(false); config.setMacroPixelSize(1); ProductRecordSource output = createProductRecordSource(2, 3, createRecordSource(1), config); Header header = output.getHeader(); assertNotNull(header); String[] attributeNames = header.getAttributeNames(); assertNotNull(attributeNames); int index = 0; assertEquals("source_name", attributeNames[index++]); assertEquals("pixel_time", attributeNames[index++]); assertEquals("*pixel_x", attributeNames[index++]); assertEquals("*pixel_y", attributeNames[index++]); assertEquals("*pixel_lat", attributeNames[index++]); assertEquals("*pixel_lon", attributeNames[index++]); assertEquals("*b1", attributeNames[index++]); assertEquals("*b2", attributeNames[index++]); assertEquals("*b3", attributeNames[index++]); assertEquals("*f.valid", attributeNames[index++]); assertEquals("*latitude", attributeNames[index++]); assertEquals("*longitude", attributeNames[index++]); assertEquals(12, index); }