|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.resources.LegacyGCSUtilities
CoverageUtilities
.
A set of utilities methods for the Grid Coverage package. Those methods are not really rigorous; must of them should be seen as temporary implementations.
Method Summary | |
static int |
getVisibleBand(java.awt.image.RenderedImage image)
Deprecated. Returns the visible band in the specified image. |
static boolean |
hasGridRange(GridGeometry geometry)
Deprecated. Returns true if the specified geometry has a valid grid range. |
static boolean |
hasTransform(GridGeometry geometry)
Deprecated. Returns true if the specified geometry
has a valid "grid to coordinate system" transform. |
static boolean |
hasTransform(SampleDimension[] sampleDimensions)
Deprecated. Returns true if at least one of the specified sample dimensions has a
sample to geophysics transform
which is not the identity transform. |
static Envelope |
toEnvelope(GridRange gridRange)
Deprecated. Cast the specified grid range into an envelope. |
static GridRange |
toGridRange(Envelope envelope)
Deprecated. Cast the specified envelope into a grid range. |
static boolean |
uses(GridCoverage coverage,
java.awt.image.RenderedImage image)
Deprecated. Returns true if the specified grid coverage or any of its source
uses the following image. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static boolean hasGridRange(GridGeometry geometry)
true
if the specified geometry has a valid grid range.
public static boolean hasTransform(GridGeometry geometry)
true
if the specified geometry
has a valid "grid to coordinate system" transform.
public static Envelope toEnvelope(GridRange gridRange)
CTSUtilities.transform(MathTransform, Envelope)
.
public static GridRange toGridRange(Envelope envelope)
CTSUtilities.transform(MathTransform, Envelope)
. The
floating point values are rounded toward the nearest integer.
Math.floor(double)
and Math.ceil(double)
in order to
make sure that the grid range encompass all the envelope (something similar to what
Java2D does when casting Rectangle2D
to
Rectangle
). But it had the undesirable effect of changing image width.
For example the range [-0.25 99.75]
were changed to [-1 100]
,
which is not what the Affine
operation
expects for instance. Rounding to nearest integer produces better results. Note that the
rounding mode do not alter the significiance of the "Resample" operation, since this
operation will respect the "grid to coordinate system" transform no matter what the
grid range is.
public static boolean hasTransform(SampleDimension[] sampleDimensions)
true
if at least one of the specified sample dimensions has a
sample to geophysics transform
which is not the identity transform.
public static boolean uses(GridCoverage coverage, java.awt.image.RenderedImage image)
true
if the specified grid coverage or any of its source
uses the following image.
public static int getVisibleBand(java.awt.image.RenderedImage image)
image
- The image for which to fetch the visible band.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |