@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()]))); }
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 })); }
/** * 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. */ 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; }
/** Sets the metadata information. */ private void setInfo() { HashMap<String, String> info = new HashMap<String, String>(); info.put("name", "ImageMosaicJDBC"); info.put("description", "Image mosaicking/pyramidal jdbc 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, OUTPUT_TRANSPARENT_COLOR, BACKGROUND_COLOR })); // reading parameters writeParameters = null; }
/** 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})); }
/** * 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 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. */ 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})); }
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})); }
/** Sets the metadata information. */ private void setInfo() { Map<String, String> info = new HashMap<String, String>(); info.put("name", "ArcSDE Raster"); info.put("description", "ArcSDE Raster Format"); info.put("vendor", "Geotools "); info.put("docURL", ""); info.put("version", GeoTools.getVersion().toString()); mInfo = info; readParameters = new ParameterGroup( new DefaultParameterDescriptorGroup( mInfo, new GeneralParameterDescriptor[] { READ_GRIDGEOMETRY2D, OVERVIEW_POLICY })); }
/** Returns the parameters for this math transform. */ @Override public ParameterValueGroup getParameterValues() { return new ParameterGroup( getParameterDescriptors(), new ParameterValue[] {new Parameter(Provider.ORDER, nmax)}); }
@Override public ParameterValueGroup getReadParameters() { HashMap<String, String> info = new HashMap<String, String>(); info.put("name", "bandTester"); info.put("description", "desc"); info.put("vendor", "vendor"); info.put("docURL", "http://www.geotools.org"); info.put("version", "1.0"); List<GeneralParameterDescriptor> params = new ArrayList<GeneralParameterDescriptor>(); params.add(AbstractGridFormat.BANDS); return new ParameterGroup( new DefaultParameterDescriptorGroup( info, params.toArray(new GeneralParameterDescriptor[params.size()]))); } };
@Override public ParameterValueGroup getReadParameters() { HashMap<String, String> info = new HashMap<String, String>(); info.put("name", "bandTester"); info.put("description", "desc"); info.put("vendor", "vendor"); info.put("docURL", "http://www.geotools.org"); info.put("version", "1.0"); List<GeneralParameterDescriptor> params = new ArrayList<GeneralParameterDescriptor>(); params.add(AbstractGridFormat.BANDS); return new ParameterGroup( new DefaultParameterDescriptorGroup( info, params.toArray(new GeneralParameterDescriptor[params.size()]))); } };
/** * 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); }
/** * 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) }); }
/** * 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) }); }
/** * 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 lat_diff_file = new Parameter(Provider.LAT_DIFF_FILE); lat_diff_file.setValue(latGridName); final ParameterValue long_diff_file = new Parameter(Provider.LONG_DIFF_FILE); long_diff_file.setValue(longGridName); return new ParameterGroup( getParameterDescriptors(), new GeneralParameterValue[] {lat_diff_file, long_diff_file}); }
/** Returns the parameter values for this math transform. */ @Override public ParameterValueGroup getParameterValues() { if (warp instanceof WarpPolynomial) { final WarpPolynomial poly = (WarpPolynomial) warp; final ParameterValue[] p = new ParameterValue[7]; int c = 0; p[c++] = new Parameter( WarpTransform2DProvider.DEGREE, Integer.valueOf(poly.getDegree())); p[c++] = new Parameter(WarpTransform2DProvider.X_COEFFS, poly.getXCoeffs()); p[c++] = new Parameter(WarpTransform2DProvider.Y_COEFFS, poly.getYCoeffs()); float s; if ((s = poly.getPreScaleX()) != 1) p[c++] = new Parameter(WarpTransform2DProvider.PRE_SCALE_X, s); if ((s = poly.getPreScaleY()) != 1) p[c++] = new Parameter(WarpTransform2DProvider.PRE_SCALE_Y, s); if ((s = poly.getPostScaleX()) != 1) p[c++] = new Parameter(WarpTransform2DProvider.POST_SCALE_X, s); if ((s = poly.getPostScaleY()) != 1) p[c++] = new Parameter(WarpTransform2DProvider.POST_SCALE_Y, s); return new ParameterGroup(getParameterDescriptors(), XArray.resize(p, c)); } else { return super.getParameterValues(); } }
/** * Returns the parameters for this math transform. * * @return The parameters for this math transform. */ @Override public ParameterValueGroup getParameterValues() { final ParameterValue<Integer> dim = new Parameter<Integer>(Provider.DIM); dim.setValue(getSourceDimensions()); return new ParameterGroup( getParameterDescriptors(), new ParameterValue[] { dim, new FloatParameter(Provider.DX, dx), new FloatParameter(Provider.DY, dy), new FloatParameter(Provider.DZ, dz), new FloatParameter(Provider.SRC_SEMI_MAJOR, a), new FloatParameter(Provider.SRC_SEMI_MINOR, b), new FloatParameter(Provider.TGT_SEMI_MAJOR, a + da), new FloatParameter(Provider.TGT_SEMI_MINOR, b + db) }); }