static Product getClimatologiesProduct(String auxDataDir) throws IOException { final File climatologiesFile = new File(auxDataDir, CLIMATOLOGY_FILE_NAME); final ProductReader netCDFReader = ProductIO.getProductReader("NetCDF"); return netCDFReader.readProductNodes(climatologiesFile, null); }
protected Product testReader(final File inputFile) throws Exception { if(!inputFile.exists()){ TestUtils.skipTest(this, inputFile +" not found"); return null; } final DecodeQualification canRead = readerPlugIn.getDecodeQualification(inputFile); if(canRead != DecodeQualification.INTENDED) { throw new Exception("Reader not intended"); } final Product product = reader.readProductNodes(inputFile, null); if(product == null) { throw new Exception("Unable to read product"); } TestUtils.verifyProduct(product, true, true); validateMetadata(product); return product; }
Product bProduct = geoTiffReader.readProductNodes(new File(getBaseDir(), imgPath), null); bandProductList.add(bProduct); Product bProduct = ceosReader.readProductNodes(new File(getBaseDir(), imgPath), null); int idx = imgPath.indexOf("scene_") + 6; String pol = imgPath.substring(idx, idx + 2);
final String fname = file.getName().toUpperCase(); if (fname.endsWith(".TIF") && !fname.equals(name)) { Product product2 = geoTiffReader.readProductNodes(file, null); String polarization2 = getPolarization(fname); Band b = product2.getBands()[0]; final String fname = file.getName().toUpperCase(); if (fname.endsWith(".TIF") && !fname.equals(name)) { Product product2 = geoTiffReader.readProductNodes(file, null); String polarization2 = getPolarization(fname); Band b = product2.getBands()[0]; final String fname = file.getName().toUpperCase(); if (fname.endsWith(".TIF") && !fname.equals(name)) { Product product2 = geoTiffReader.readProductNodes(file, null); String polarization2 = getPolarization(fname); Band b = product2.getBands()[0];
bandProduct = geoTiffReader.readProductNodes(new File(getBaseDir(), imgPath), null);
final ProductReaderPlugIn plugIn = allReaderPlugIns.next(); if (plugIn.getClass().toString().equals(productReaderPlugin)) { product = plugIn.createReaderInstance().readProductNodes(productFile, null); break;
product = geoTiffReader.readProductNodes(bands.get(0), null); Band curBand = product.getBands()[0]; curBand.setNoDataValue(0); curBand_Intensity.setNoDataValue(0); for (int x = 1; x < bands.size(); x++){ Product nextBandProduct = geoTiffReader.readProductNodes(bands.get(x), null); polarization = bandNames.get(x).substring(4, 6); Band nextBand = nextBandProduct.getBands()[0]; product = geoTiffReader.readProductNodes(inputFile, null); Band curBand = product.getBands()[0]; String polarization = inputFile.getName().substring(4, 6); if (f.getName().toUpperCase().endsWith("TIF") || f.getName().toUpperCase().endsWith("TIFF")){ if (!(f.getName().equals(inputFile.getName()))){ Product nextBandProduct = geoTiffReader.readProductNodes(inputFile, null); polarization = f.getName().substring(4, 6); Band nextBand = nextBandProduct.getBands()[0];
public Product open(final File inputFile) throws IOException { product = geoTiffReader.readProductNodes(inputFile, null); product.setFileLocation(inputFile); addAuxXML(product); addExtraBands(inputFile, product); product.setStartTime(getStartTime(product)); product.setEndTime(getEndTime(product)); return product; } private String getTime(final Product product, final String tag){
private Band addBand(final Product product, String name, final int w, final int h, final ImageIOFile img, final int bandIndex, final String unit) throws IOException { File bandFile = getFile(img.getName()); ProductReader reader = geotiffPlugIn.createReaderInstance(); Product bandProduct = reader.readProductNodes(bandFile, null); if (bandProduct != null) { bandProducts.add(bandProduct); Band srcBand = bandProduct.getBandAt(bandIndex); if (product.containsBand(name)) { name += "2"; } Band band = new Band(name, srcBand.getDataType(), w, h); band.setNoDataValue(0); band.setNoDataValueUsed(true); band.setUnit(unit); band.setSourceImage(srcBand.getSourceImage()); product.addBand(band); return band; } return null; }
subsetDef.setTreatVirtualBandsAsRealBands(true); targetProduct = subsetReader.readProductNodes(sourceProduct, subsetDef);
if (this.gdalReader != null) { try { Product nitfProduct = gdalReader.readProductNodes(productDirectory.getFile(nitfFiles[bandIndex]), null); if (nitfProduct != null) { product.setNumResolutionsMax(nitfProduct.getNumResolutionsMax());