|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectPropertySourceImpl
AbstractCoverage
SpatioTemporalCoverage3D
public class SpatioTemporalCoverage3D
Convenience view of an other coverage with x, y and time axis.
This class provides evaluate 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 Point2D'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 SpatioTemporalCoverage3D for each thread.
modules/library/coverage (gt2-coverage.jar) (Maven report) (SVN head)| Field Summary |
|---|
| Fields inherited from class AbstractCoverage |
|---|
crs |
| Fields inherited from class PropertySourceImpl |
|---|
cachedPropertyNames, properties, propertySources |
| Constructor Summary | |
|---|---|
SpatioTemporalCoverage3D(CharSequence name,
Coverage coverage)
Constructs a new coverage. |
|
| 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. |
boolean[] |
evaluate(Point2D point,
Date time,
boolean[] dest)
Returns a sequence of boolean values for a given point in the coverage. |
byte[] |
evaluate(Point2D point,
Date time,
byte[] dest)
Returns a sequence of byte values for a given point in the coverage. |
double[] |
evaluate(Point2D point,
Date time,
double[] dest)
Returns a sequence of double values for a given point in the coverage. |
float[] |
evaluate(Point2D point,
Date time,
float[] dest)
Returns a sequence of float values for a given point in the coverage. |
int[] |
evaluate(Point2D point,
Date time,
int[] dest)
Returns a sequence of integer values for a given point in the coverage. |
protected Dimension2D |
getDefaultPixelSize()
Returns the default pixel size for images to be produced by getRenderableImage(Date). |
GeographicBoundingBox |
getGeographicBoundingBox()
Returns the envelope geographic bounding box. |
GridCoverage2D |
getGridCoverage2D(Date time)
Returns a 2 dimensional grid coverage for the given date. |
int |
getNumSampleDimensions()
The number of sample dimensions in the coverage. |
RenderableImage |
getRenderableImage(Date date)
Returns 2D view of this grid coverage at the given date. |
SampleDimension |
getSampleDimension(int index)
Retrieve sample dimension information for the coverage. |
Range |
getTimeRange()
Returns the envelope time range. |
Coverage |
getWrappedCoverage()
Returns the coverage specified at construction time. |
Date |
toDate(DirectPosition position)
Returns the date for the specified direct position. |
DirectPosition |
toDirectPosition(Point2D point,
Date date)
Returns a coordinate point for the given spatial position and date. |
Point2D |
toPoint2D(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 AbstractCoverage |
|---|
dispose, dispose, evaluate, evaluateInverse, find, find, getCommonPointRule, getCoordinateReferenceSystem, getDimension, getDimensionNames, getDimensionNames, getDomainElements, getDomainExtents, getEnvelope, getLocale, getMetadataNames, getMetadataValue, getName, getRangeElements, getRangeType, getRenderableImage, getSources, list, select, show, 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 |
| Constructor Detail |
|---|
public SpatioTemporalCoverage3D(CharSequence name,
Coverage coverage)
throws IllegalArgumentException
name - The name for this coverage, or null for the same than coverage.coverage - The source coverage.
IllegalArgumentException - if the coverage CRS doesn't have a temporal component.| Method Detail |
|---|
public final Coverage getWrappedCoverage()
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 GeographicBoundingBox getGeographicBoundingBox()
throws TransformException
TransformException - if the envelope can't be transformed.public Range getTimeRange()
Date objects.
public final int toSourceDimension(int dimension)
evaluate(Point2D, Date) methods expect ordinates in the
(x, y, t) order.
The evaluate(DirectPosition) methods and the wrapped coverage way uses a different
order.
dimension - A dimension in this coverage:
0 for x,
1 for y or
2 for t.
toDate(org.opengis.geometry.DirectPosition),
toPoint2D(org.opengis.geometry.DirectPosition),
toDirectPosition(java.awt.geom.Point2D, java.util.Date)
public final DirectPosition toDirectPosition(Point2D point,
Date date)
point - The spatial position.date - The date.
toDate(org.opengis.geometry.DirectPosition),
toPoint2D(org.opengis.geometry.DirectPosition)public final Date toDate(DirectPosition position)
toPoint2D) is the converse of toDirectPosition.
position - The direct position, as computed by
toDirectPosition.
toPoint2D(org.opengis.geometry.DirectPosition),
toDirectPosition(java.awt.geom.Point2D, java.util.Date)public final Point2D toPoint2D(DirectPosition position)
toDate) is the converse of toDirectPosition.
position - The direct position, as computed by
toDirectPosition.
toDate(org.opengis.geometry.DirectPosition),
toDirectPosition(java.awt.geom.Point2D, java.util.Date)
public final boolean[] evaluate(Point2D point,
Date time,
boolean[] dest)
throws CannotEvaluateException
point - The coordinate point where to evaluate.time - The date 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 point or time is outside coverage.
CannotEvaluateException - if the computation failed for some other reason.
public final byte[] evaluate(Point2D point,
Date time,
byte[] dest)
throws CannotEvaluateException
point - The coordinate point where to evaluate.time - The date 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 point or time is outside coverage.
CannotEvaluateException - if the computation failed for some other reason.
public final int[] evaluate(Point2D point,
Date time,
int[] dest)
throws CannotEvaluateException
point - The coordinate point where to evaluate.time - The date 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 point or time is outside coverage.
CannotEvaluateException - if the computation failed for some other reason.
public final float[] evaluate(Point2D point,
Date time,
float[] dest)
throws CannotEvaluateException
point - The coordinate point where to evaluate.time - The date 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 point or time is outside coverage.
CannotEvaluateException - if the computation failed for some other reason.
public final double[] evaluate(Point2D point,
Date time,
double[] dest)
throws CannotEvaluateException
point - The coordinate point where to evaluate.time - The date 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 point or time is outside coverage.
CannotEvaluateException - if the computation failed for some other reason.
public final Object evaluate(DirectPosition coord)
throws 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 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.
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 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.
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 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.
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 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.
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 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.
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.
public GridCoverage2D getGridCoverage2D(Date time)
throws CannotEvaluateException
time - The date where to evaluate.
null
if the requested date fall in a hole in the data.
PointOutsideCoverageException - if time is outside coverage.
CannotEvaluateException - if the computation failed for some other reason.getRenderableImage(Date),
RenderableImage.createDefaultRendering()public RenderableImage getRenderableImage(Date date)
date - The date where to evaluate the images.
protected 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 null.
Subclasses should overrides this method in order to provides a pixel size better suited to
their data.
null if no default is provided.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||