/** * Removes the GRID_COVERAGE_PROCESSOR hint. The {@link AbstractOperation#getProcessor} method * will automatically returns the default instance when this hint is not defined. Removing this * hint provides three advantages for the common case when the default processor is used: * * <ul> * <li>Avoid a strong reference to this processor in {@link RenderedImage} properties.</li> * <li>Avoid serialization of this processor when a {@link RenderedImage} is serialized.</li> * <li>Allows {@link AbstractOperation#getProcessor} to returns the {@link BufferedProcessor} * instance instead of this instance.</li> * </ul> */ void setAsDefault() { hints.remove(Hints.GRID_COVERAGE_PROCESSOR); }
/** * Removes the specified hints from the set of * {@linkplain GeoTools#getDefaultHints default hints}. * * @param key The hints key that needs to be removed. * @return The value to which the key had previously been mapped, * or {@code null} if the key did not have a mapping. * * @since 2.4 */ public static Object removeSystemDefault(final RenderingHints.Key key) { final boolean changed; final Object old; synchronized (GLOBAL) { changed = ensureSystemDefaultLoaded(); old = GLOBAL.remove(key); } if (changed || old != null) { GeoTools.fireConfigurationChanged(); } return old; }
/** * Removes the specified hints from the set of * {@linkplain GeoTools#getDefaultHints default hints}. * * @param key The hints key that needs to be removed. * @return The value to which the key had previously been mapped, * or {@code null} if the key did not have a mapping. * * @since 2.4 */ public static Object removeSystemDefault(final RenderingHints.Key key) { final boolean changed; final Object old; synchronized (GLOBAL) { changed = ensureSystemDefaultLoaded(); old = GLOBAL.remove(key); } if (changed || old != null) { GeoTools.fireConfigurationChanged(); } return old; }
@Override public FeatureCollection getFeatures(Query query) throws IOException { Query q = new Query(query); // we made the renderer believe we support the screenmap, but we don't want // it really be applied, so remove it if (query.getHints() != null) { Hints newHints = new Hints(query.getHints()); newHints.remove(Hints.SCREENMAP); q.setHints(newHints); } if (propertyNames == null || propertyNames.length == 0) { // no property selection, we return them all q.setProperties(Query.ALL_PROPERTIES); } else { // properties got selected, mix them with the ones needed by the renderer if (query.getPropertyNames() == null || query.getPropertyNames().length == 0) { q.setPropertyNames(propertyNames); } else { Set<String> names = new LinkedHashSet<>(Arrays.asList(propertyNames)); names.addAll(Arrays.asList(q.getPropertyNames())); String[] newNames = names.toArray(new String[names.size()]); q.setPropertyNames(newNames); } } return super.getFeatures(q); }
if (hints != null) { hints.remove(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER); this.hints.add(hints); this.hints.add(new Hints(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER,
this.hints.remove(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER); this.hints.add(new Hints(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER,Boolean.TRUE));
localHints.remove(JAI.KEY_IMAGE_LAYOUT); image = ScaleDescriptor.create(source, 1.0f, 1.0f, (float) Math.round(tx.getTranslateX()), (float) Math.round(tx.getTranslateY()), interpolation,
if (hints.remove(key) != hint) {
if (hints.remove(key) != hint) {
query.getHints().remove(Hints.SCREENMAP);
query.getHints().remove(Hints.SCREENMAP);
private void fillCache(Query query) throws IOException { Query cloned = new DefaultQuery(query); cloned.getHints().remove(Hints.GEOMETRY_DISTANCE); FeatureCollection features = wrapped.getFeatures(cloned); FeatureIterator fi = features.features(); index = null; STRtree newIndex = new STRtree(); while (fi.hasNext()) { // consider turning all geometries into packed ones, to save space Feature f = fi.next(); newIndex.insert(ReferencedEnvelope.reference(f.getBounds()), f); } fi.close(); index = newIndex; cachedQuery = query; cachedSchema = (SimpleFeatureType) features.getSchema(); cachedBounds = getEnvelope(query.getFilter()); dirty = false; }