本文整理了Java中org.esa.snap.core.gpf.annotations.Parameter
类的一些代码示例,展示了Parameter
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Parameter
类的具体详情如下:
包路径:org.esa.snap.core.gpf.annotations.Parameter
类名称:Parameter
暂无
代码示例来源:origin: senbox-org/s2tbx
@Parameter(pattern = "[a-zA-Z_0-9]*")
private String name;
@Parameter
private int[] xPixelPolygonPositions;
@Parameter
private int[] yPixelPolygonPositions;
@Parameter
private boolean isShapeDefined;
代码示例来源:origin: senbox-org/s2tbx
private static void initObject(Map<String, Object> params, Object object) {
for (Field field : object.getClass().getDeclaredFields()) {
final Parameter annotation = field.getAnnotation(Parameter.class);
if (annotation != null) {
String name = annotation.alias();
if (name.isEmpty()) {
name = field.getName();
}
try {
field.set(object, params.get(name));
} catch (Exception e) {
final String msg = String.format("Cannot initialise operator parameter '%s'", name);
throw new OperatorException(msg, e);
}
}
}
}
代码示例来源:origin: senbox-org/s2tbx
private static Converter<?> getConverter(Class<?> type, Parameter parameter) throws OperatorException {
final Class<? extends Converter> converter = parameter.converter();
if (converter == Converter.class) {
return ConverterRegistry.getInstance().getConverter(type);
} else {
try {
return converter.newInstance();
} catch (Exception e) {
final String message = String.format("Cannot find converter for type '%s'", type);
throw new OperatorException(message, e);
}
}
}
代码示例来源:origin: senbox-org/s2tbx
bands.add(bandName);
getLogger().fine(String.format("Using band '%s' as %s",
bandName, paramAnnotation.label()));
} else {
throw new OperatorException(
String.format("Unable to find band that could be used as %s. Please specify band.",
paramAnnotation.label()));
代码示例来源:origin: senbox-org/s1tbx
@OperatorMetadata(alias = "SubGraph",
category = "Input-Output",
authors = "Jun Lu, Luis Veci",
version = "1.0",
description = "Encapsulates a graph within a graph.")
public class SubGraphOp extends Operator {
@Parameter
private File graphFile;
@Override
public void initialize() throws OperatorException {
throw new OperatorException("Please add a sub-graph file");
}
public static class Spi extends OperatorSpi {
public Spi() {
super(SubGraphOp.class);
}
}
}
代码示例来源:origin: senbox-org/s2tbx
private static void initArrayParameter(MetadataElement parentElement, Field field,
Map<String, Object> parameters) throws OperatorException {
String name = field.getAnnotation(Parameter.class).alias();
if (name.isEmpty()) {
name = field.getName();
}
final MetadataElement element = parentElement.getElement(name);
try {
if (element != null) {
final MetadataElement[] elements = element.getElements();
final Class<?> componentType = field.getType().getComponentType();
final Object array = Array.newInstance(componentType, elements.length);
for (int i = 0; i < elements.length; i++) {
MetadataElement arrayElement = elements[i];
final Object componentInstance = componentType.newInstance();
final HashMap<String, Object> objParams = new HashMap<>();
collectParameters(componentInstance.getClass(), arrayElement, objParams);
initObject(objParams, componentInstance);
Array.set(array, i, componentInstance);
}
parameters.put(name, array);
}
} catch (Exception e) {
throw new OperatorException(String.format("Cannot initialise operator parameter '%s'", name), e);
}
}
private static void initObject(Map<String, Object> params, Object object) {
代码示例来源:origin: senbox-org/s2tbx
@Parameter(label = "Red factor", defaultValue = "1.0F", description = "The value of the RED source band is multiplied by this value.")
private float redFactor;
@Parameter(label = "NIR factor", defaultValue = "1.0F", description = "The value of the NIR source band is multiplied by this value.")
private float nirFactor;
@Parameter(label = "Soil line slope", defaultValue = "0.5F", description = "The soil line slope.")
private float slope;
@Parameter(label = "Soil line intercept", defaultValue = "0.5F", description = "The soil line intercept.")
private float intercept;
@Parameter(label = "Adjustment", defaultValue = "0.08F", description = "Adjustment factor to minimize soil background.")
private float adjustment;
@Parameter(label = "Red source band",
description = "The red band for the TSAVI computation. If not provided, the " +
"operator will try to find the best fitting band.",
private String redSourceBand;
@Parameter(label = "NIR source band",
description = "The near-infrared band for the TSAVI computation. If not provided," +
" the operator will try to find the best fitting band.",
代码示例来源:origin: senbox-org/s2tbx
private static void initParameter(MetadataElement parentElement, Field field,
Map<String, Object> parameters) throws
OperatorException {
Parameter annotation = field.getAnnotation(Parameter.class);
String name = annotation.alias();
if (name.isEmpty()) {
name = field.getName();
}
try {
if (parentElement.containsAttribute(name)) {
final Converter converter = getConverter(field.getType(), annotation);
final String parameterText = parentElement.getAttributeString(name);
final Object value = converter.parse(parameterText);
parameters.put(name, value);
} else {
final MetadataElement element = parentElement.getElement(name);
if (element != null) {
final Object obj = field.getType().newInstance();
final HashMap<String, Object> objParams = new HashMap<>();
collectParameters(obj.getClass(), element, objParams);
initObject(objParams, obj);
parameters.put(name, obj);
}
}
} catch (Exception e) {
throw new OperatorException(String.format("Cannot initialise operator parameter '%s'", name), e);
}
}
代码示例来源:origin: senbox-org/s2tbx
@Parameter(description = "The name for the lower wavelength band defining the baseline",
rasterDataNodeType = Band.class)
private String lowerBaselineBandName;
@Parameter(description = "The name of the upper wavelength band defining the baseline",
rasterDataNodeType = Band.class)
private String upperBaselineBandName;
@Parameter(description = " The name of the signal band, i.e. the band for which the baseline height is calculated",
rasterDataNodeType = Band.class)
private String signalBandName;
@Parameter(description = "The name of the MCI band in the target product",
validator = NodeNameValidator.class)
private String lineHeightBandName;
@Parameter(description = "Activates or deactivates calculating the slope parameter",
defaultValue = "true",
label = "Generate slope parameter")
private boolean slope;
@Parameter(description = "The name of the slope band in the target product",
validator = NodeNameValidator.class)
private String slopeBandName;
@Parameter(description = "A ROI-mask expression used to identify pixels of interest",
converter = BooleanExpressionConverter.class)
private String maskExpression;
@Parameter(description = "The cloud correction factor used during calculation",
defaultValue = "1.005")
private float cloudCorrectionFactor;
@Parameter(defaultValue = "NaN",
label = "Invalid MCI value",
description = "Value used to fill invalid MCI pixels")
代码示例来源:origin: senbox-org/snap-desktop
@Parameter
private int complexInt;
代码示例来源:origin: senbox-org/s2tbx
@Parameter(description = "A product to read climatology data from. " +
"Only required if the aerosol type shall be retrieved. " +
"If not provided, a default product will be written to the local aux data directory.", notNull = true)
@Parameter(defaultValue = "true")
private boolean copyToaReflBands;
@Parameter(description = "The reflectance bands which shall be considered for aot retrieval." +
"Note that bands B3 and B11 cannot be left out.",
defaultValue = "B1,B2,B3,B4,B5,B6,B7,B8,B8A,B11,B12")
private String[] reflectanceBandNames;
@Parameter(defaultValue = "true")
private boolean copyGeometryBands;
@Parameter(defaultValue = "true", description = "if true, aerosol retrieval is done")
private boolean computeAerosol;
@Parameter(defaultValue = "true", description = "if true, water vapour retrieval is done")
private boolean computeWaterVapour;
@Parameter(defaultValue = "true", description = "if true, aerosol type retrieval is done")
private boolean computeAerosolType;
@Parameter(defaultValue = "true")
private boolean filling;
@Parameter(defaultValue = "true")
private boolean upscaling;
代码示例来源:origin: senbox-org/s2tbx
@Parameter(label = "Red factor", defaultValue = "1.0F", description = "The value of the red source band is multiplied by this value.")
private float redFactor;
@Parameter(label = "NIR factor", defaultValue = "1.0F", description = "The value of the NIR source band is multiplied by this value.")
private float nirFactor;
@Parameter(label = "Slope of the soil line", defaultValue = "0.5F", description = "Soil line has an arbitrary slope and passes through origin")
private float slopeSoilLine; /* slope = tan(angle) */
@Parameter(label = "Red source band",
description = "The red band for the WDVI computation. If not provided, the " +
"operator will try to find the best fitting band.",
private String redSourceBand;
@Parameter(label = "NIR source band",
description = "The near-infrared band for the WDVI computation. If not provided," +
" the operator will try to find the best fitting band.",
代码示例来源:origin: senbox-org/s2tbx
@Parameter(label = "Red factor", defaultValue = "1.0F", description = "The value of the red source band is multiplied by this value.")
private float redFactor;
@Parameter(label = "NIR factor", defaultValue = "1.0F", description = "The value of the NIR source band is multiplied by this value.")
private float nirFactor;
@Parameter(label = "Angle between soil line and NIR axis (in degrees)", defaultValue = "45.0", description = "Soil line has an arbitrary slope and passes through origin.")
private float angleSoilLineNIRAxis;
@Parameter(label = "Red source band",
description = "The red band for the PVI computation. If not provided, the " +
"operator will try to find the best fitting band.",
private String redSourceBand;
@Parameter(label = "NIR source band",
description = "The near-infrared band for the PVI computation. If not provided," +
" the operator will try to find the best fitting band.",
代码示例来源:origin: senbox-org/s2tbx
@Parameter(label = "Red factor", defaultValue = "1.0F", description = "The value of the red source band is multiplied by this value.")
private float redFactor;
@Parameter(label = "NIR factor", defaultValue = "1.0F", description = "The value of the NIR source band is multiplied by this value.")
private float nirFactor;
@Parameter(label = "Soil brightness correction factor", defaultValue = "0.5F", description = "The amount or cover of green vegetation.")
private float soilCorrectionFactor;
@Parameter(label = "Red source band",
description = "The red band for the SAVI computation. If not provided, the " +
"operator will try to find the best fitting band.",
private String redSourceBand;
@Parameter(label = "NIR source band",
description = "The near-infrared band for the SAVI computation. If not provided," +
" the operator will try to find the best fitting band.",
代码示例来源:origin: senbox-org/s2tbx
@Parameter(label = "Red factor", defaultValue = "1.0F", description = "The value of the RED source band is multiplied by this value.")
private float redFactor;
@Parameter(label = "Blue factor", defaultValue = "1.0F", description = "The value of the BLUE source band is multiplied by this value.")
private float blueFactor;
@Parameter(label = "NIR factor", defaultValue = "1.0F", description = "The value of the NIR source band is multiplied by this value.")
private float nirFactor;
@Parameter(label = "Gamma Parameter", defaultValue = "1.0F", description = "The gamma parameter is like a weighting function that depends on the aerosol type")
private float gammaParameter;
@Parameter(label = "Red source band",
description = "The red band for the ARVI computation. If not provided, the " +
"operator will try to find the best fitting band.",
private String redSourceBand;
@Parameter(label = "Blue source band",
description = "The blue band for the ARVI computation. If not provided, the " +
"operator will try to find the best fitting band.",
private String blueSourceBand;
@Parameter(label = "NIR source band",
description = "The near-infrared band for the ARVI computation. If not provided," +
" the operator will try to find the best fitting band.",
代码示例来源:origin: senbox-org/s2tbx
@Parameter(label = "Red factor", defaultValue = "1.0F", description = "The value of the RED source band is multiplied by this value.")
private float redFactor;
@Parameter(label = "NIR factor", defaultValue = "1.0F", description = "The value of the NIR source band is multiplied by this value.")
private float nirFactor;
@Parameter(label = "Soil line slope", defaultValue = "0.5F", description = "The soil line slope.")
private float slope;
@Parameter(label = "Red source band",
description = "The red band for the MSAVI computation. If not provided, the " +
"operator will try to find the best fitting band.",
private String redSourceBand;
@Parameter(label = "NIR source band",
description = "The near-infrared band for the MSAVI computation. If not provided," +
" the operator will try to find the best fitting band.",
代码示例来源:origin: senbox-org/s1tbx
@Parameter(description = "The output folder to which the data product is written.")
private File targetFolder;
@Parameter(valueSet = {"TOPO", "DEFO", "SMOOTH", "NOSTATCOSTS"},
description = "Size of coherence estimation window in Azimuth direction",
defaultValue = "DEFO",
@Parameter(valueSet = {"MST", "MCF"},
description = "Algorithm used for initialization of the wrapped phase values",
defaultValue = "MST",
@Parameter(description = "Divide the image into tiles and process in parallel. Set to 1 for single tiled.",
defaultValue = "10", label = "Number of Tile Rows")
private int numberOfTileRows = 10;
@Parameter(description = "Divide the image into tiles and process in parallel. Set to 1 for single tiled.",
defaultValue = "10", label = "Number of Tile Columns")
private int numberOfTileCols = 10;
@Parameter(description = "Number of concurrent processing threads. Set to 1 for single threaded.",
defaultValue = "4", label = "Number of Processors")
private int numberOfProcessors = 4;
@Parameter(description = "Overlap, in pixels, between neighboring tiles.",
defaultValue = "200", label = "Row Overlap")
private int rowOverlap = 200;
@Parameter(description = "Overlap, in pixels, between neighboring tiles.",
defaultValue = "200", label = "Column Overlap")
代码示例来源:origin: senbox-org/s2tbx
@Parameter(alias = "resolution",
label = "Output resolution",
description = "The output resolution.",
@Parameter(alias = "upsampling",
label = "Upsampling method",
description = "The method used for interpolation (upsampling to a finer resolution).",
@Parameter(alias = "downsampling",
label = "Downsampling method",
description = "The method used for aggregation (downsampling to a coarser resolution).",
private String downsamplingMethod;
@Parameter(alias = "flagDownsampling",
label = "Flag downsampling method",
description = "The method used for aggregation (downsampling to a coarser resolution) of flags.",
private String flagDownsamplingMethod;
@Parameter(label = "Resample on pyramid levels (for faster imaging)", defaultValue = "true",
description = "This setting will increase performance when viewing the image, but accurate resamplings " +
"are only retrieved when zooming in on a pixel.")
代码示例来源:origin: senbox-org/snap-desktop
@OperatorMetadata(alias = "Tester",
authors = "Nobody",
version = "42",
description = "This is very stupid operator.")
public class TestOp extends Operator {
@Parameter
private double paramDouble;
@Parameter
private String paramString;
@Parameter
private Complex paramComplex;
@Override
public void initialize() throws OperatorException {
}
}
代码示例来源:origin: senbox-org/s1tbx
@Parameter(description = "The list of source bands.", alias = "sourceBands",
rasterDataNodeType = Band.class, label = "Source Band")
private String[] sourceBandNames;
@Parameter(valueSet = {LATEST_AUX, PRODUCT_AUX, EXTERNAL_AUX}, description = "The auxiliary file",
defaultValue = LATEST_AUX, label = "Auxiliary File")
private String auxFile = LATEST_AUX;
@Parameter(description = "The antenna elevation pattern gain auxiliary data file.", label = "External Aux File")
private File externalAuxFile = null;
@Parameter(description = "Output image in complex", defaultValue = "false", label = "Save in complex")
private Boolean outputImageInComplex = false;
@Parameter(description = "Output image scale", defaultValue = "false", label = "Scale in dB")
private Boolean outputImageScaleInDb = false;
@Parameter(description = "Create gamma0 virtual band", defaultValue = "false", label = "Create gamma0 virtual band")
private Boolean createGammaBand = false;
@Parameter(description = "Create beta0 virtual band", defaultValue = "false", label = "Create beta0 virtual band")
private Boolean createBetaBand = false;
@Parameter(description = "The list of polarisations", label = "Polarisations")
private String[] selectedPolarisations;
@Parameter(description = "Output sigma0 band", defaultValue = "true", label = "Output sigma0 band")
private Boolean outputSigmaBand = true;
内容来源于网络,如有侵权,请联系作者删除!