本文整理了Java中org.geotools.factory.Hints.get()
方法的一些代码示例,展示了Hints.get()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hints.get()
方法的具体详情如下:
包路径:org.geotools.factory.Hints
类名称:Hints
方法名:get
[英]Returns a copy of the system hints. This is for GeoTools#getDefaultHints implementation only.
[中]返回系统提示的副本。这仅适用于GeoTools#GetDefaultHits实现。
代码示例来源:origin: org.geotools/gt2-jts-wrapper
/**
* Hints constructor for FactoryRegistry
*/
public JTSAggregateFactory( Hints hints ){
this( (CoordinateReferenceSystem) hints.get( Hints.CRS ) );
}
/**
代码示例来源:origin: org.geotools/gt-main
static SimpleFeatureReader getDelegateReader(SimpleFeatureReader reader, Query query)
throws IOException {
Hints hints = query.getHints();
int maxFeatures = 1000;
if (hints != null && hints.get(Hints.MAX_MEMORY_SORT) != null) {
maxFeatures = (Integer) hints.get(Hints.MAX_MEMORY_SORT);
} else if (Hints.getSystemDefault(Hints.MAX_MEMORY_SORT) != null) {
maxFeatures = (Integer) Hints.getSystemDefault(Hints.MAX_MEMORY_SORT);
}
return getDelegateReader(reader, query.getSortBy(), maxFeatures);
}
代码示例来源:origin: org.geotools/gt2-jts-wrapper
/**
* Hints constructor for FactoryRegistry
*/
public JTSGeometryFactory( Hints hints ){
this( (CoordinateReferenceSystem) hints.get( Hints.CRS ) );
}
/**
代码示例来源:origin: org.geotools/gt-jts-wrapper
/**
* Hints constructor for FactoryRegistry
*/
public JTSGeometryFactory( Hints hints ){
this( (CoordinateReferenceSystem) hints.get( Hints.CRS ) );
}
/**
代码示例来源:origin: org.geotools/gt2-jts-wrapper
/**
* Hints constructor for FactoryRegistry
*/
public JTSComplexFactory( Hints hints ){
this( (CoordinateReferenceSystem) hints.get( Hints.CRS ) );
}
/**
代码示例来源:origin: org.geotools/gt-coverage
/**
* Returns a rendering hint.
*
* @param key The hint key (e.g. {@link Hints#JAI_INSTANCE}).
* @return The hint value for the specified key, or {@code null} if there is no hint for the
* specified key.
*/
public final Object getRenderingHint(final RenderingHints.Key key) {
return hints.get(key);
}
代码示例来源:origin: org.geotools/gt2-coverage
/**
* Returns a rendering hint.
*
* @param key The hint key (e.g. {@link Hints#JAI_INSTANCE}).
* @return The hint value for the specified key, or {@code null} if there is no hint for the
* specified key.
*/
public final Object getRenderingHint(final RenderingHints.Key key) {
return hints.get(key);
}
代码示例来源:origin: org.geotools/gt-jts-wrapper
/**
* Hints constructor for FactoryRegistry
*/
public JTSComplexFactory( Hints hints ){
this( (CoordinateReferenceSystem) hints.get( Hints.CRS ) );
}
/**
代码示例来源:origin: org.geotools/gt-geopkg
public void setHints(Hints hints) {
if (hints != null) {
this.simplificationDistance = (Number) hints.get(Hints.GEOMETRY_DISTANCE);
}
this.hints = hints;
}
代码示例来源:origin: org.geotools/gt-jts-wrapper
/**
* Hints constructor for FactoryRegistry
*/
public JTSAggregateFactory( Hints hints ){
this( (CoordinateReferenceSystem) hints.get( Hints.CRS ) );
}
/**
代码示例来源:origin: org.geotools/gt-main
/**
* Extracts the SRID from the hints, or returns {@code 0} if none.
*/
private static int getSRID(final Hints hints) {
if (hints != null) {
final Integer SRID = (Integer) hints.get(Hints.JTS_SRID);
if (SRID != null) {
return SRID.intValue();
}
}
return 0;
}
代码示例来源:origin: org.geotools/gt2-main
/**
* Extracts the SRID from the hints, or returns {@code 0} if none.
*/
private static int getSRID(final Hints hints) {
if (hints != null) {
final Integer SRID = (Integer) hints.get(Hints.JTS_SRID);
if (SRID != null) {
return SRID.intValue();
}
}
return 0;
}
代码示例来源:origin: org.geotools/gt-wfs-ng
private GeometryFactory findGeometryFactory(Hints hints) {
GeometryFactory geomFactory = (GeometryFactory) hints.get(Hints.JTS_GEOMETRY_FACTORY);
if (geomFactory == null) {
CoordinateSequenceFactory seqFac;
seqFac = (CoordinateSequenceFactory) hints.get(Hints.JTS_COORDINATE_SEQUENCE_FACTORY);
if (seqFac == null) {
seqFac = PackedCoordinateSequenceFactory.DOUBLE_FACTORY;
}
geomFactory = new GeometryFactory(seqFac);
}
return geomFactory;
}
代码示例来源:origin: org.geotools/gt-coverage
/**
* Gets the JAI instance to use from the rendering hints.
*/
private static JAI getJAI(final Hints hints) {
if (hints != null) {
final Object property = hints.get(Hints.JAI_INSTANCE);
if (property instanceof JAI) {
return (JAI) property;
}
}
return JAI.getDefaultInstance();
}
代码示例来源:origin: org.geotools/gt-feature-pregeneralized
private Double getRequestedDistance(Query query) {
Double result = (Double) query.getHints().get(Hints.GEOMETRY_DISTANCE);
if (result == null) {
log.warning("No hint for geometry distance in query, fallback to base feature" );
}
else {
log.info("Hint geometry distance: "+result);
}
return result;
}
代码示例来源:origin: org.geotools/gt-wms
protected static boolean isGeotoolsLongitudeFirstAxisOrderForced() {
return Boolean.getBoolean(GeoTools.FORCE_LONGITUDE_FIRST_AXIS_ORDER)
|| GeoTools.getDefaultHints().get(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER)
== Boolean.TRUE;
}
/** Sets BBOX and SRS using the provided Envelope. */
代码示例来源:origin: org.geotools/gt-wfs
public Map<String, String> getVendorParameter() {
if(query.getHints() != null) {
return (Map<String, String>) query.getHints().get(WFSDataStore.WFS_VENDOR_PARAMETERS);
} else {
return null;
}
}
代码示例来源:origin: org.geotools/gt-metadata
/**
* Utility method used to produce cache based on provide Hint
*/
public static ObjectCache create( Hints hints )
throws FactoryRegistryException {
if( hints == null ) hints = GeoTools.getDefaultHints();
String policy = (String) hints.get(Hints.CACHE_POLICY);
int limit = Hints.CACHE_LIMIT.toValue(hints);
return create( policy, limit );
}
/**
代码示例来源:origin: org.geotools/gt-jdbc
protected void encodeGeometryColumn(GeometryDescriptor gatt, String prefix, StringBuffer sql,Hints hints) {
int srid = getDescriptorSRID(gatt);
if (isGeneralizationRequired(hints, gatt)==true) {
Double distance = (Double) hints.get(Hints.GEOMETRY_GENERALIZATION);
dialect.encodeGeometryColumnGeneralized(gatt, prefix, srid,sql,distance);
return;
}
if (isSimplificationRequired(hints, gatt)==true) {
Double distance = (Double) hints.get(Hints.GEOMETRY_SIMPLIFICATION);
dialect.encodeGeometryColumnSimplified(gatt, prefix, srid, sql,distance);
return;
}
dialect.encodeGeometryColumn(gatt,prefix,srid, hints, sql);
}
代码示例来源:origin: locationtech/geowave
private ReferencedEnvelope getEnvelope(final Query query)
throws TransformException, FactoryException {
if (query.getHints().containsKey(SubsampleProcess.OUTPUT_BBOX)) {
return ((ReferencedEnvelope) query.getHints().get(SubsampleProcess.OUTPUT_BBOX)).transform(
reader.getFeatureType().getCoordinateReferenceSystem(),
true);
}
return null;
}
内容来源于网络,如有侵权,请联系作者删除!