|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.media.jai.PropertySourceImpl org.geotools.coverage.AbstractCoverage org.geotools.coverage.TransformedCoverage
A coverage wrapping an other one with a different coordinate reference system. The coordinate
transformation is applied on the fly every time an method is invoked. It may
be efficient if few points are queried, but become ineficient if a large amount of points is
queried. In the later case, consider reprojecting the whole grid coverage instead.
Note: This class is not thread safe for performance reasons. If desired,
users should create one instance of for each thread.
Nested Class Summary |
Nested classes inherited from class org.geotools.coverage.AbstractCoverage |
AbstractCoverage.Renderable |
Field Summary | |
protected org.opengis.coverage.Coverage |
coverage
The wrapped coverage. |
Fields inherited from class org.geotools.coverage.AbstractCoverage |
crs |
Fields inherited from class javax.media.jai.PropertySourceImpl |
cachedPropertyNames, properties, propertySources |
Constructor Summary | |
protected |
TransformedCoverage(java.lang.CharSequence name,
org.opengis.referencing.crs.CoordinateReferenceSystem crs,
org.opengis.coverage.Coverage coverage)
Creates a new coverage wrapping the specified one. |
Method Summary | |
java.lang.Object |
evaluate(org.opengis.spatialschema.geometry.DirectPosition coord)
Returns the value vector for a given point in the coverage. |
boolean[] |
evaluate(org.opengis.spatialschema.geometry.DirectPosition coord,
boolean[] dest)
Returns a sequence of boolean values for a given point in the coverage. |
byte[] |
evaluate(org.opengis.spatialschema.geometry.DirectPosition coord,
byte[] dest)
Returns a sequence of byte values for a given point in the coverage. |
double[] |
evaluate(org.opengis.spatialschema.geometry.DirectPosition coord,
double[] dest)
Returns a sequence of double values for a given point in the coverage. |
float[] |
evaluate(org.opengis.spatialschema.geometry.DirectPosition coord,
float[] dest)
Returns a sequence of float values for a given point in the coverage. |
int[] |
evaluate(org.opengis.spatialschema.geometry.DirectPosition coord,
int[] dest)
Returns a sequence of integer values for a given point in the coverage. |
org.opengis.spatialschema.geometry.Envelope |
getEnvelope()
Returns the envelope. |
int |
getNumSampleDimensions()
The number of sample dimensions in the coverage. |
org.opengis.coverage.SampleDimension |
getSampleDimension(int index)
Retrieve sample dimension information for the coverage. |
static org.opengis.coverage.Coverage |
reproject(java.lang.CharSequence name,
org.opengis.referencing.crs.CoordinateReferenceSystem crs,
org.opengis.coverage.Coverage coverage)
Creates a new coverage wrapping the specified one with a different CRS. |
Methods inherited from class org.geotools.coverage.AbstractCoverage |
dispose, getCoordinateReferenceSystem, getDimension, getDimensionNames, getDimensionNames, getLocale, getMetadataNames, getMetadataValue, getName, getRenderableImage, getSources, show, show, toString |
Methods inherited from class javax.media.jai.PropertySourceImpl |
getProperties, getProperty, getPropertyClass, getPropertyNames, getPropertyNames |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected final org.opengis.coverage.Coverage coverage
Constructor Detail |
protected TransformedCoverage(java.lang.CharSequence name, org.opengis.referencing.crs.CoordinateReferenceSystem crs, org.opengis.coverage.Coverage coverage) throws org.opengis.referencing.FactoryException
name
- The name for this new coverage.crs
- The crs for this coverage.coverage
- The coverage to wraps.
org.opengis.referencing.FactoryException
- if no transformation can be found from the coverage CRS to the
specified CRS.Method Detail |
public static org.opengis.coverage.Coverage reproject(java.lang.CharSequence name, org.opengis.referencing.crs.CoordinateReferenceSystem crs, org.opengis.coverage.Coverage coverage) throws org.opengis.referencing.FactoryException
name
- The name for this new coverage.crs
- The crs for this coverage.coverage
- The coverage to wraps.
org.opengis.referencing.FactoryException
- if no transformation can be found from the coverage CRS to the
specified CRS.public int getNumSampleDimensions()
public org.opengis.coverage.SampleDimension getSampleDimension(int index) throws java.lang.IndexOutOfBoundsException
index
- Index for sample dimension to retrieve. Indices are numbered 0 to
(n-1).
java.lang.IndexOutOfBoundsException
- if is out of bounds.public org.opengis.spatialschema.geometry.Envelope getEnvelope()
getEnvelope
in interface org.opengis.coverage.Coverage
getEnvelope
in class AbstractCoverage
public final java.lang.Object evaluate(org.opengis.spatialschema.geometry.DirectPosition coord) throws org.opengis.coverage.CannotEvaluateException
coord
- The coordinate point where to evaluate.
PointOutsideCoverageException
- if is outside coverage.
org.opengis.coverage.CannotEvaluateException
- if the computation failed for some other reason.public final boolean[] evaluate(org.opengis.spatialschema.geometry.DirectPosition coord, boolean[] dest) throws org.opengis.coverage.CannotEvaluateException
evaluate
in interface org.opengis.coverage.Coverage
evaluate
in class AbstractCoverage
coord
- The coordinate point where to evaluate.dest
- An array in which to store values, or to create a new array.
org.opengis.coverage.CannotEvaluateException
- if the values can't be computed at the specified coordinate.
More specifically, PointOutsideCoverageException
is thrown if the evaluation
failed because the input point has invalid coordinates. This exception may also be
throws if the coverage data type can't be converted to by an
identity or widening conversion. Subclasses may relax this constraint if appropriate.public final byte[] evaluate(org.opengis.spatialschema.geometry.DirectPosition coord, byte[] dest) throws org.opengis.coverage.CannotEvaluateException
evaluate
in interface org.opengis.coverage.Coverage
evaluate
in class AbstractCoverage
coord
- The coordinate point where to evaluate.dest
- An array in which to store values, or to create a new array.
org.opengis.coverage.CannotEvaluateException
- if the values can't be computed at the specified coordinate.
More specifically, PointOutsideCoverageException
is thrown if the evaluation
failed because the input point has invalid coordinates. This exception may also be
throws if the coverage data type can't be converted to by an
identity or widening conversion. Subclasses may relax this constraint if appropriate.public final int[] evaluate(org.opengis.spatialschema.geometry.DirectPosition coord, int[] dest) throws org.opengis.coverage.CannotEvaluateException
evaluate
in interface org.opengis.coverage.Coverage
evaluate
in class AbstractCoverage
coord
- The coordinate point where to evaluate.dest
- An array in which to store values, or to create a new array.
org.opengis.coverage.CannotEvaluateException
- if the values can't be computed at the specified coordinate.
More specifically, PointOutsideCoverageException
is thrown if the evaluation
failed because the input point has invalid coordinates. This exception may also be
throws if the coverage data type can't be converted to by an
identity or widening conversion. Subclasses may relax this constraint if appropriate.public final float[] evaluate(org.opengis.spatialschema.geometry.DirectPosition coord, float[] dest) throws org.opengis.coverage.CannotEvaluateException
evaluate
in interface org.opengis.coverage.Coverage
evaluate
in class AbstractCoverage
coord
- The coordinate point where to evaluate.dest
- An array in which to store values, or to create a new array.
org.opengis.coverage.CannotEvaluateException
- if the values can't be computed at the specified coordinate.
More specifically, PointOutsideCoverageException
is thrown if the evaluation
failed because the input point has invalid coordinates. This exception may also be
throws if the coverage data type can't be converted to by an
identity or widening conversion. Subclasses may relax this constraint if appropriate.public final double[] evaluate(org.opengis.spatialschema.geometry.DirectPosition coord, double[] dest) throws org.opengis.coverage.CannotEvaluateException
evaluate
in interface org.opengis.coverage.Coverage
evaluate
in class AbstractCoverage
coord
- The coordinate point where to evaluate.dest
- An array in which to store values, or to create a new array.
org.opengis.coverage.CannotEvaluateException
- if the values can't be computed at the specified coordinate.
More specifically, PointOutsideCoverageException
is thrown if the evaluation
failed because the input point has invalid coordinates. This exception may also be
throws if the coverage data type can't be converted to 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 |