private static void configureBand(Band band05X, ImageInfo imageInfo, String unit, String description) { band05X.setUnit(unit); band05X.setDescription(description); band05X.setImageInfo(imageInfo); band05X.setNoDataValue(Double.NaN); band05X.setNoDataValueUsed(true); }
targetBand.setImageInfo(imageInfo);
private void addDeltaBands() { final Band deltaLonBand = targetProduct.addBand("delta_lon_angular", "longitude - LON"); deltaLonBand.setUnit("deg"); deltaLonBand.setDescription("Delta between old longitude and new longitude in degree"); deltaLonBand.setNoDataValueUsed(true); deltaLonBand.setNoDataValue(noDataValue == null ? Double.NaN : noDataValue); deltaLonBand.setImageInfo(createDeltaBandImageInfo(-0.015, +0.015)); final Band deltaLatBand = targetProduct.addBand("delta_lat_angular", "latitude - LAT"); deltaLatBand.setUnit("deg"); deltaLatBand.setDescription("Delta between old latitude and new latitude in degree"); deltaLatBand.setNoDataValueUsed(true); deltaLatBand.setNoDataValue(noDataValue == null ? Double.NaN : noDataValue); deltaLatBand.setImageInfo(createDeltaBandImageInfo(-0.01, +0.01)); final Band deltaLonMetBand = targetProduct.addBand("delta_lon_metric", "cos(rad(LAT)) * 6378137 * rad(longitude - LON)"); deltaLonMetBand.setUnit("m"); deltaLonMetBand.setDescription("Delta between old longitude and new longitude in meters"); deltaLonMetBand.setNoDataValueUsed(true); deltaLonMetBand.setNoDataValue(noDataValue == null ? Double.NaN : noDataValue); deltaLonMetBand.setImageInfo(createDeltaBandImageInfo(-1500.0, +1500.0)); final Band deltaLatMetBand = targetProduct.addBand("delta_lat_metric", "6378137 * rad(latitude - LAT)"); deltaLatMetBand.setUnit("m"); deltaLatMetBand.setDescription("Delta between old latitude and new latitude in meters"); deltaLatMetBand.setNoDataValueUsed(true); deltaLatMetBand.setNoDataValue(noDataValue == null ? Double.NaN : noDataValue); deltaLatMetBand.setImageInfo(createDeltaBandImageInfo(-1000.0, +1000.0)); }
targetBand.setScalingOffset(0.0d); targetBand.setSampleCoding(srcBand.getSampleCoding()); targetBand.setImageInfo(srcBand.getImageInfo()); if (prefix.equals("Flat")) { targetBand.setDescription(String.format("Ground reflectance with the correction of slope effects, band %s", bandId));
targetBand.setNoDataValueUsed(false); targetBand.setSampleCoding(srcBand.getSampleCoding()); targetBand.setImageInfo(srcBand.getImageInfo()); targetBand.setDescription("Defective Pixel"); targetBand.setSourceImage(srcBand.getSourceImage());
private void addAOTImage(Product product, String pathString) { Band srcBand = getTifBand(pathString, 1); if (srcBand == null) { logger.warning(String.format("Image %s not added", pathString)); return; } MuscateMetadata.Geoposition geoposition = getGeoposition(srcBand.getRasterWidth(), srcBand.getRasterHeight()); if (geoposition == null) { logger.warning(String.format("Unrecognized geometry of image %s, it will not be added to the product %s.", pathString, product.getName())); return; } String bandName = "AOT_" + geoposition.id; Band targetBand = new Band(bandName, srcBand.getDataType(), srcBand.getRasterWidth(), srcBand.getRasterHeight()); product.addBand(targetBand); ProductUtils.copyGeoCoding(srcBand, targetBand); targetBand.setNoDataValue(metadata.getAOTNoDataValue()); targetBand.setNoDataValueUsed(true); targetBand.setScalingFactor(1.0d / metadata.getAOTQuantificationValue()); targetBand.setScalingOffset(0.0d); targetBand.setSampleCoding(srcBand.getSampleCoding()); targetBand.setImageInfo(srcBand.getImageInfo()); targetBand.setDescription(String.format("Aerosol Optical Thickness at %.0fm resolution", geoposition.xDim)); targetBand.setSourceImage(srcBand.getSourceImage()); }
targetBand.setScalingOffset(0); targetBand.setSampleCoding(srcBand.getSampleCoding()); targetBand.setImageInfo(srcBand.getImageInfo()); targetBand.setDescription("Interpolated AOT pixels mask"); targetBand.setSourceImage(srcBand.getSourceImage());
targetBand.setNoDataValueUsed(false); targetBand.setSampleCoding(srcBand.getSampleCoding()); targetBand.setImageInfo(srcBand.getImageInfo()); targetBand.setDescription("Detector footprint"); targetBand.setSourceImage(srcBand.getSourceImage());
private void addWVCImage(Product product, String pathString) { Band srcBand = getTifBand(pathString, 0); if (srcBand == null) { logger.warning(String.format("Image %s not added", pathString)); return; } MuscateMetadata.Geoposition geoposition = getGeoposition(srcBand.getRasterWidth(), srcBand.getRasterHeight()); if (geoposition == null) { logger.warning(String.format("Unrecognized geometry of image %s, it will not be added to the product %s.", pathString, product.getName())); return; } String bandName = "WVC_" + geoposition.id; Band targetBand = new Band(bandName, srcBand.getDataType(), srcBand.getRasterWidth(), srcBand.getRasterHeight()); product.addBand(targetBand); ProductUtils.copyGeoCoding(srcBand, targetBand); targetBand.setNoDataValue(metadata.getWVCNoDataValue()); targetBand.setNoDataValueUsed(true); targetBand.setScalingFactor(1.0d / metadata.getWVCQuantificationValue()); targetBand.setScalingOffset(0.0d); targetBand.setUnit("cm"); //TODO verify targetBand.setSampleCoding(srcBand.getSampleCoding()); targetBand.setImageInfo(srcBand.getImageInfo()); targetBand.setDescription(String.format("Water vapor content at %.0fm resolution in %s", geoposition.xDim, targetBand.getUnit())); targetBand.setSourceImage(srcBand.getSourceImage()); }
targetBand.setScalingOffset(0); targetBand.setSampleCoding(srcBand.getSampleCoding()); targetBand.setImageInfo(srcBand.getImageInfo()); targetBand.setDescription("saturation mask coded over 8 bits, 1 bit per spectral band (number of useful bits = number of " + "spectral bands)");
targetBand.setScalingOffset(0); targetBand.setSampleCoding(srcBand.getSampleCoding()); targetBand.setImageInfo(srcBand.getImageInfo()); targetBand.setDescription("Edge mask"); targetBand.setSourceImage(srcBand.getSourceImage());
targetBand.setUnit(srcBand.getUnit()); targetBand.setSampleCoding(srcBand.getSampleCoding()); targetBand.setImageInfo(srcBand.getImageInfo()); targetBand.setSpectralBandIndex(srcBand.getSpectralBandIndex()); targetBand.setDescription(bandName);
targetBand.setUnit(srcBand.getUnit() != null ? srcBand.getUnit() : bandUnits[idx]); targetBand.setSampleCoding(srcBand.getSampleCoding()); targetBand.setImageInfo(srcBand.getImageInfo());
band.setSpectralBandIndex(-1); band.setSampleCoding(indexBandInfo.getIndexCoding()); band.setImageInfo(indexBandInfo.getImageInfo()); band.setDescription(bandInfo.getBandInformation().getDescription()); band.setValidPixelExpression(String.format("%s.raw > 0",bandInfo.getBandInformation().getPhysicalBand()));
band.setSpectralBandIndex(-1); band.setSampleCoding(indexBandInfo.getIndexCoding()); band.setImageInfo(indexBandInfo.getImageInfo()); } else { band.setSpectralWavelength(0);
band.setImageInfo(imgIOFile.getImageInfo()); band.setSampleCoding(imgIOFile.getIndexCoding()); product.getIndexCodingGroup().add(imgIOFile.getIndexCoding());
band.setSpectralBandIndex(-1); band.setSampleCoding(indexBandInfo.getIndexCoding()); band.setImageInfo(indexBandInfo.getImageInfo());
targetBand.setImageInfo(new ImageInfo(new ColorPaletteDef(sourceImageInfo.getColorPaletteDef().getPoints())));
points[10] = new ColorPaletteDef.Point(5010, Color.LIGHT_GRAY); points[11] = new ColorPaletteDef.Point(10000, Color.RED); targetBandCloudShadow.setImageInfo(new ImageInfo(new ColorPaletteDef(points, points.length)));
realBand.setImageInfo(imageInfo.clone());