/** * Default constructor that gives users the possibility * * @param maxSources * maximum number of sources allowed for this node. * @param hints * instance of {@link Hints} class to control creation of * internal factories. It can be <code>null</code>. */ public StyleVisitorCoverageProcessingNodeAdapter(int maxSources, Hints hints, InternationalString name, InternationalString description) { adaptee = new BaseCoverageProcessingNode(maxSources, hints != null ? (Hints) hints.clone() : null, name, description) { protected GridCoverage execute() { synchronized (StyleVisitorCoverageProcessingNodeAdapter.this) { return StyleVisitorCoverageProcessingNodeAdapter.this .execute(); } } }; }
/** * Default constructor that gives users the possibility * * @param maxSources * maximum number of sources allowed for this node. * @param hints * instance of {@link Hints} class to control creation of * internal factories. It can be <code>null</code>. * @param description * @param name */ public BaseCoverageProcessingNode(int maxSources, Hints hints, InternationalString name, InternationalString description) { ensureNotNull(name, "CoverageProcessingNode name "); ensureNotNull(description, "CoverageProcessingNode descripion "); maximumNumberOfSources = maxSources; this.hints = hints != null ? (Hints) hints.clone() : null; this.coverageFactory = CoverageFactoryFinder.getGridCoverageFactory(hints); this.name = name; this.description = description; }
/** * Set the main parameters of this coverage request, getting basic * information from the reader. * * @param reader * a {@link BaseGridCoverage2DReader} from where to get basic * coverage properties as well as basic parameters to be used * by the incoming read operations. */ private void setBaseParameters(final BaseGridCoverage2DReader reader) { input = reader.getInputFile(); this.coverageEnvelope = reader.getOriginalEnvelope().clone(); this.coverageRasterArea = ((GridEnvelope2D)reader.getOriginalGridRange()); this.coverageCRS = reader.getCrs(); this.coverageName = reader.getCoverageName(); this.coverageGridToWorld2D = (MathTransform2D) reader.getRaster2Model(); this.coverageFullResolution = reader.getHighestRes(); this.hints = reader.getHints().clone(); if (layout != null) { this.hints.add(new RenderingHints(JAI.KEY_IMAGE_LAYOUT, layout)); } }
final Hints newHints = (Hints) hints.clone();
/** * Creates a new instance of GeoTiffMetadata2CRSAdapter * * @param hints * a map of hints to locate the authority and object factories. * (can be null) */ public GeoTiffMetadata2CRSAdapter(Hints hints) { final Hints tempHints = hints != null ? new Hints(hints) : DEFAULT_HINTS; this.hints = (Hints) tempHints.clone(); allAuthoritiesFactory = hints != null ? new AllAuthoritiesFactory(this.hints): DEFAULT_ALLAUTHORITIES_FACTORY; // factory = new ThreadedEpsgFactory(hints); datumObjFactory = ReferencingFactoryFinder.getDatumFactory(this.hints); crsFactory = ReferencingFactoryFinder.getCRSFactory(this.hints); csFactory = ReferencingFactoryFinder.getCSFactory(this.hints); tempHints.put(Hints.DATUM_AUTHORITY_FACTORY, allAuthoritiesFactory); tempHints.put(Hints.CS_FACTORY, csFactory); tempHints.put(Hints.CRS_FACTORY, crsFactory); tempHints.put(Hints.MATH_TRANSFORM_FACTORY, mtFactory); factories = ReferencingFactoryContainer.instance(tempHints); }
final RenderingHints localHints = this.hints.clone(); localHints.add(new RenderingHints(JAI.KEY_IMAGE_LAYOUT, layout));
newHints= (Hints) hints.clone(); final ImageLayout layout = new ImageLayout(); layout.setTileGridXOffset(0);
if (LOGGER.isLoggable(Level.FINE)) LOGGER.fine("Using interpolation "+interpolation); final Hints localHints = this.hints.clone(); if(interpolation instanceof InterpolationNearest){ localHints.add(new RenderingHints(JAI.KEY_REPLACE_INDEX_COLOR_MODEL, Boolean.FALSE));
final Hints localMergeHints=this.hints.clone(); if(hints!=null) localMergeHints.add(hints);
final Hints newHints = (Hints) hints.clone();
hints = hints.clone(); hints.put(JAI.KEY_IMAGE_LAYOUT, layout); } else {