private static String getPolarCase(final Product srcProduct) { final PolBandUtils.MATRIX matrixType = PolBandUtils.getSourceProductType(srcProduct); if (matrixType.equals(PolBandUtils.MATRIX.C4) || matrixType.equals(PolBandUtils.MATRIX.T4)) { return "bistatic"; } return "monostatic"; }
/** * Initializes all the internal file and directory elements from the given output file. This method only must be * called if the product writer should write the given data to raw data files without calling of writeProductNodes. * This may be at the time when a dimap product was opened and the data shold be continously changed in the same * product file without an previous call to the saveProductNodes to this product writer. * * @param outputFile the dimap header file location. */ protected void initDirs(final File outputFile) { super.initDirs(outputFile); final PolBandUtils.MATRIX matrixType = PolBandUtils.getSourceProductType(getSourceProduct()); String folder = ""; if (matrixType.equals(PolBandUtils.MATRIX.C3)) { folder = "C3"; } else if (matrixType.equals(PolBandUtils.MATRIX.T3)) { folder = "T3"; } else if (matrixType.equals(PolBandUtils.MATRIX.C4)) { folder = "C4"; } else if (matrixType.equals(PolBandUtils.MATRIX.T4)) { folder = "T4"; } if (!folder.isEmpty()) { _outputDir = new File(_outputDir, folder); if(!_outputDir.exists() && !_outputDir.mkdirs()) { SystemUtils.LOG.severe("Unable to create folders in "+_outputDir); } _outputFile = new File(_outputDir, outputFile.getName()); } }
/** * Initializes this operator and sets the one and only target product. * <p>The target product can be either defined by a field of type {@link org.esa.snap.core.datamodel.Product} annotated with the * {@link org.esa.snap.core.gpf.annotations.TargetProduct TargetProduct} annotation or * by calling {@link #setTargetProduct} method.</p> * <p>The framework calls this method after it has created this operator. * Any client code that must be performed before computation of tile data * should be placed here.</p> * * @throws org.esa.snap.core.gpf.OperatorException If an error occurs during operator initialisation. * @see #getTargetProduct() */ @Override public void initialize() throws OperatorException { try { final InputProductValidator validator = new InputProductValidator(sourceProduct); validator.checkIfSARProduct(); validator.checkIfSLC(); sourceProductType = PolBandUtils.getSourceProductType(sourceProduct); srcBandList = PolBandUtils.getSourceBands(sourceProduct, sourceProductType); useRCMConvention = Boolean.getBoolean(SystemUtils.getApplicationContextId() + ".hybridmode.useRCMConvention"); if (simulateNoiseFloor) { sigma = Math.sqrt(FastMath.pow(10.0, noisePower / 10.0) / 2.0); } createTargetProduct(); updateTargetProductMetadata(); } catch (Throwable e) { OperatorUtils.catchOperatorException(getId(), e); } }
isComplex = validator.isComplex(); sourceProductType = PolBandUtils.getSourceProductType(sourceProduct);
validator.checkIfSLC(); sourceProductType = PolBandUtils.getSourceProductType(sourceProduct); if (sourceProductType != PolBandUtils.MATRIX.LCHCP && sourceProductType != PolBandUtils.MATRIX.RCHCP &&
validator.checkIfSLC(); sourceProductType = PolBandUtils.getSourceProductType(sourceProduct); if (sourceProductType != PolBandUtils.MATRIX.LCHCP && sourceProductType != PolBandUtils.MATRIX.RCHCP && sourceProductType != PolBandUtils.MATRIX.C2) {
/** * Initializes this operator and sets the one and only target product. * <p>The target product can be either defined by a field of type {@link Product} annotated with the * {@link TargetProduct TargetProduct} annotation or * by calling {@link #setTargetProduct} method.</p> * <p>The framework calls this method after it has created this operator. * Any client code that must be performed before computation of tile data * should be placed here.</p> * * @throws OperatorException If an error occurs during operator initialisation. * @see #getTargetProduct() */ @Override public void initialize() throws OperatorException { try { final InputProductValidator validator = new InputProductValidator(sourceProduct); validator.checkIfSARProduct(); validator.checkIfSLC(); validator.checkIfTOPSARBurstProduct(false); sourceProductType = PolBandUtils.getSourceProductType(sourceProduct); checkSourceProductType(); srcBandList = PolBandUtils.getSourceBands(sourceProduct, sourceProductType); createTargetProduct(); } catch (Throwable e) { OperatorUtils.catchOperatorException(getId(), e); } }
@Override public void initialize() throws OperatorException { try { final InputProductValidator validator = new InputProductValidator(sourceProduct); validator.checkIfSARProduct(); sourceProductType = PolBandUtils.getSourceProductType(sourceProduct); if (sourceProductType != PolBandUtils.MATRIX.FULL) { throw new OperatorException("Quad-pol source product is expected."); } srcBandList = PolBandUtils.getSourceBands(sourceProduct, sourceProductType); halfWindowSize = windowSize / 2; sourceImageWidth = sourceProduct.getSceneRasterWidth(); sourceImageHeight = sourceProduct.getSceneRasterHeight(); createTargetProduct(); updateTargetProductMetadata(); } catch (Throwable e) { OperatorUtils.catchOperatorException(getId(), e); } }
/** * Initializes this operator and sets the one and only target product. * <p>The target product can be either defined by a field of type {@link Product} annotated with the * {@link TargetProduct TargetProduct} annotation or * by calling {@link #setTargetProduct} method.</p> * <p>The framework calls this method after it has created this operator. * Any client code that must be performed before computation of tile data * should be placed here.</p> * * @throws OperatorException If an error occurs during operator initialisation. * @see #getTargetProduct() */ @Override public void initialize() throws OperatorException { try { final InputProductValidator validator = new InputProductValidator(sourceProduct); validator.checkIfSARProduct(); validator.checkIfTOPSARBurstProduct(false); validator.checkIfSLC(); sourceProductType = PolBandUtils.getSourceProductType(sourceProduct); checkSourceProductType(); srcBandList = PolBandUtils.getSourceBands(sourceProduct, sourceProductType); createTargetProduct(); updateTargetProductMetadata(); } catch (Throwable e) { OperatorUtils.catchOperatorException(getId(), e); } }
/** * Initializes this operator and sets the one and only target product. * <p>The target product can be either defined by a field of type {@link Product} annotated with the * {@link TargetProduct TargetProduct} annotation or * by calling {@link #setTargetProduct} method.</p> * <p>The framework calls this method after it has created this operator. * Any client code that must be performed before computation of tile data * should be placed here.</p> * * @throws OperatorException If an error occurs during operator initialisation. * @see #getTargetProduct() */ @Override public void initialize() throws OperatorException { try { final InputProductValidator validator = new InputProductValidator(sourceProduct); validator.checkIfSARProduct(); //validator.checkIfSLC(); validator.checkIfTOPSARBurstProduct(false); sourceProductType = PolBandUtils.getSourceProductType(sourceProduct); srcBandList = PolBandUtils.getSourceBands(sourceProduct, sourceProductType); polDecomp = createDecomposition(); checkSourceProductType(sourceProductType); createTargetProduct(); updateTargetProductMetadata(); } catch (Throwable e) { OperatorUtils.catchOperatorException(getId(), e); } }
/** * Initializes this operator and sets the one and only target product. * <p>The target product can be either defined by a field of type {@link Product} annotated with the * {@link TargetProduct TargetProduct} annotation or * by calling {@link #setTargetProduct} method.</p> * <p>The framework calls this method after it has created this operator. * Any client code that must be performed before computation of tile data * should be placed here.</p> * * @throws OperatorException If an error occurs during operator initialisation. * @see #getTargetProduct() */ @Override public void initialize() throws OperatorException { try { final InputProductValidator validator = new InputProductValidator(sourceProduct); validator.checkIfSARProduct(); //validator.checkIfSLC(); validator.checkIfTOPSARBurstProduct(false); sourceImageWidth = sourceProduct.getSceneRasterWidth(); sourceImageHeight = sourceProduct.getSceneRasterHeight(); sourceProductType = PolBandUtils.getSourceProductType(sourceProduct); checkSourceProductType(sourceProductType); srcBandList = PolBandUtils.getSourceBands(sourceProduct, sourceProductType); createTargetProduct(); speckleFilter = createFilter(); } catch (Throwable e) { OperatorUtils.catchOperatorException(getId(), e); } }