|
|||||||||||
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
Base class of all coverage type. The essential property of coverage is to be able to generate a value for any point within its domain. How coverage is represented internally is not a concern. For example consider the following different internal representations of coverage:
getCoordinateReferenceSystem()
.getCoordinateSystem().getDimension();
getDimensionNames()
.length;
getDimension()
;
Nested Class Summary | |
protected class |
AbstractCoverage.Renderable
A view of a coverage as a renderable image. |
Field Summary | |
protected org.opengis.referencing.crs.CoordinateReferenceSystem |
crs
The coordinate reference system, or if there is none. |
Fields inherited from class javax.media.jai.PropertySourceImpl |
cachedPropertyNames, properties, propertySources |
Constructor Summary | |
protected |
AbstractCoverage(java.lang.CharSequence name,
org.opengis.referencing.crs.CoordinateReferenceSystem crs,
javax.media.jai.PropertySource source,
java.util.Map properties)
Constructs a coverage using the specified coordinate reference system. |
protected |
AbstractCoverage(java.lang.CharSequence name,
org.opengis.coverage.Coverage coverage)
Constructs a new coverage with the same parameters than the specified coverage. |
Method Summary | |
void |
dispose()
Provides a hint that a coverage will no longer be accessed from a reference in user space. |
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.referencing.crs.CoordinateReferenceSystem |
getCoordinateReferenceSystem()
Returns the coordinate reference system. |
int |
getDimension()
Returns the dimension of the grid coverage. |
org.opengis.util.InternationalString[] |
getDimensionNames()
Returns the names of each dimension in this coverage. |
java.lang.String[] |
getDimensionNames(java.util.Locale locale)
Deprecated. Replaced by getDimensionNames() . |
org.opengis.spatialschema.geometry.Envelope |
getEnvelope()
Returns the bounding box for the coverage domain in coordinate reference system coordinates. |
java.util.Locale |
getLocale()
Returns the default locale for logging, error messages, etc. |
java.lang.String[] |
getMetadataNames()
List of metadata keywords for a coverage. |
java.lang.String |
getMetadataValue(java.lang.String name)
Retrieve the metadata value for a given metadata name. |
org.opengis.util.InternationalString |
getName()
Returns the coverage name. |
java.awt.image.renderable.RenderableImage |
getRenderableImage(int xAxis,
int yAxis)
Returns 2D view of this grid coverage as a renderable image. |
java.util.List |
getSources()
Returns the source data for a coverage. |
void |
show()
Display this coverage in a windows. |
void |
show(int xAxis,
int yAxis)
Display this coverage in a windows. |
java.lang.String |
toString()
Returns a string repr?sentation of this coverage. |
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 |
Methods inherited from interface org.opengis.coverage.Coverage |
evaluate, getNumSampleDimensions, getSampleDimension |
Field Detail |
protected final org.opengis.referencing.crs.CoordinateReferenceSystem crs
Constructor Detail |
protected AbstractCoverage(java.lang.CharSequence name, org.opengis.referencing.crs.CoordinateReferenceSystem crs, javax.media.jai.PropertySource source, java.util.Map properties)
getDimension()
.
name
- The coverage name.crs
- The coordinate reference system. This specifies the coordinate
system used when accessing a coverage or grid coverage with the
methods.source
- The source for this coverage, or if none.
Source may be (but is not limited to) a PlanarImage
or an
other object.properties
- The set of properties for this coverage, or if there is none.
"Properties" in Java Advanced Imaging is what OpenGIS calls "Metadata".
Keys are String
objects (CaselessStringKey
are accepted as well),
while values may be any Object
.protected AbstractCoverage(java.lang.CharSequence name, org.opengis.coverage.Coverage coverage)
PropertySourceImpl
). In many cases, it is not a problem
since GridCoverage
will retains a strong reference to its source anyway.
name
- The name for this coverage, or for the same than .coverage
- The source coverage.Method Detail |
public org.opengis.util.InternationalString getName()
public java.util.List getSources()
getSources
in interface org.opengis.coverage.Coverage
public org.opengis.referencing.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()
GridGeometry.getGridToCoordinateSystem()
. A grid coverage can be accessed
(re-projected) with new coordinate reference system with the GridCoverageProcessor
component. In this case, a new instance of a grid coverage is created.
Note: If a coverage does not have an associated coordinate reference system, the returned
value will be . The GridGeometry.getGridToCoordinateSystem()
) attribute
should also be if the coordinate reference system is .
getCoordinateReferenceSystem
in interface org.opengis.coverage.Coverage
GridGeometry.getGridToCoordinateSystem()
public org.opengis.spatialschema.geometry.Envelope getEnvelope()
The default implementation returns the domain of validity of the CRS, if there is one.(Minimum row - 0.5, Minimum column - 0.5) for the minimum coordinates (Maximum row - 0.5, Maximum column - 0.5) for the maximum coordinates
getEnvelope
in interface org.opengis.coverage.Coverage
public int getDimension()
public org.opengis.util.InternationalString[] getDimensionNames()
getDimensionNames
in interface org.opengis.coverage.Coverage
getDimension()
.public final java.lang.String[] getDimensionNames(java.util.Locale locale)
getDimensionNames()
.
public boolean[] evaluate(org.opengis.spatialschema.geometry.DirectPosition coord, boolean[] dest) throws org.opengis.coverage.CannotEvaluateException
evaluate
in interface org.opengis.coverage.Coverage
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 byte[] evaluate(org.opengis.spatialschema.geometry.DirectPosition coord, byte[] dest) throws org.opengis.coverage.CannotEvaluateException
evaluate
in interface org.opengis.coverage.Coverage
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 int[] evaluate(org.opengis.spatialschema.geometry.DirectPosition coord, int[] dest) throws org.opengis.coverage.CannotEvaluateException
evaluate
in interface org.opengis.coverage.Coverage
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 float[] evaluate(org.opengis.spatialschema.geometry.DirectPosition coord, float[] dest) throws org.opengis.coverage.CannotEvaluateException
evaluate
in interface org.opengis.coverage.Coverage
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 double[] evaluate(org.opengis.spatialschema.geometry.DirectPosition coord, double[] dest) throws org.opengis.coverage.CannotEvaluateException
evaluate
in interface org.opengis.coverage.Coverage
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 java.awt.image.renderable.RenderableImage getRenderableImage(int xAxis, int yAxis)
getRenderableImage
in interface org.opengis.coverage.Coverage
xAxis
- Dimension to use for the x display axis.yAxis
- Dimension to use for the y display axis.
public void show(int xAxis, int yAxis)
xAxis
- Dimension to use for the x display axis.yAxis
- Dimension to use for the y display axis.public void show()
public java.lang.String[] getMetadataNames()
PropertySourceImpl.getPropertyNames()
method.
getMetadataNames
in interface org.opengis.coverage.Coverage
public java.lang.String getMetadataValue(java.lang.String name) throws org.opengis.coverage.MetadataNameNotFoundException
PropertySourceImpl.getProperty(String)
method.
getMetadataValue
in interface org.opengis.coverage.Coverage
name
- Metadata keyword for which to retrieve data.
org.opengis.coverage.MetadataNameNotFoundException
- if there is no value for the specified metadata name.public java.util.Locale getLocale()
public void dispose()
PlanarImage.dispose()
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |