| java.lang.Object java.awt.RenderingHints org.geotools.factory.Hints
All known Subclasses: org.geotools.factory.StrictHints,
Hints | public class Hints extends RenderingHints (Code) | | A set of hints providing control on factories to be used. Those hints are typically used by
renderers or
for example. They provides a way to control low-level details. Example:
CoordinateOperationFactory myFactory = &hellip
Hints hints = new Hints(Hints.
, myFactory);
AbstractProcessor processor = new DefaultProcessor(hints);
Any hint mentioned by this class is considered to be API, failure to make
use of a hint by a GeoTools factory implementation is considered a bug (as
it will prevent the use of this library for application specific tasks).
When hints are used in conjuction with the
we have the complete geotools plugin system. By using hints to
allow application code to effect service discovery we allow client code to
retarget the geotools library for their needs.
since: 2.1 version: $Id: Hints.java 29443 2008-02-25 10:04:01Z jgarnett $ author: Martin Desruisseaux author: Jody Garnett |
Inner Class :final public static class ClassKey extends Key | |
Inner Class :final public static class FileKey extends Key | |
Inner Class :final public static class IntegerKey extends Key | |
Inner Class :final public static class OptionKey extends Key | |
Inner Class :final static class DataSourceKey extends Key | |
Field Summary | |
final public static ClassKey | ATTRIBUTE_TYPE_FACTORY The
org.geotools.feature.AttributeTypeFactory instance to use. | final public static IntegerKey | AUTHORITY_MAX_ACTIVE The maximum number of active AuthorityFactories.
This hint is treated as an absolute LIMIT for AbstractAuthorityMediator
instances such as as HsqlDialectEpsgMediator. | final public static IntegerKey | AUTHORITY_MAX_IDLE The number of idle AuthorityFactories.
This hint is treated as a recommendation for AbstractAuthorityMediator
instances such as HsqlDialectEpsgMediator. | final public static IntegerKey | AUTHORITY_MIN_EVICT_IDLETIME When the evictor is run, if more time (in milliseconds) than the value in
AUTHORITY_MIN_EVICT_IDLETIME has passed, then the worker is destroyed. | final public static IntegerKey | AUTHORITY_MIN_IDLE Minimum number of objects required before the evictor will begin
removing objects. | final public static IntegerKey | AUTHORITY_SOFTMIN_EVICT_IDLETIME When the evictor is run, workers which have been idle for more than this
value will be destroyed iff the number of idle workers exceeds
AUTHORITY_MIN_IDLE. | final public static IntegerKey | AUTHORITY_TIME_BETWEEN_EVICTION_RUNS Time in milliseconds to wait between eviction runs. | final public static IntegerKey | BUFFER_LIMIT The recommended maximum number of referencing objects to hold in a
. | final public static OptionKey | BUFFER_POLICY Policy to use for caching referencing objects. | final public static ClassKey | COORDINATE_OPERATION_AUTHORITY_FACTORY The
org.opengis.referencing.operation.CoordinateOperationAuthorityFactory instance
to use. | final public static ClassKey | COORDINATE_OPERATION_FACTORY The
org.opengis.referencing.operation.CoordinateOperationFactory instance to use. | final public static FileKey | CRS_AUTHORITY_EXTRA_DIRECTORY Used to direct WKT CRS Authority to a directory containing extra definitions.
The value should be an instance of
File or
String refering to
an existing directory.
Filenames in the supplied directory should be of the form
authority.properties where authority
is the authority name space to use. | final public static ClassKey | CRS_AUTHORITY_FACTORY The
org.opengis.referencing.crs.CRSAuthorityFactory instance to use. | final public static ClassKey | CRS_FACTORY The
org.opengis.referencing.crs.CRSFactory instance to use. | final public static ClassKey | CS_AUTHORITY_FACTORY The
org.opengis.referencing.cs.CSAuthorityFactory instance to use. | final public static ClassKey | CS_FACTORY The
org.opengis.referencing.cs.CSFactory instance to use. | final public static ClassKey | DATUM_AUTHORITY_FACTORY The
org.opengis.referencing.datum.DatumAuthorityFactory instance to use. | final public static ClassKey | DATUM_FACTORY The
org.opengis.referencing.datum.DatumFactory instance to use. | final public static OptionKey | DATUM_SHIFT_METHOD The preferred datum shift method to use for
. | final public static Key | DEFAULT_COORDINATE_REFERENCE_SYSTEM The default
org.opengis.referencing.crs.CoordinateReferenceSystem to use. | final public static Key | EPSG_DATA_SOURCE The
name to lookup from JNDI when
initializing the
.
Possible values:
-
String - used with JNDI to locate datasource.
| final public static Key | FEATURE_2D Request that the features returned by the feature collections should
be 2D only, can be used to prevent the request of the third ordinate
when only two are going to be used. | final public static ClassKey | FEATURE_COLLECTIONS The
org.geotools.feature.FeatureCollections instance to use. | final public static Key | FEATURE_DETACHED | final public static ClassKey | FEATURE_LOCK_FACTORY The
org.geotools.data.FeatureLockFactory instance to use. | final public static ClassKey | FEATURE_TYPE_FACTORY The
org.geotools.feature.FeatureTypeFactory instance to use. | final public static Key | FEATURE_TYPE_FACTORY_NAME Used to provide the type name for the returned
org.geotools.feature.FeatureTypeFactory . | final public static ClassKey | FILTER_FACTORY The
org.opengis.filter.FilterFactory instance to use. | final public static Key | FORCE_AXIS_ORDER_HONORING Applies the
Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER hint to some factories that usually
ignore it. | final public static Key | FORCE_LONGITUDE_FIRST_AXIS_ORDER Tells if the
created by an
should be forced to (longitude,latitude) axis order. | final public static Key | FORCE_STANDARD_AXIS_DIRECTIONS Tells if the
created by an
should be forced to standard
.
If
true , then
axis
directions are forced to
,
axis directions are forced to
, etc.
If
false , then the axis directions are left unchanged.
This hint shall be passed to the
(...)
method. | final public static Key | FORCE_STANDARD_AXIS_UNITS Tells if the
created by an
should be forced to standard
.
If
true , then all angular units are forced to degrees and linear units to meters.
If
false , then the axis units are left unchanged.
This hint shall be passed to the
(...) method. | final public static Key | GRID_COVERAGE_PROCESSOR The
org.opengis.coverage.processing.GridCoverageProcessor instance to use. | final public static Key | IGNORE_COVERAGE_OVERVIEW Tells to the
org.opengis.coverage.grid.GridCoverageReader instances to ignore
the built-in overviews when creating a
org.opengis.coverage.grid.GridCoverage object during a read. | final public static Key | JAI_INSTANCE The
javax.media.jai.JAI instance to use. | final public static ClassKey | JTS_COORDINATE_SEQUENCE_FACTORY The
com.vividsolutions.jts.geom.CoordinateSequenceFactory instance to use. | final public static ClassKey | JTS_GEOMETRY_FACTORY The
com.vividsolutions.jts.geom.GeometryFactory instance to use. | final public static Key | JTS_PRECISION_MODEL The
com.vividsolutions.jts.geom.PrecisionModel instance to use. | final public static Key | JTS_SRID The spatial reference ID for
com.vividsolutions.jts.geom.GeometryFactory . | final public static Key | LENIENT_DATUM_SHIFT Tells if
should be allowed even when a datum shift is required while no method is
found applicable. | final public static ClassKey | MATH_TRANSFORM_FACTORY The
org.opengis.referencing.operation.MathTransformFactory instance to use. | final public static Key | REPLACE_NON_GEOPHYSICS_VIEW Forces the
to perform operations on the non-geophysics view.
Some operation when called on a
that is the non-geophysics view of another grid coverage try to go back to the
latter before executing even if they could execute fine without doing so. | final public static Key | SAMPLE_DIMENSION_TYPE The
org.opengis.coverage.SampleDimensionType to use. | final public static ClassKey | STYLE_FACTORY The
org.geotools.styling.StyleFactory instance to use. | final public static Key | TILE_ENCODING The
name
(as a
String value) to use during serialization of image data in
a
org.geotools.coverage.grid.GridCoverage2D object. | final public static Key | USE_JAI_IMAGEREAD Tells to the
org.opengis.coverage.grid.GridCoverageReader instances to read
the image using the JAI ImageRead operation (leveraging on Deferred Execution Model,
Tile Caching,...) or the direct
ImageReader 's read methods. | final public static Key | VERSION Version number of the requested service. |
Constructor Summary | |
public | Hints(RenderingHints.Key key, Object value) Constructs a new object with the specified key/value pair. | public | Hints(RenderingHints.Key key1, Object value1, RenderingHints.Key key2, Object value2) Constructs a new object with two key/value pair. | public | Hints(RenderingHints.Key key1, Object value1, Object[] pairs) Constructs a new object with key/value pairs from an array. | public | Hints(RenderingHints.Key key1, Object value1, RenderingHints.Key key2, Object value2, Object[] pairs) Constructs a new object from key/value pair. | public | Hints(Map hints) Constructs a new object with keys and values initialized from the
specified map (which may be null). |
AUTHORITY_MAX_ACTIVE | final public static IntegerKey AUTHORITY_MAX_ACTIVE(Code) | | The maximum number of active AuthorityFactories.
This hint is treated as an absolute LIMIT for AbstractAuthorityMediator
instances such as as HsqlDialectEpsgMediator. As such this will be the
absolute limit on the number of database connections the mediator will
make use of. When non-positive there is no limit to the number of
connections used.
When this limit it reached, code will be forced to block while waiting
for a connection to become available.
since: 2.4 |
AUTHORITY_MAX_IDLE | final public static IntegerKey AUTHORITY_MAX_IDLE(Code) | | The number of idle AuthorityFactories.
This hint is treated as a recommendation for AbstractAuthorityMediator
instances such as HsqlDialectEpsgMediator. As such this will control
the number of connections the mediator is comfortable having open.
If AUTHORITY_MAX_ACTIVE is set to 20, up to twenty connections will
be used during heavy load. If the AUTHORITY_MAX_IDLE is set to 10,
connections will be immediately reclaimed until only 10 are open.
When the amount of time specified by AUTHORITY_IDLE_WAIT
Max idle controls the maximum number of objects that can sit idle in the
pool at any time. When negative, there is no limit to the number of
objects that may be idle at one time.
since: 2.4 |
AUTHORITY_MIN_EVICT_IDLETIME | final public static IntegerKey AUTHORITY_MIN_EVICT_IDLETIME(Code) | | When the evictor is run, if more time (in milliseconds) than the value in
AUTHORITY_MIN_EVICT_IDLETIME has passed, then the worker is destroyed.
since: 2.4 |
AUTHORITY_MIN_IDLE | final public static IntegerKey AUTHORITY_MIN_IDLE(Code) | | Minimum number of objects required before the evictor will begin
removing objects. This value is also used by
AUTHORITY_SOFTMIN_EVICT_IDLETIME to keep this many idle workers
around.
since: 2.4 |
AUTHORITY_SOFTMIN_EVICT_IDLETIME | final public static IntegerKey AUTHORITY_SOFTMIN_EVICT_IDLETIME(Code) | | When the evictor is run, workers which have been idle for more than this
value will be destroyed iff the number of idle workers exceeds
AUTHORITY_MIN_IDLE.
since: 2.4 |
AUTHORITY_TIME_BETWEEN_EVICTION_RUNS | final public static IntegerKey AUTHORITY_TIME_BETWEEN_EVICTION_RUNS(Code) | | Time in milliseconds to wait between eviction runs.
since: 2.4 |
BUFFER_LIMIT | final public static IntegerKey BUFFER_LIMIT(Code) | | The recommended maximum number of referencing objects to hold in a
.
since: 2.4 |
BUFFER_POLICY | final public static OptionKey BUFFER_POLICY(Code) | | Policy to use for caching referencing objects. Valid values are:
-
"weak" for holding values through
. This option do not actually cache the objects since the garbage
collector cleans weak references aggressively, but it allows sharing the instances
already created and still in use.
-
"all" for holding values through strong references.
-
"none" for disabling the cache.
since: 2.4 |
CRS_AUTHORITY_EXTRA_DIRECTORY | final public static FileKey CRS_AUTHORITY_EXTRA_DIRECTORY(Code) | | Used to direct WKT CRS Authority to a directory containing extra definitions.
The value should be an instance of
File or
String refering to
an existing directory.
Filenames in the supplied directory should be of the form
authority.properties where authority
is the authority name space to use. For example the
file contains extra CRS to add as new EPSG codes.
To set the directory on the command line:
-D
=path
since: 2.4 |
DEFAULT_COORDINATE_REFERENCE_SYSTEM | final public static Key DEFAULT_COORDINATE_REFERENCE_SYSTEM(Code) | | The default
org.opengis.referencing.crs.CoordinateReferenceSystem to use. This is used by some factories capable to provide a default CRS
when no one were explicitly specified by the user.
since: 2.2 |
EPSG_DATA_SOURCE | final public static Key EPSG_DATA_SOURCE(Code) | | The
name to lookup from JNDI when
initializing the
.
Possible values:
-
String - used with JNDI to locate datasource. This hint has no effect if
there is no
setup.
-
- used as is.
- missing - default to
.
To set on the command line:
-D
=jndiReference
since: 2.4 |
FEATURE_2D | final public static Key FEATURE_2D(Code) | | Request that the features returned by the feature collections should
be 2D only, can be used to prevent the request of the third ordinate
when only two are going to be used.
since: 2.4.1 |
FEATURE_DETACHED | final public static Key FEATURE_DETACHED(Code) | | Whether the features returned by the feature collections should be considered detached from the
datastore, that is, they are updatable without altering the backing store (makes sense only
if features are kept in memory or if there is some transparent persistent mechanism in place,
such as the Hibernate one)
since: 2.4 |
FORCE_AXIS_ORDER_HONORING | final public static Key FORCE_AXIS_ORDER_HONORING(Code) | | Applies the
Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER hint to some factories that usually
ignore it. The axis order issue is of concern mostly to the
"EPSG" name
space. Codes in the
or
"urn:ogc" name space usually ignore the axis order hint, especially the later
which is clearly defined by OGC - in theory users are not allowed to change its behavior.
If nevertheless a user really need to change its behavior, then he must provides explicitly
a comma separated list of authorities with this
FORCE_AXIS_ORDER_HONORING hint in
addition to setting the
Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER hint.
Example: In order to apply the (longitude,latitude) axis order
to
"http://www.opengis.net/" and
"urn:ogc" name spaces in addition to EPSG,
use the following hints:
hints.put(FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.TRUE);
hints.put(FORCE_AXIS_ORDER_HONORING, "http, urn");
Note that the application of (longitude,latitude) axis order
to the
"urn:ogc" name space is a clear violation of OGC specification.
since: 2.4 |
FORCE_LONGITUDE_FIRST_AXIS_ORDER | final public static Key FORCE_LONGITUDE_FIRST_AXIS_ORDER(Code) | | Tells if the
created by an
should be forced to (longitude,latitude) axis order. This hint is
especially useful for creating
objects from EPSG codes. Most
defined in the EPSG
database use (latitude,longitude) axis order. Unfortunatly, many data
sources available in the world uses the opposite axis order and still claim to use a CRS
described by an EPSG code. This hint allows to handle such data.
This hint shall be passed to the
(...) method. Whatever this hint is supported
or not is authority dependent. In the default Geotools configuration, this hint is supported
for the
"EPSG" authority.
If this hint is not provided, then the default value depends on many factors including
and plugins available in the classpath.
In Geotools implementation, the default value is usually
Boolean.FALSE FALSE with
one exception: If the
system property is set to
true , then the default value is
true at least
for the
.
If both the above-cited system property and this hint are provided, then
this hint has precedence. This allow axis order control on a data store
basis, and keep the system-wide property as the default value only for
cases where axis order is unspecified.
To set on the command line:
-D
=longitudeFirst
See Also: org.geotools.referencing.FactoryFinder.getCSFactory See Also: org.geotools.referencing.FactoryFinder.getCRSFactory See Also: org.geotools.referencing.factory.OrderedAxisAuthorityFactory See Also: org.geotools.referencing.factory.epsg.LongitudeFirstFactory since: 2.3 |
GRID_COVERAGE_PROCESSOR | final public static Key GRID_COVERAGE_PROCESSOR(Code) | | The
org.opengis.coverage.processing.GridCoverageProcessor instance to use.
GridCoverageProcessor |
IGNORE_COVERAGE_OVERVIEW | final public static Key IGNORE_COVERAGE_OVERVIEW(Code) | | Tells to the
org.opengis.coverage.grid.GridCoverageReader instances to ignore
the built-in overviews when creating a
org.opengis.coverage.grid.GridCoverage object during a read. This hints also implied that no decimation on reading is performed.
since: 2.3 |
JAI_INSTANCE | final public static Key JAI_INSTANCE(Code) | | The
javax.media.jai.JAI instance to use.
|
LENIENT_DATUM_SHIFT | final public static Key LENIENT_DATUM_SHIFT(Code) | | Tells if
should be allowed even when a datum shift is required while no method is
found applicable. It may be for example that no
were found for a datum shift. The default value is
Boolean.FALSE FALSE , which means
that
throws an exception if such a case occurs. If this hint is
set to
TRUE , then the user is strongly encouraged to check the
for every transformation created. If the set of positional accuracy
contains
org.geotools.metadata.iso.quality.PositionalAccuracyImpl.DATUM_SHIFT_OMITTEDDATUM_SHIFT_OMITTED , this means that an "ellipsoid shift" were applied without real datum
shift method available, and the transformed coordinates may have one kilometer error. The
application should warn the user (e.g. popup a message dialog box) in such case.
See Also: org.geotools.referencing.FactoryFinder.getCoordinateOperationFactory |
REPLACE_NON_GEOPHYSICS_VIEW | final public static Key REPLACE_NON_GEOPHYSICS_VIEW(Code) | | Forces the
to perform operations on the non-geophysics view.
Some operation when called on a
that is the non-geophysics view of another grid coverage try to go back to the
latter before executing even if they could execute fine without doing so. The rationale
behind this is that the non-geophysics view is just the rendered version of a coverage,
hence operations should be applied onto the geophysics companion.
However, in some cases like when doing pure rendering of photographic images, we might want
to force this operations to work on the non-geophysics view directly, even performing color
expansions as needed. This can be accomplished by setting this hint to
true . Be
aware that interpolations in non-photographic images (i.e. a colormap like a Sea
Surface Temperature image) after color expansions may produce wrong colors.
since: 2.4org.geotools.coverage.grid.ViewType PROCESS_ON_VISUAL_VIEW |
SAMPLE_DIMENSION_TYPE | final public static Key SAMPLE_DIMENSION_TYPE(Code) | | The
org.opengis.coverage.SampleDimensionType to use.
|
USE_JAI_IMAGEREAD | final public static Key USE_JAI_IMAGEREAD(Code) | | Tells to the
org.opengis.coverage.grid.GridCoverageReader instances to read
the image using the JAI ImageRead operation (leveraging on Deferred Execution Model,
Tile Caching,...) or the direct
ImageReader 's read methods.
since: 2.4 |
VERSION | final public static Key VERSION(Code) | | Version number of the requested service. This hint is used for example in order to get
a
backed by a particular version of EPSG database. The value should be an instance of
org.geotools.util.Version .
since: 2.4 |
Hints | public Hints(RenderingHints.Key key, Object value)(Code) | | Constructs a new object with the specified key/value pair.
Parameters: key - The key of the particular hint property. Parameters: value - The value of the hint property specified with key . |
Hints | public Hints(RenderingHints.Key key1, Object value1, RenderingHints.Key key2, Object value2)(Code) | | Constructs a new object with two key/value pair.
Parameters: key1 - The key for the first pair Parameters: value1 - The value for the first pair Parameters: key2 - The key2 for the second pair Parameters: value2 - The value2 for the second pair |
Hints | public Hints(RenderingHints.Key key1, Object value1, Object[] pairs)(Code) | | Constructs a new object with key/value pairs from an array.
Parameters: pairs - An array containing pairs of RenderingHints keys and values |
Hints | public Hints(RenderingHints.Key key1, Object value1, RenderingHints.Key key2, Object value2, Object[] pairs)(Code) | | Constructs a new object from key/value pair.
This method is intended for use with Java5:
new Hints( Hints.BUFFER_LIMIT,1,Hints.BUFFER_POLICY,"weak" )
Parameters: pairs - Key value pairs |
Hints | public Hints(Map hints)(Code) | | Constructs a new object with keys and values initialized from the
specified map (which may be null).
Parameters: hints - A map of key/value pairs to initialize the hints, or null if the object should be empty. |
getSystemDefault | public static Object getSystemDefault(RenderingHints.Key key)(Code) | | Returns the hint
for the specified key.
Parameters: key - The hints key. The value for the specified key, or null if the key did not have a mapping. since: 2.4 |
putSystemDefault | static void putSystemDefault(RenderingHints hints)(Code) | | Adds all specified hints to the system hints. This
is for
GeoTools.init implementation only.
|
removeSystemDefault | public static Object removeSystemDefault(RenderingHints.Key key)(Code) | | Removes the specified hints from the set of
.
Parameters: key - The hints key that needs to be removed. The value to which the key had previously been mapped,or null if the key did not have a mapping. since: 2.4 |
scanSystemProperties | public static void scanSystemProperties()(Code) | | Notifies that
will need to be scanned
for any property keys defined in the
GeoTools class. New values found (if any) will
be added to the set of
. For example if
the
system property is defined, then the
Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER hint will be added to the set of default hints.
This method is invoked automatically the first time it is needed. It usually don't
need to be invoked explicitly, except if the
changed. The scan may not be performed immediately, but rather when needed
at some later stage.
since: 2.4 |
stripNonKeys | static Map stripNonKeys(Map hints)(Code) | | Returns a map with the same hints than the specified one, minus every (key,value)
pairs where the key is not an instance of
RenderingHints.Key . If the given
map contains only valid keys, then it is returned unchanged.
|
toString | public String toString()(Code) | | Returns a string representation of the hints. This method formats the set of hints
as a tree. If some system-wide
exist, they are formatted after those hints for completeness.
since: 2.4 |
|
|