本文整理汇总了Java中org.opengis.parameter.ParameterValue类的典型用法代码示例。如果您正苦于以下问题:Java ParameterValue类的具体用法?Java ParameterValue怎么用?Java ParameterValue使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ParameterValue类属于org.opengis.parameter包,在下文中一共展示了ParameterValue类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: replaceParameter
import org.opengis.parameter.ParameterValue; //导入依赖的package包/类
/**
* Replace or add the provided parameter in the read parameters
*/
public static <T> GeneralParameterValue[] replaceParameter(
GeneralParameterValue[] readParameters, Object value, ParameterDescriptor<T> pd) {
// scan all the params looking for the one we want to add
for (GeneralParameterValue gpv : readParameters) {
// in case of match of any alias add a param value to the lot
if (gpv.getDescriptor().getName().equals(pd.getName())) {
((ParameterValue) gpv).setValue(value);
// leave
return readParameters;
}
}
// add it to the array
// add to the list
GeneralParameterValue[] readParametersClone = new GeneralParameterValue[readParameters.length + 1];
System.arraycopy(readParameters, 0, readParametersClone, 0, readParameters.length);
final ParameterValue<T> pv = pd.createValue();
pv.setValue(value);
readParametersClone[readParameters.length] = pv;
readParameters = readParametersClone;
return readParameters;
}
开发者ID:geosolutions-it,项目名称:soil_sealing,代码行数:27,代码来源:CoverageUtilities.java
示例2: getGeoTiffWriteParameters
import org.opengis.parameter.ParameterValue; //导入依赖的package包/类
private static GeneralParameterValue[] getGeoTiffWriteParameters() {
GeoTiffWriteParams writeParams = new GeoTiffWriteParams();
writeParams.setCompressionMode(GeoTiffWriteParams.MODE_EXPLICIT);
writeParams.setCompressionType(GEOTIFF_COMPRESSION_TYPE);
writeParams.setCompressionQuality(GEOTIFF_COMPRESSION_QUALITY);
ParameterValue parameterValue = AbstractGridFormat.GEOTOOLS_WRITE_PARAMS.createValue();
parameterValue.setValue(writeParams);
return new GeneralParameterValue[] {
parameterValue
};
}
开发者ID:SEEG-Oxford,项目名称:ABRAID-MP,代码行数:12,代码来源:RasterUtils.java
示例3: addImageMosaic
import org.opengis.parameter.ParameterValue; //导入依赖的package包/类
private void addImageMosaic( MapContent map ) throws Exception {
if (inImageMosaics != null) {
RasterSymbolizer sym = sf.getDefaultRasterSymbolizer();
Style style = SLD.wrapSymbolizers(sym);
final ParameterValue<Color> inTransp = AbstractGridFormat.INPUT_TRANSPARENT_COLOR.createValue();
inTransp.setValue(Color.white);
final ParameterValue<Color> outTransp = ImageMosaicFormat.OUTPUT_TRANSPARENT_COLOR.createValue();
outTransp.setValue(Color.white);
final ParameterValue<Color> backColor = ImageMosaicFormat.BACKGROUND_COLOR.createValue();
backColor.setValue(Color.RED);
final ParameterValue<Boolean> fading = ImageMosaicFormat.FADING.createValue();
fading.setValue(true);
final ParameterValue<Interpolation> interpol = ImageMosaicFormat.INTERPOLATION.createValue();
interpol.setValue(new javax.media.jai.InterpolationBilinear());
final ParameterValue<Boolean> resol = ImageMosaicFormat.ACCURATE_RESOLUTION.createValue();
resol.setValue(true);
final ParameterValue<Boolean> multiThread= ImageMosaicFormat.ALLOW_MULTITHREADING.createValue();
multiThread.setValue(true);
final ParameterValue<Boolean> usejai = ImageMosaicFormat.USE_JAI_IMAGEREAD.createValue();
usejai.setValue(false);
final ParameterValue<double[]> bkg = ImageMosaicFormat.BACKGROUND_VALUES.createValue();
bkg.setValue(new double[]{0});
GeneralParameterValue[] gp = new GeneralParameterValue[]{inTransp, multiThread};
for( String imageMosaicPath : inImageMosaics ) {
ImageMosaicReader imr = new ImageMosaicReader(new File(imageMosaicPath));
GridReaderLayer layer = new GridReaderLayer(imr, style, gp);
map.addLayer(layer);
}
}
}
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:42,代码来源:OmsMapsViewer.java
示例4: createValueContainer
import org.opengis.parameter.ParameterValue; //导入依赖的package包/类
private static PropertyContainer createValueContainer(ParameterValueGroup valueGroup) {
final PropertyContainer vc = new PropertyContainer();
List<GeneralParameterDescriptor> descriptors = valueGroup.getDescriptor().descriptors();
for (GeneralParameterDescriptor descriptor : descriptors) {
final Class valueType;
Set validValues = null;
Comparable minValue = null;
Comparable maxValue = null;
if (descriptor instanceof ParameterDescriptor) {
ParameterDescriptor parameterDescriptor = (ParameterDescriptor) descriptor;
valueType = parameterDescriptor.getValueClass();
validValues = parameterDescriptor.getValidValues();
minValue = parameterDescriptor.getMinimumValue();
maxValue = parameterDescriptor.getMaximumValue();
} else {
valueType = Double.TYPE;
}
final String paramName = descriptor.getName().getCode();
final PropertyDescriptor vd = new PropertyDescriptor(paramName, valueType);
final ParameterValue<?> parameterValue = valueGroup.parameter(paramName);
if (parameterValue.getUnit() != null) {
vd.setUnit(String.valueOf(parameterValue.getUnit()));
}
if (validValues != null) {
vd.setValueSet(new ValueSet(validValues.toArray()));
}
if ( minValue instanceof Double && maxValue instanceof Double) {
Double min = (Double) minValue;
Double max = (Double) maxValue;
vd.setValueRange(new ValueRange(min, max));
if(parameterValue.getValue() == null) {
parameterValue.setValue((min + max) / 2);
}
}
vd.setDefaultConverter();
final Property property = new Property(vd, new PropertyAccessor() {
@Override
public Object getValue() {
return parameterValue.getValue();
}
@Override
public void setValue(Object value) {
parameterValue.setValue(value);
}
});
vc.addProperty(property);
}
return vc;
}
开发者ID:senbox-org,项目名称:snap-desktop,代码行数:53,代码来源:CustomCrsPanel.java
注:本文中的org.opengis.parameter.ParameterValue类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论