|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectPropertySourceImpl
AbstractCoverage
TransformedCoverage
@NotThreadSafe @Decorator(value=org.opengis.coverage.Coverage.class) public class TransformedCoverage
A coverage wrapping an other one with a different coordinate reference system. The coordinate
transformation is applied on the fly every time an evaluate method is invoked. It may
be efficient if few points are queried, but become inefficient if a large amount of points is
queried. In the later case, consider reprojecting the whole grid coverage instead.
Synchronization
This class is not thread safe for performance reasons. If desired, users should create one
instance of TransformedCoverage for each thread.
| coverage/geotk-coverage (download) | View source code for this class |
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class AbstractCoverage |
|---|
AbstractCoverage.Renderable |
| Field Summary | |
|---|---|
protected Coverage |
coverage
The wrapped coverage. |
protected MathTransform |
toOriginalCRS
The transform from this coverage CRS to the CRS of the wrapped coverage. |
| Fields inherited from class AbstractCoverage |
|---|
crs |
| Fields inherited from class PropertySourceImpl |
|---|
cachedPropertyNames, properties, propertySources |
| Constructor Summary | |
|---|---|
protected |
TransformedCoverage(CharSequence name,
CoordinateReferenceSystem crs,
Coverage coverage)
Creates a new coverage wrapping the specified one. |
| Method Summary | |
|---|---|
Object |
evaluate(DirectPosition coord)
Returns the value vector for a given point in the coverage. |
boolean[] |
evaluate(DirectPosition coord,
boolean[] dest)
Returns a sequence of boolean values for a given point in the coverage. |
byte[] |
evaluate(DirectPosition coord,
byte[] dest)
Returns a sequence of byte values for a given point in the coverage. |
double[] |
evaluate(DirectPosition coord,
double[] dest)
Returns a sequence of double values for a given point in the coverage. |
float[] |
evaluate(DirectPosition coord,
float[] dest)
Returns a sequence of float values for a given point in the coverage. |
int[] |
evaluate(DirectPosition coord,
int[] dest)
Returns a sequence of integer values for a given point in the coverage. |
Envelope |
getEnvelope()
Returns the envelope. |
int |
getNumSampleDimensions()
The number of sample dimensions in the coverage. |
SampleDimension |
getSampleDimension(int index)
Retrieve sample dimension information for the coverage. |
static Coverage |
reproject(CharSequence name,
CoordinateReferenceSystem crs,
Coverage coverage)
Creates a new coverage wrapping the specified one with a different CRS. |
| Methods inherited from class AbstractCoverage |
|---|
dispose, evaluate, evaluateInverse, find, find, getCommonPointRule, getCoordinateReferenceSystem, getDimension, getDomainElements, getDomainExtents, getLocale, getName, getRangeElements, getRangeType, getRenderableImage, getSources, list, select, show, show, show, toString |
| Methods inherited from class PropertySourceImpl |
|---|
getProperties, getProperty, getPropertyClass, getPropertyNames, getPropertyNames |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final Coverage coverage
evaluate methods in
this class will delegate the work, after having transformed the coordinates.
protected final MathTransform toOriginalCRS
| Constructor Detail |
|---|
protected TransformedCoverage(CharSequence name,
CoordinateReferenceSystem crs,
Coverage coverage)
throws FactoryException
name - The name for this new coverage.crs - The crs for this coverage.coverage - The coverage to wraps.
FactoryException - if no transformation can be found from the coverage CRS to the
specified CRS.| Method Detail |
|---|
public static Coverage reproject(CharSequence name,
CoordinateReferenceSystem crs,
Coverage coverage)
throws FactoryException
name - The name for this new coverage.crs - The CRS for this coverage.coverage - The coverage to wraps.
FactoryException - if no transformation can be found from the coverage CRS to the
specified CRS.public int getNumSampleDimensions()
public SampleDimension getSampleDimension(int index)
throws IndexOutOfBoundsException
index - Index for sample dimension to retrieve. Indices are numbered 0 to
(n-1).
IndexOutOfBoundsException - if index is out of bounds.public Envelope getEnvelope()
getEnvelope in interface CoveragegetEnvelope in class AbstractCoverage
public final Object evaluate(DirectPosition coord)
throws PointOutsideCoverageException,
CannotEvaluateException
coord - The coordinate point where to evaluate.
PointOutsideCoverageException - if coord is outside coverage.
CannotEvaluateException - if the computation failed for some other reason.
public final boolean[] evaluate(DirectPosition coord,
boolean[] dest)
throws PointOutsideCoverageException,
CannotEvaluateException
evaluate in interface Coverageevaluate in class AbstractCoveragecoord - The coordinate point where to evaluate.dest - An array in which to store values, or null to create a new array.
dest array, or a newly created array if dest was null.
PointOutsideCoverageException - if the evaluation failed because the input point
has invalid coordinates.
CannotEvaluateException - if the values can't be computed at the specified coordinate
for an other reason. It may be thrown if the coverage data type can't be converted
to boolean by an identity or widening conversion. Subclasses may relax this
constraint if appropriate.
public final byte[] evaluate(DirectPosition coord,
byte[] dest)
throws PointOutsideCoverageException,
CannotEvaluateException
evaluate in interface Coverageevaluate in class AbstractCoveragecoord - The coordinate point where to evaluate.dest - An array in which to store values, or null to create a new array.
dest array, or a newly created array if dest was null.
PointOutsideCoverageException - if the evaluation failed because the input point
has invalid coordinates.
CannotEvaluateException - if the values can't be computed at the specified coordinate
for an other reason. It may be thrown if the coverage data type can't be converted
to byte by an identity or widening conversion. Subclasses may relax this
constraint if appropriate.
public final int[] evaluate(DirectPosition coord,
int[] dest)
throws PointOutsideCoverageException,
CannotEvaluateException
evaluate in interface Coverageevaluate in class AbstractCoveragecoord - The coordinate point where to evaluate.dest - An array in which to store values, or null to create a new array.
dest array, or a newly created array if dest was null.
PointOutsideCoverageException - if the evaluation failed because the input point
has invalid coordinates.
CannotEvaluateException - if the values can't be computed at the specified coordinate
for an other reason. It may be thrown if the coverage data type can't be converted
to int by an identity or widening conversion. Subclasses may relax this
constraint if appropriate.
public final float[] evaluate(DirectPosition coord,
float[] dest)
throws PointOutsideCoverageException,
CannotEvaluateException
evaluate in interface Coverageevaluate in class AbstractCoveragecoord - The coordinate point where to evaluate.dest - An array in which to store values, or null to create a new array.
dest array, or a newly created array if dest was null.
PointOutsideCoverageException - if the evaluation failed because the input point
has invalid coordinates.
CannotEvaluateException - if the values can't be computed at the specified coordinate
for an other reason. It may be thrown if the coverage data type can't be converted
to float by an identity or widening conversion. Subclasses may relax this
constraint if appropriate.
public final double[] evaluate(DirectPosition coord,
double[] dest)
throws PointOutsideCoverageException,
CannotEvaluateException
evaluate in interface Coverageevaluate in class AbstractCoveragecoord - The coordinate point where to evaluate.dest - An array in which to store values, or null to create a new array.
dest array, or a newly created array if dest was null.
PointOutsideCoverageException - if the evaluation failed because the input point
has invalid coordinates.
CannotEvaluateException - if the values can't be computed at the specified coordinate
for an other reason. It may be thrown if the coverage data type can't be converted
to double by an identity or widening conversion. Subclasses may relax this
constraint if appropriate.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||