本文整理了Java中org.geotools.util.factory.Hints.clone()
方法的一些代码示例,展示了Hints.clone()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hints.clone()
方法的具体详情如下:
包路径:org.geotools.util.factory.Hints
类名称:Hints
方法名:clone
[英]Returns a new map of hints with the same content than this map.
[中]返回与此映射内容相同的新提示映射。
代码示例来源:origin: geotools/geotools
/**
* 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: geotools/geotools
/** Returns a copy of the hints specified by the user at construction time. */
private Hints getHints() {
if (hints.isEmpty()) {
return ReferencingFactoryFinder.EMPTY_HINTS;
} else {
// Clones EMPTY_HINTS as a trick for getting a StricHints instance.
final Hints hints = ReferencingFactoryFinder.EMPTY_HINTS.clone();
hints.putAll(this.hints);
return hints;
}
}
代码示例来源:origin: geotools/geotools
/**
* 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) {
this.hints = hints != null ? hints.clone() : GeoTools.getDefaultHints().clone();
// various authority related factories
allAuthoritiesFactory = new AllAuthoritiesFactory(this.hints);
// various factories
datumObjFactory = ReferencingFactoryFinder.getDatumFactory(this.hints);
mtFactory = ReferencingFactoryFinder.getMathTransformFactory(this.hints);
}
代码示例来源:origin: geotools/geotools
/**
* 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: geotools/geotools
private GridCoverage2D renderCoverage(
final GridCoverage2D gridCoverage,
final RasterSymbolizer symbolizer,
final Interpolation interpolation,
final Color background,
final int tileSizeX,
final int tileSizeY)
throws FactoryException {
final Hints oldHints = this.hints.clone();
setupTilingHints(tileSizeX, tileSizeY);
setupInterpolationHints(interpolation);
try {
return renderCoverage(
gridCoverage,
symbolizer,
GridCoverageRendererUtilities.colorToArray(background));
} catch (Exception e) {
throw new FactoryException(e);
} finally {
this.hints = oldHints;
}
}
代码示例来源:origin: geotools/geotools
this.hints = hints.clone();
代码示例来源:origin: geotools/geotools
/**
* 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.getCoordinateReferenceSystem();
this.coverageName = reader.getCoverageName();
this.coverageGridToWorld2D = (MathTransform2D) reader.getRaster2Model();
this.coverageFullResolution = reader.getHighestRes();
this.hints = reader.getHints().clone();
this.multiLevelRoi = reader.getMultiLevelRoi();
if (layout != null) {
this.hints.add(new RenderingHints(JAI.KEY_IMAGE_LAYOUT, layout));
}
}
代码示例来源:origin: geotools/geotools
inputWorker.getRenderedImage().getWidth(),
inputWorker.getRenderedImage().getHeight()));
RenderingHints localHints = hints.clone();
localHints.add(new RenderingHints(JAI.KEY_IMAGE_LAYOUT, layout));
代码示例来源:origin: geotools/geotools
final Hints localMergeHints = this.hints.clone();
if (hints != null) localMergeHints.add(hints);
代码示例来源:origin: geotools/geotools
Transparency.OPAQUE,
DataBuffer.TYPE_BYTE));
RenderingHints localHints = hints.clone();
localHints.add(new RenderingHints(JAI.KEY_IMAGE_LAYOUT, layout));
代码示例来源:origin: geotools/geotools
final Hints newHints = hints.clone();
代码示例来源:origin: geotools/geotools
newHints = hints.clone();
final ImageLayout layout = new ImageLayout();
layout.setTileGridXOffset(0);
代码示例来源:origin: geotools/geotools
final RenderedImage source = (RenderedImage) parameters.getSource(0);
if (hints == null) {
hints = GeoTools.getDefaultHints().clone();
代码示例来源:origin: geotools/geotools
hints = hints.clone();
hints.put(JAI.KEY_IMAGE_LAYOUT, layout);
} else {
内容来源于网络,如有侵权,请联系作者删除!