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

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

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

Hints.clone介绍

[英]Returns a new map of hints with the same content than this map.
[中]返回与此映射内容相同的新提示映射。

代码示例

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

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

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

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

代码示例来源:origin: org.geotools/gt-imageio-ext-gdal

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

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

final Hints newHints = (Hints) hints.clone();

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

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

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

final RenderingHints localHints = this.hints.clone(); 
localHints.add(new RenderingHints(JAI.KEY_IMAGE_LAYOUT, layout));

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

newHints= (Hints) hints.clone();
    final ImageLayout layout = new ImageLayout();
    layout.setTileGridXOffset(0);

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

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

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

final Hints localMergeHints=this.hints.clone();
if(hints!=null)
  localMergeHints.add(hints);

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

final Hints newHints = (Hints) hints.clone();

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

hints = hints.clone();
  hints.put(JAI.KEY_IMAGE_LAYOUT, layout);
} else {

相关文章