Refine search
@Override public ParameterValueGroup getReadParameters() { HashMap<String, String> info = new HashMap<String, String>(); info.put("name", getName()); info.put("description", getDescription()); info.put("vendor", getVendor()); info.put("docURL", getDocURL()); info.put("version", getVersion()); List<GeneralParameterDescriptor> delegateFormatParams = new ArrayList<GeneralParameterDescriptor>(); delegateFormatParams.addAll( delegateFormat.getReadParameters().getDescriptor().descriptors()); // add bands parameter descriptor only if the delegate reader doesn't have it // already if (!checkIfDelegateReaderSupportsBands()) { delegateFormatParams.add(AbstractGridFormat.BANDS); } return new ParameterGroup( new DefaultParameterDescriptorGroup( info, delegateFormatParams.toArray( new GeneralParameterDescriptor [delegateFormatParams.size()]))); }
return super.parameter(name); } catch (ParameterNotFoundException exception) { if (cause != null)
/** * Creates a new instance of {@linkplain ParameterGroup parameter value group} initialized with * the {@linkplain ParameterDescriptor#getDefaultValue default values}. The {@linkplain * org.opengis.parameter.ParameterValueGroup#getDescriptor parameter value descriptor} for the * created group will be {@code this} object. */ public ParameterValueGroup createValue() { return new ParameterGroup(this); }
/** Sets the metadata information for this format */ private void setInfo() { HashMap<String, String> info = new HashMap<String, String>(); info.put("name", "ImagePyramid"); info.put("description", "Image pyramidal plugin"); info.put("vendor", "Geotools"); info.put("docURL", ""); info.put("version", "1.0"); mInfo = info; // reading parameters. Inheriting them from the ImageMosaic final ImageMosaicFormat formatForParameters = new ImageMosaicFormat(); final ParameterValueGroup readParams = formatForParameters.getReadParameters(); final DefaultParameterDescriptorGroup descriptor = (DefaultParameterDescriptorGroup) readParams.getDescriptor(); List<GeneralParameterDescriptor> descriptors = descriptor.descriptors(); GeneralParameterDescriptor[] descriptorArray = new GeneralParameterDescriptor[descriptors.size()]; descriptorArray = descriptors.toArray(descriptorArray); readParameters = new ParameterGroup(new DefaultParameterDescriptorGroup(mInfo, descriptorArray)); // writing parameters writeParameters = null; }
ParameterGroup params = new ParameterGroup(SimilarityTransformProvider.PARAMETERS); params.parameter("8621").setValue(-129.549); params.parameter("8622").setValue(-208.185); params.parameter("8611").setValue(1.0000015504); params.parameter("8614").setValue(1.56504);
group = new ParameterGroup(properties, new Parameter[] {v1, v2, v3}); descriptor = group.getDescriptor(); content = descriptor.descriptors(); content = group.values(); assertEquals("values.size()", 3, content.size()); assertTrue("contains(v1)", content.contains(v1)); assertFalse("contains(v2b)", content.contains(v2b)); assertFalse("contains(v3b)", content.contains(v3b)); assertSame("parameter(\"1\")", v1, group.parameter("1")); assertSame("parameter(\"2\")", v2, group.parameter("2")); assertSame("parameter(\"3\")", v3, group.parameter("3")); assertEquals("parameter(\"1\")", 10, group.parameter("1").intValue()); assertEquals("parameter(\"2\")", 20, group.parameter("2").intValue()); assertEquals("parameter(\"3\")", 30, group.parameter("3").intValue()); assertFalse("add(v2b)", content.add(v2b)); // Already present assertFalse("add(v3b)", content.add(v3b)); // Already present assertEquals("parameter(\"1b\")", -10, group.parameter("1").intValue()); assertEquals("parameter(\"2b\")", -20, group.parameter("2").intValue()); assertEquals("parameter(\"3b\")", -30, group.parameter("3").intValue()); assertEquals("values.size()", 3, content.size()); "new", group, group = new ParameterGroup(descriptor, new Parameter[] {v1b, v2b, v3b})); group = new ParameterGroup(descriptor, new Parameter[] {v1, v2});
ensureNonNull("name", name); name = name.trim(); for (final GeneralParameterValue value : values) { for (final GeneralParameterDescriptor descriptor : getDescriptor().descriptors()) { if (descriptor instanceof ParameterDescriptor) { if (AbstractIdentifiedObject.nameMatches(descriptor, name)) {
String styles = ""; List layerList = (List) groupValue.values();
/** * Returns the parameter values for this math transform. * * @return A copy of the parameter values for this math transform. */ @Override public ParameterValueGroup getParameterValues() { final ParameterValue<URI> file = new Parameter<URI>(Provider.FILE); file.setValue(grid); return new ParameterGroup(Provider.PARAMETERS, new ParameterValue[] {file}); }
/** Sets the metadata information for this format */ private void setInfo() { HashMap<String, String> info = new HashMap<String, String>(); info.put("name", "ImagePyramid"); info.put("description", "Image pyramidal plugin"); info.put("vendor", "Geotools"); info.put("docURL", ""); info.put("version", "1.0"); mInfo = info; // reading parameters. Inheriting them from the ImageMosaic final ImageMosaicFormat formatForParameters = new ImageMosaicFormat(); final ParameterValueGroup readParams = formatForParameters.getReadParameters(); final DefaultParameterDescriptorGroup descriptor = (DefaultParameterDescriptorGroup) readParams.getDescriptor(); List<GeneralParameterDescriptor> descriptors = descriptor.descriptors(); GeneralParameterDescriptor[] descriptorArray = new GeneralParameterDescriptor[descriptors.size()]; descriptorArray = descriptors.toArray(descriptorArray); readParameters = new ParameterGroup(new DefaultParameterDescriptorGroup(mInfo, descriptorArray)); // writing parameters writeParameters = null; }
@Override public MathTransform createMathTransform(Sinusoidal.Provider provider) { final ParameterGroup params = new ParameterGroup(provider.getParameters()); params.parameter("semi_major").setValue(6370997.0); params.parameter("semi_minor").setValue(6370997.0); params.parameter("central_meridian").setValue(30.0); params.parameter("false_easting").setValue(0.0); params.parameter("false_northing").setValue(0.0); return provider.createMathTransform(params); }
public CustomFormat() { this.mInfo = new HashMap<String, String>(); this.mInfo.put("name", TYPE_NAME); this.mInfo.put( "description", "Test custom coverage format - only visible with test jars in the classpath"); this.mInfo.put("docURL", ""); this.mInfo.put("version", "1.0"); // writing parameters this.writeParameters = null; // reading parameters this.readParameters = new ParameterGroup( new DefaultParameterDescriptorGroup( this.mInfo, new GeneralParameterDescriptor[] { READ_GRIDGEOMETRY2D, INPUT_TRANSPARENT_COLOR, CUSTOM_DIMENSION })); }
/** Returns the parameters for this math transform. */ @Override public ParameterValueGroup getParameterValues() { return new ParameterGroup( getParameterDescriptors(), new ParameterValue[] {new Parameter(Provider.ORDER, nmax)}); }
@Override public MathTransform createMathTransform(Mollweide.Provider provider) { final ParameterGroup params = new ParameterGroup(provider.getParameters()); params.parameter("semi_major").setValue(6378206.400); params.parameter("semi_minor").setValue(6378206.400); params.parameter("central_meridian").setValue(-100.000); params.parameter("false_easting").setValue(0.0); params.parameter("false_northing").setValue(0.0); return provider.createMathTransform(params); }
/** * Return a ParameterGroup with default General Parameter Descriptors. * * @param mInfo Set of properties info * @return a {@link ParameterGroup} with Default {@link GeneralParameterDescriptors}. */ protected static ParameterGroup getDefaultParameterGroup(Map<String, String> mInfo) { return new ParameterGroup(new DefaultParameterDescriptorGroup(mInfo, PARAM_DESCRIPTOR)); }
/** * Returns the parameter values using the specified descriptor. * * @param descriptor The parameter descriptor. * @return A copy of the parameter values for this math transform. */ private ParameterValueGroup getParameterValues(final ParameterDescriptorGroup descriptor) { final ParameterValue[] parameters = new ParameterValue[hasHeight ? 2 : 3]; int index = 0; if (!hasHeight) { final ParameterValue p = new org.geotools.parameter.Parameter(Provider.DIM); p.setValue(2); parameters[index++] = p; } parameters[index++] = new FloatParameter(Provider.SEMI_MAJOR, a); parameters[index++] = new FloatParameter(Provider.SEMI_MINOR, b); return new org.geotools.parameter.ParameterGroup(descriptor, parameters); }
/** Creates an instance and sets the metadata. */ public GrassCoverageFormat() { mInfo = new HashMap<String, String>(); mInfo.put("name", "grass"); mInfo.put("description", "Grass Coverage Format"); mInfo.put("vendor", "Geotools"); // reading parameters readParameters = new ParameterGroup( new DefaultParameterDescriptorGroup( mInfo, new GeneralParameterDescriptor[] {READ_GRIDGEOMETRY2D})); // reading parameters writeParameters = new ParameterGroup( new DefaultParameterDescriptorGroup( mInfo, new GeneralParameterDescriptor[] {GEOTOOLS_WRITE_PARAMS})); }
/** * Returns the parameter values for this math transform. * * @return A copy of the parameter values for this math transform. */ @Override public ParameterValueGroup getParameterValues() { return new org.geotools.parameter.ParameterGroup( getParameterDescriptors(), new ParameterValue[] { new FloatParameter(Provider.BASE, base), new FloatParameter(Provider.OFFSET, offset) }); }
/** Sets the metadata information. */ private void setInfo() { HashMap<String, String> info = new HashMap<String, String>(); info.put("name", "ArcGrid"); info.put("description", "ARC/INFO ASCII GRID Coverage Format"); info.put("vendor", "Geotools"); info.put("docURL", "http://gdal.velocet.ca/projects/aigrid/index.html"); info.put("version", "1.0"); mInfo = info; // writing parameters writeParameters = new ParameterGroup( new DefaultParameterDescriptorGroup( mInfo, new GeneralParameterDescriptor[] { GRASS, GEOTOOLS_WRITE_PARAMS, FORCE_CELLSIZE })); // reading parameters readParameters = new ParameterGroup( new DefaultParameterDescriptorGroup( mInfo, new GeneralParameterDescriptor[] {READ_GRIDGEOMETRY2D})); }
/** * Returns the parameter values for this math transform. * * @return A copy of the parameter values for this math transform. */ @Override public ParameterValueGroup getParameterValues() { return new org.geotools.parameter.ParameterGroup( getParameterDescriptors(), new ParameterValue[] { new FloatParameter(Provider.BASE, base), new FloatParameter(Provider.SCALE, scale) }); }