|
|||||||||||
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.SpatioTemporalCoverage3D
Convenience view of an other coverage with x, y and time axis.
This class provides methods in two versions: the usual one expecting
a complete direct position, and an other one expecting the
spatial position and the date as separated arguments.
This class will detects by itself which dimension is the time axis. It will also tries to uses
the 's x value for
east or west direction, and the
y value for north
or south direction. The dimension mapping can be examined with the toSourceDimension(int)
method.
Note: This class is not thread safe for performance reasons. If desired,
users should create one instance of for each thread.
Field Summary |
Fields inherited from class org.geotools.coverage.AbstractCoverage |
crs |
Fields inherited from class javax.media.jai.PropertySourceImpl |
cachedPropertyNames, properties, propertySources |
Constructor Summary | |
SpatioTemporalCoverage3D(java.lang.CharSequence name,
org.opengis.coverage.Coverage coverage)
Constructs a new coverage. |
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. |
boolean[] |
evaluate(java.awt.geom.Point2D point,
java.util.Date time,
boolean[] dest)
Returns a sequence of boolean values for a given point in the coverage. |
byte[] |
evaluate(java.awt.geom.Point2D point,
java.util.Date time,
byte[] dest)
Returns a sequence of byte values for a given point in the coverage. |
double[] |
evaluate(java.awt.geom.Point2D point,
java.util.Date time,
double[] dest)
Returns a sequence of double values for a given point in the coverage. |
float[] |
evaluate(java.awt.geom.Point2D point,
java.util.Date time,
float[] dest)
Returns a sequence of float values for a given point in the coverage. |
int[] |
evaluate(java.awt.geom.Point2D point,
java.util.Date time,
int[] dest)
Returns a sequence of integer values for a given point in the coverage. |
protected java.awt.geom.Dimension2D |
getDefaultPixelSize()
Returns the default pixel size for images to be produced by getRenderableImage(Date) .
|
org.opengis.metadata.extent.GeographicBoundingBox |
getGeographicBoundingBox()
Returns the envelope geographic bounding box. |
GridCoverage2D |
getGridCoverage2D(java.util.Date time)
Returns a 2 dimensional grid coverage for the given date. |
int |
getNumSampleDimensions()
The number of sample dimensions in the coverage. |
java.awt.image.renderable.RenderableImage |
getRenderableImage(java.util.Date date)
Returns 2D view of this grid coverage at the given date. |
org.opengis.coverage.SampleDimension |
getSampleDimension(int index)
Retrieve sample dimension information for the coverage. |
javax.media.jai.util.Range |
getTimeRange()
Returns the envelope time range. |
org.opengis.coverage.Coverage |
getWrappedCoverage()
Returns the coverage specified at construction time. |
java.util.Date |
toDate(org.opengis.spatialschema.geometry.DirectPosition position)
Returns the date for the specified direct position. |
org.opengis.spatialschema.geometry.DirectPosition |
toDirectPosition(java.awt.geom.Point2D point,
java.util.Date date)
Returns a coordinate point for the given spatial position and date. |
java.awt.geom.Point2D |
toPoint2D(org.opengis.spatialschema.geometry.DirectPosition position)
Returns the spatial coordinate for the specified direct position. |
int |
toSourceDimension(int dimension)
Returns the dimension in the wrapped coverage for the specified dimension in this coverage. |
Methods inherited from class org.geotools.coverage.AbstractCoverage |
dispose, getCoordinateReferenceSystem, getDimension, getDimensionNames, getDimensionNames, getEnvelope, 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 |
Constructor Detail |
public SpatioTemporalCoverage3D(java.lang.CharSequence name, org.opengis.coverage.Coverage coverage) throws java.lang.IllegalArgumentException
name
- The name for this coverage, or for the same than .coverage
- The source coverage.
java.lang.IllegalArgumentException
- if the coverage CRS doesn't have a temporal component.Method Detail |
public final org.opengis.coverage.Coverage getWrappedCoverage()
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.metadata.extent.GeographicBoundingBox getGeographicBoundingBox() throws org.opengis.referencing.operation.TransformException
org.opengis.referencing.operation.TransformException
- if the envelope can't be transformed.public javax.media.jai.util.Range getTimeRange()
Date
objects.
public final int toSourceDimension(int dimension)
dimension
- A dimension in this coverage:
0 for x,
1 for y or
2 for t.
toDate(org.opengis.spatialschema.geometry.DirectPosition)
,
toPoint2D(org.opengis.spatialschema.geometry.DirectPosition)
,
toDirectPosition(java.awt.geom.Point2D, java.util.Date)
public final org.opengis.spatialschema.geometry.DirectPosition toDirectPosition(java.awt.geom.Point2D point, java.util.Date date)
point
- The spatial position.date
- The date.
toDate(org.opengis.spatialschema.geometry.DirectPosition)
,
toPoint2D(org.opengis.spatialschema.geometry.DirectPosition)
public final java.util.Date toDate(org.opengis.spatialschema.geometry.DirectPosition position)
toPoint2D
) is the converse of toDirectPosition
.
position
- The direct position, as computed by
toDirectPosition
.
toPoint2D(org.opengis.spatialschema.geometry.DirectPosition)
,
toDirectPosition(java.awt.geom.Point2D, java.util.Date)
public final java.awt.geom.Point2D toPoint2D(org.opengis.spatialschema.geometry.DirectPosition position)
toDate
) is the converse of toDirectPosition
.
position
- The direct position, as computed by
toDirectPosition
.
toDate(org.opengis.spatialschema.geometry.DirectPosition)
,
toDirectPosition(java.awt.geom.Point2D, java.util.Date)
public final boolean[] evaluate(java.awt.geom.Point2D point, java.util.Date time, boolean[] dest) throws org.opengis.coverage.CannotEvaluateException
point
- The coordinate point where to evaluate.time
- The date where to evaluate.dest
- An array in which to store values, or to create a new array.
PointOutsideCoverageException
- if or is outside coverage.
org.opengis.coverage.CannotEvaluateException
- if the computation failed for some other reason.public final byte[] evaluate(java.awt.geom.Point2D point, java.util.Date time, byte[] dest) throws org.opengis.coverage.CannotEvaluateException
point
- The coordinate point where to evaluate.time
- The date where to evaluate.dest
- An array in which to store values, or to create a new array.
PointOutsideCoverageException
- if or is outside coverage.
org.opengis.coverage.CannotEvaluateException
- if the computation failed for some other reason.public final int[] evaluate(java.awt.geom.Point2D point, java.util.Date time, int[] dest) throws org.opengis.coverage.CannotEvaluateException
point
- The coordinate point where to evaluate.time
- The date where to evaluate.dest
- An array in which to store values, or to create a new array.
PointOutsideCoverageException
- if or is outside coverage.
org.opengis.coverage.CannotEvaluateException
- if the computation failed for some other reason.public final float[] evaluate(java.awt.geom.Point2D point, java.util.Date time, float[] dest) throws org.opengis.coverage.CannotEvaluateException
point
- The coordinate point where to evaluate.time
- The date where to evaluate.dest
- An array in which to store values, or to create a new array.
PointOutsideCoverageException
- if or is outside coverage.
org.opengis.coverage.CannotEvaluateException
- if the computation failed for some other reason.public final double[] evaluate(java.awt.geom.Point2D point, java.util.Date time, double[] dest) throws org.opengis.coverage.CannotEvaluateException
point
- The coordinate point where to evaluate.time
- The date where to evaluate.dest
- An array in which to store values, or to create a new array.
PointOutsideCoverageException
- if or is outside coverage.
org.opengis.coverage.CannotEvaluateException
- if the computation failed for some other reason.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.public GridCoverage2D getGridCoverage2D(java.util.Date time) throws org.opengis.coverage.CannotEvaluateException
time
- The date where to evaluate.
PointOutsideCoverageException
- if is outside coverage.
org.opengis.coverage.CannotEvaluateException
- if the computation failed for some other reason.getRenderableImage(Date)
,
RenderableImage.createDefaultRendering()
public java.awt.image.renderable.RenderableImage getRenderableImage(java.util.Date date)
date
- The date where to evaluate the images.
protected java.awt.geom.Dimension2D getDefaultPixelSize()
getRenderableImage(Date)
.
This method is invoked by RenderableImage.createDefaultRendering()
for computing a
default image size. The default implementation for this method always returns .
Subclasses should overrides this method in order to provides a pixel size better suited to
their data.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |