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()]))); }
/** 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; }
return super.descriptor(name); } catch (ParameterNotFoundException exception) { if (cause != null)
ensureNonNull("name", name); name = name.trim(); List<DefaultParameterDescriptorGroup> subgroups = null; List<GeneralParameterDescriptor> parameters = descriptors(); while (parameters != null) { for (final GeneralParameterDescriptor param : parameters) { if (param instanceof ParameterDescriptor) { if (nameMatches(param, name)) { return (ParameterDescriptor) param; break; parameters = subgroups.remove(0).descriptors();
/** Constructs an {@code "Interpolate"} operation. */ public Interpolate() { super( new DefaultParameterDescriptorGroup( Citations.OGC, "Interpolate", new ParameterDescriptor[] {SOURCE_0, TYPE})); }
/** * Work around for RFE #4093999 in Sun's bug database ("Relax constraint on placement of * this()/super() call in constructors"). * * @throws IllegalStateException if the number of {@linkplain ParameterValue parameter} * occurences doesn't matches the number declared in the {@linkplain * ParameterDescriptorGroup descriptor}. */ private static ParameterDescriptorGroup createDescriptor( final Map<String, ?> properties, final GeneralParameterValue[] values) { ensureNonNull("values", values); final Map<GeneralParameterDescriptor, int[]> occurences = new LinkedHashMap<GeneralParameterDescriptor, int[]>( Math.round(values.length / 0.75f) + 1, 0.75f); for (int i = 0; i < values.length; i++) { ensureNonNull("values", values, i); occurences.put(values[i].getDescriptor(), new int[1]); // The value 'int[1]' will be used by 'ensureValidOccurs' } ensureValidOccurs(values, occurences); final Set<GeneralParameterDescriptor> descriptors = occurences.keySet(); return new DefaultParameterDescriptorGroup( properties, descriptors.toArray(new GeneralParameterDescriptor[descriptors.size()])); }
/** Constructs a default {@code "SelectSampleDimension"} operation. */ public SelectSampleDimension() { super( new DefaultParameterDescriptorGroup( "SelectSampleDimension", new ParameterDescriptor[] { SOURCE_0, SAMPLE_DIMENSIONS, VISIBLE_SAMPLE_DIMENSION })); }
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 })); }
/** Constructs a {@code "Resample"} operation. */ public Resample() { super( new DefaultParameterDescriptorGroup( Citations.OGC, "Resample", new ParameterDescriptor[] { SOURCE_0, INTERPOLATION_TYPE, COORDINATE_REFERENCE_SYSTEM, GRID_GEOMETRY, BACKGROUND_VALUES })); }
/** 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; }
/** * 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)); }
/** Constructs a default {@code "Crop"} operation. */ public Crop() { super( new DefaultParameterDescriptorGroup( Citations.JAI, "CoverageCrop", new ParameterDescriptor[] { SOURCE_0, CROP_ENVELOPE, CROP_ROI, ROI_OPTIMISATION_TOLERANCE, FORCE_MOSAIC, NODATA, DEST_NODATA })); }
/** 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})); }
/** * Constructs a parameter group from a set of alias. The parameter group is identified by codes * provided by one or more authorities. Common authorities are {@link Citations#OGC OGC} and * {@link Citations#EPSG EPSG} for example. * * <p>Special rules: * * <ul> * <li>The first entry in the {@code identifiers} array is the {@linkplain * ParameterDescriptorGroup#getName primary name}. * <li>If a an entry do not implements the {@link GenericName} interface, it is an {@linkplain * ParameterDescriptorGroup#getIdentifiers identifiers}. * <li>All others are {@linkplain ParameterDescriptorGroup#getAlias aliases}. * </ul> * * @param identifiers The operation identifiers. Most contains at least one entry. * @param parameters The set of parameters, or {@code null} or an empty array if none. * @return The descriptor for the given identifiers. */ protected static ParameterDescriptorGroup createDescriptorGroup( final ReferenceIdentifier[] identifiers, final GeneralParameterDescriptor[] parameters) { return new DefaultParameterDescriptorGroup(toMap(identifiers), parameters); }
/** 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})); }
public ParameterDescriptorGroup getParameters() { Param params[] = getParametersInfo(); DefaultParameterDescriptor parameters[] = new DefaultParameterDescriptor[params.length]; for (int i = 0; i < params.length; i++) { parameters[i] = new ParamDescriptor(params[i]); } Map properties = new HashMap(); properties.put("name", getDisplayName()); properties.put("remarks", getDescription()); return new DefaultParameterDescriptorGroup(properties, parameters); }
private void setInfo() { // information for this format HashMap<String, String> info = new HashMap<String, String>(); info.put("name", "WorldImage"); info.put("description", "A raster file accompanied by a spatial data file"); info.put("vendor", "Geotools"); info.put("docURL", "http://www.geotools.org/WorldImageReader+formats"); info.put("version", "1.0"); mInfo = info; // reading parameters readParameters = new ParameterGroup( new DefaultParameterDescriptorGroup( mInfo, new GeneralParameterDescriptor[] { READ_GRIDGEOMETRY2D, })); // writing parameters writeParameters = new ParameterGroup( new DefaultParameterDescriptorGroup( mInfo, new GeneralParameterDescriptor[] {FORMAT})); }
sourceDimensions, targetDimensions, new DefaultParameterDescriptorGroup(properties, descriptors)); returnValue = ensureSingleton(method, returnValue, code);
/** Sets the metadata information. */ private void setInfo() { final HashMap<String, String> info = new HashMap<String, String>(); info.put("name", "GRIB"); info.put("description", "GRIB store plugin"); info.put("vendor", "Geotools"); info.put("docURL", ""); info.put("version", "1.0"); mInfo = info; // reading parameters readParameters = new ParameterGroup( new DefaultParameterDescriptorGroup( mInfo, new GeneralParameterDescriptor[] { READ_GRIDGEOMETRY2D, TIME, ELEVATION, FILTER, })); // reading parameters writeParameters = null; }
/** * Constructs a default {@code "Crop"} operation. */ public Crop() { super(new DefaultParameterDescriptorGroup(Citations.GEOTOOLS, "CoverageCrop", new ParameterDescriptor[] { SOURCE_0, CROP_ENVELOPE, CROP_ROI, ROI_OPTIMISATION_TOLERANCE })); }