org.geotools.factory.Hints.remove()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(108)

本文整理了Java中org.geotools.factory.Hints.remove()方法的一些代码示例,展示了Hints.remove()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hints.remove()方法的具体详情如下:
包路径:org.geotools.factory.Hints
类名称:Hints
方法名:remove

Hints.remove介绍

[英]Removes the specified hints from the set of GeoTools#getDefaultHints.
[中]从GeoTools#GetDefaultHits集合中删除指定的提示。

代码示例

代码示例来源:origin: org.geotools/gt2-coverage

/**
 * 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);
}

代码示例来源:origin: org.geotools/gt-metadata

/**
 * 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;
}

代码示例来源:origin: org.geotools/gt2-metadata

/**
 * 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;
}

代码示例来源:origin: org.geoserver/gs-wms

@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);
}

代码示例来源:origin: org.geotools/gt-geotiff

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,

代码示例来源:origin: org.geotools/gt-geotiff

this.hints.remove(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER);
this.hints.add(new Hints(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER,Boolean.TRUE));

代码示例来源:origin: org.geotools/gt-coverage

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,

代码示例来源:origin: org.geotools/gt-metadata

if (hints.remove(key) != hint) {

代码示例来源:origin: org.geotools/gt2-metadata

if (hints.remove(key) != hint) {

代码示例来源:origin: org.geoserver.extension/gs-vectortiles

query.getHints().remove(Hints.SCREENMAP);

代码示例来源:origin: org.geoserver.community/gs-vectortiles

query.getHints().remove(Hints.SCREENMAP);

代码示例来源:origin: org.geotools/gt-data

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;
}

相关文章