org.geotools.gc
Class GridCoverage

java.lang.Object
  extended byjavax.media.jai.PropertySourceImpl
      extended byorg.geotools.cv.Coverage
          extended byorg.geotools.gc.GridCoverage
All Implemented Interfaces:
Dimensioned, javax.media.jai.PropertySource, java.io.Serializable

Deprecated. Replaced by GridCoverage2D.

public class GridCoverage
extends Coverage

Basic access to grid data values. Grid coverages are backed by RenderedImage. Each band in an image is represented as a sample dimension.

Grid coverages are usually two-dimensional. However, their envelope may have more than two dimensions. For example, a remote sensing image may be valid only over some time range (the time of satellite pass over the observed area). Envelope for such grid coverage may have three dimensions: the two usual ones (horizontal extends along x and y), and a third one for start time and end time (time extends along t).

Version:
$Id: GridCoverage.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
OpenGIS, Martin Desruisseaux
See Also:
GC_GridCoverage, Serialized Form

Nested Class Summary
protected  class GridCoverage.Export
          Deprecated. Export a Geotools GridCoverage as an OpenGIS GC_GridCoverage object.
static interface GridCoverage.Remote
          Deprecated. Interface for OpenGIS's GC_GridCoverage capable to produce a RenderedImage.
 
Nested classes inherited from class org.geotools.cv.Coverage
Coverage.Renderable
 
Field Summary
protected  GridGeometry gridGeometry
          Deprecated. The grid geometry.
protected  javax.media.jai.PlanarImage image
          Deprecated. The raster data.
 
Fields inherited from class org.geotools.cv.Coverage
coordinateSystem
 
Fields inherited from class javax.media.jai.PropertySourceImpl
cachedPropertyNames, properties, propertySources
 
Constructor Summary
protected GridCoverage(GridCoverage coverage)
          Deprecated. Construct a new grid coverage with the same parameter than the specified coverage.
  GridCoverage(java.lang.String name, javax.media.jai.ImageFunction function, CoordinateSystem cs, GridGeometry gridGeometry, SampleDimension[] bands, java.util.Map properties)
          Deprecated. Construt a grid coverage from an image function.
  GridCoverage(java.lang.String name, java.awt.image.RenderedImage image, CoordinateSystem cs, Envelope envelope)
          Deprecated. Construct a grid coverage with the specified envelope.
  GridCoverage(java.lang.String name, java.awt.image.RenderedImage image, CoordinateSystem cs, Envelope envelope, SampleDimension[] bands, GridCoverage[] sources, java.util.Map properties)
          Deprecated. Construct a grid coverage with the specified envelope and sample dimensions.
  GridCoverage(java.lang.String name, java.awt.image.RenderedImage image, CoordinateSystem cs, MathTransform gridToCS, SampleDimension[] bands, GridCoverage[] sources, java.util.Map properties)
          Deprecated. Construct a grid coverage with the specified transform and sample dimension.
  GridCoverage(java.lang.String name, java.awt.image.WritableRaster raster, CoordinateSystem cs, Envelope envelope, double[] minValues, double[] maxValues, Unit units, java.awt.Color[][] colors, java.awt.RenderingHints hints)
          Deprecated. Constructs a grid coverage from a raster with the specified envelope.
  GridCoverage(java.lang.String name, java.awt.image.WritableRaster raster, CoordinateSystem cs, MathTransform gridToCS, double[] minValues, double[] maxValues, Unit units, java.awt.Color[][] colors, java.awt.RenderingHints hints)
          Deprecated. Constructs a grid coverage from a raster with the specified "grid to coordinate system" transform.
  GridCoverage(java.lang.String name, java.awt.image.WritableRaster raster, Envelope envelope)
          Deprecated. Constructs a grid coverage from a raster and an envelope in longitude,latitude coordinates.
 
Method Summary
protected  GridCoverage createGeophysics(boolean geo)
          Deprecated. Invoked by geophysics(boolean) when the packed or geophysics companion of this grid coverage need to be created.
 double[] evaluate(CoordinatePoint coord, double[] dest)
          Deprecated. Returns a sequence of double values for a given point in the coverage.
 float[] evaluate(CoordinatePoint coord, float[] dest)
          Deprecated. Returns a sequence of float values for a given point in the coverage.
 int[] evaluate(CoordinatePoint coord, int[] dest)
          Deprecated. Returns a sequence of integer values for a given point in the coverage.
 double[] evaluate(java.awt.geom.Point2D coord, double[] dest)
          Deprecated. Returns a sequence of double values for a given two-dimensional point in the coverage.
 float[] evaluate(java.awt.geom.Point2D coord, float[] dest)
          Deprecated. Returns a sequence of float values for a given two-dimensional point in the coverage.
 int[] evaluate(java.awt.geom.Point2D coord, int[] dest)
          Deprecated. Returns a sequence of integer values for a given two-dimensional point in the coverage.
static GridCoverage fromGeoAPI(org.opengis.coverage.grid.GridCoverage gc)
          Deprecated. Mimic a GeoAPI interface as a legacy implementation.
 GridCoverage geophysics(boolean geo)
          Deprecated. If true, returns the geophysics companion of this grid coverage.
 java.lang.String getDebugString(CoordinatePoint coord)
          Deprecated. Returns a debug string for the specified coordinate.
 Envelope getEnvelope()
          Deprecated. Returns The bounding box for the coverage domain in coordinate system coordinates.
 GridGeometry getGridGeometry()
          Deprecated. Returns information for the grid coverage geometry.
 javax.media.jai.Interpolation getInterpolation()
          Deprecated. Returns the interpolation used for all evaluate(...)
 java.awt.image.RenderedImage getRenderedImage()
          Deprecated. Returns grid data as a rendered image.
 SampleDimension[] getSampleDimensions()
          Deprecated. Retrieve sample dimension information for the coverage.
 GridCoverage[] getSources()
          Deprecated. Returns the source data for a grid coverage.
protected  GridCoverage interpolate(GridCoverage coverage)
          Deprecated. Override createGeophysics(boolean) instead. This method will be removed in a future version.
 boolean isDataEditable()
          Deprecated. Returns true if grid data can be edited.
 void prefetch(java.awt.geom.Rectangle2D area)
          Deprecated. Hints that the given area may be needed in the near future.
 java.lang.String toString()
          Deprecated. Returns a string repr?sentation of this coverage.
 
Methods inherited from class org.geotools.cv.Coverage
dispose, evaluate, evaluate, getCoordinateSystem, getDimension, getDimensionNames, getName, getRenderableImage
 
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

image

protected transient javax.media.jai.PlanarImage image
Deprecated. 
The raster data.

To Do:
This field should be final. It is not only for internal reason (namely: deserialization). Consider making this field private in a future version.

gridGeometry

protected final GridGeometry gridGeometry
Deprecated. 
The grid geometry.

Constructor Detail

GridCoverage

protected GridCoverage(GridCoverage coverage)
Deprecated. 
Construct a new grid coverage with the same parameter than the specified coverage. This constructor is useful when creating a coverage with identical data, but in which some method has been overriden in order to process data differently (e.g. interpolating them).

Parameters:
coverage - The source grid coverage.

GridCoverage

public GridCoverage(java.lang.String name,
                    javax.media.jai.ImageFunction function,
                    CoordinateSystem cs,
                    GridGeometry gridGeometry,
                    SampleDimension[] bands,
                    java.util.Map properties)
             throws org.opengis.spatialschema.geometry.MismatchedDimensionException
Deprecated. 
Construt a grid coverage from an image function.

Parameters:
name - The grid coverage name.
function - The image function.
cs - The coordinate system. This specifies the coordinate system used when accessing a grid coverage with the "evaluate" methods. The number of dimensions must matches the number of dimensions for the grid range in gridGeometry.
gridGeometry - The grid geometry. The grid range must contains the expected image size (width and height).
bands - Sample dimensions for each image band, or null for default sample dimensions. If non-null, then this array's length must matches the number of bands in image.
properties - The set of properties for this coverage, or null if there is none. "Properties" in Java Advanced Imaging is what OpenGIS calls "Metadata". There is no getMetadataValue(...) method in this implementation. Use PropertySourceImpl.getProperty(java.lang.String) instead. Keys may be String or CaselessStringKey objects, while values may be any Object.
Throws:
org.opengis.spatialschema.geometry.MismatchedDimensionException - If the grid range's dimension is not the same than the coordinate system's dimension.

GridCoverage

public GridCoverage(java.lang.String name,
                    java.awt.image.WritableRaster raster,
                    Envelope envelope)
             throws org.opengis.spatialschema.geometry.MismatchedDimensionException
Deprecated. 
Constructs a grid coverage from a raster and an envelope in longitude,latitude coordinates. The coordinate system is assumed to be based on WGS84. A default color palette is built from the minimal and maximal values found in the raster.

Parameters:
name - The grid coverage name.
raster - The data (may be floating point numbers). NaN values are mapped to a transparent color.
envelope - The envelope in geographic (longitude,latitude) coordinates.
Throws:
org.opengis.spatialschema.geometry.MismatchedDimensionException - If the envelope's dimension is not 2.

GridCoverage

public GridCoverage(java.lang.String name,
                    java.awt.image.WritableRaster raster,
                    CoordinateSystem cs,
                    Envelope envelope,
                    double[] minValues,
                    double[] maxValues,
                    Unit units,
                    java.awt.Color[][] colors,
                    java.awt.RenderingHints hints)
Deprecated. 
Constructs a grid coverage from a raster with the specified envelope.

Parameters:
name - The grid coverage name.
raster - The data (may be floating point numbers). NaN values are mapped to a transparent color.
cs - The coordinate system. This specifies the coordinate system used when accessing a grid coverage with the "evaluate" methods. The number of dimensions must matches the number of dimensions for envelope.
envelope - The grid coverage cordinates. This envelope must have at least two dimensions. The two first dimensions describe the image location along x and y axis. The other dimensions are optional and may be used to locate the image on a vertical axis or on the time axis.
minValues - The minimal value for each bands in the raster, or null for computing it automatically.
maxValues - The maximal value for each bands in the raster, or null for computing it automatically.
units - The units of sample values, or null if unknow.
colors - The colors to use for values from minValues to maxValues for each bands, or null for a default color palette. If non-null, each arrays colors[b] may have any length; colors will be interpolated as needed.
hints - An optional set of rendering hints, or null if none. Those hints will not affect the grid coverage to be created. However, they may affect the grid coverage to be returned by geophysics(false), i.e. the view to be used at rendering time. The optional hint Hints.SAMPLE_DIMENSION_TYPE specifies the SampleDimensionType to be used at rendering time, which can be one of UBYTE or USHORT.
Throws:
org.opengis.spatialschema.geometry.MismatchedDimensionException - If the envelope's dimension is not the same than the coordinate system's dimension.
java.lang.IllegalArgumentException - if the number of bands differs from the number of sample dimensions.

GridCoverage

public GridCoverage(java.lang.String name,
                    java.awt.image.WritableRaster raster,
                    CoordinateSystem cs,
                    MathTransform gridToCS,
                    double[] minValues,
                    double[] maxValues,
                    Unit units,
                    java.awt.Color[][] colors,
                    java.awt.RenderingHints hints)
Deprecated. 
Constructs a grid coverage from a raster with the specified "grid to coordinate system" transform.

Parameters:
name - The grid coverage name.
raster - The data (may be floating point numbers). NaN values are mapped to a transparent color.
cs - The coordinate system. This specifies the coordinate system used when accessing a grid coverage with the "evaluate" methods.
gridToCS - The math transform from grid to coordinate system.
minValues - The minimal value for each bands in the raster, or null for computing it automatically.
maxValues - The maximal value for each bands in the raster, or null for computing it automatically.
units - The units of sample values, or null if unknow.
colors - The colors to use for values from minValues to maxValues for each bands, or null for a default color palette. If non-null, each arrays colors[b] may have any length; colors will be interpolated as needed.
hints - An optional set of rendering hints, or null if none. Those hints will not affect the grid coverage to be created. However, they may affect the grid coverage to be returned by geophysics(false), i.e. the view to be used at rendering time. The optional hint Hints.SAMPLE_DIMENSION_TYPE specifies the SampleDimensionType to be used at rendering time, which can be one of UBYTE or USHORT.
Throws:
org.opengis.spatialschema.geometry.MismatchedDimensionException - If the gridToCS dimension is not the same than the coordinate system's dimension.
java.lang.IllegalArgumentException - if the number of bands differs from the number of sample dimensions.

GridCoverage

public GridCoverage(java.lang.String name,
                    java.awt.image.RenderedImage image,
                    CoordinateSystem cs,
                    Envelope envelope)
             throws org.opengis.spatialschema.geometry.MismatchedDimensionException
Deprecated. 
Construct a grid coverage with the specified envelope. A default set of sample dimensions is used.

Parameters:
name - The grid coverage name.
image - The image.
cs - The coordinate system. This specifies the coordinate system used when accessing a grid coverage with the "evaluate" methods. The number of dimensions must matches the number of dimensions for envelope.
envelope - The grid coverage cordinates. This envelope must have at least two dimensions. The two first dimensions describe the image location along x and y axis. The other dimensions are optional and may be used to locate the image on a vertical axis or on the time axis.
Throws:
org.opengis.spatialschema.geometry.MismatchedDimensionException - If the envelope's dimension is not the same than the coordinate system's dimension.

GridCoverage

public GridCoverage(java.lang.String name,
                    java.awt.image.RenderedImage image,
                    CoordinateSystem cs,
                    Envelope envelope,
                    SampleDimension[] bands,
                    GridCoverage[] sources,
                    java.util.Map properties)
             throws org.opengis.spatialschema.geometry.MismatchedDimensionException
Deprecated. 
Construct a grid coverage with the specified envelope and sample dimensions.

Parameters:
name - The grid coverage name.
image - The image.
cs - The coordinate system. This specifies the coordinate system used when accessing a grid coverage with the "evaluate" methods. The number of dimensions must matches the number of dimensions for envelope.
envelope - The grid coverage cordinates. This envelope must have at least two dimensions. The two first dimensions describe the image location along x and y axis. The other dimensions are optional and may be used to locate the image on a vertical axis or on the time axis.
bands - Sample dimensions for each image band, or null for default sample dimensions. If non-null, then this array's length must matches the number of bands in image.
sources - The sources for this grid coverage, or null if none.
properties - The set of properties for this coverage, or null if there is none. "Properties" in Java Advanced Imaging is what OpenGIS calls "Metadata". There is no getMetadataValue(...) method in this implementation. Use PropertySourceImpl.getProperty(java.lang.String) instead. Keys may be String or CaselessStringKey objects, while values may be any Object.
Throws:
org.opengis.spatialschema.geometry.MismatchedDimensionException - If the envelope's dimension is not the same than the coordinate system's dimension.
java.lang.IllegalArgumentException - if the number of bands differs from the number of sample dimensions.

GridCoverage

public GridCoverage(java.lang.String name,
                    java.awt.image.RenderedImage image,
                    CoordinateSystem cs,
                    MathTransform gridToCS,
                    SampleDimension[] bands,
                    GridCoverage[] sources,
                    java.util.Map properties)
             throws org.opengis.spatialschema.geometry.MismatchedDimensionException
Deprecated. 
Construct a grid coverage with the specified transform and sample dimension. This is the most general constructor, the one that gives the maximum control on the grid coverage to be created.

Parameters:
name - The grid coverage name.
image - The image.
cs - The coordinate system. This specifies the coordinate system used when accessing a grid coverage with the "evaluate" methods. The number of dimensions must matches the number of dimensions for gridToCS.
gridToCS - The math transform from grid to coordinate system.
bands - Sample dimensions for each image band, or null for default sample dimensions. If non-null, then this array's length must matches the number of bands in image.
sources - The sources for this grid coverage, or null if none.
properties - The set of properties for this coverage, or null if there is none. "Properties" in Java Advanced Imaging is what OpenGIS calls "Metadata". There is no getMetadataValue(...) method in this implementation. Use PropertySourceImpl.getProperty(java.lang.String) instead. Keys may be String or CaselessStringKey objects, while values may be any Object.
Throws:
org.opengis.spatialschema.geometry.MismatchedDimensionException - If the transform's dimension is not the same than the coordinate system's dimension.
java.lang.IllegalArgumentException - if the number of bands differs from the number of sample dimensions.
Method Detail

isDataEditable

public boolean isDataEditable()
Deprecated. 
Returns true if grid data can be edited. The default implementation returns true if image is an instance of WritableRenderedImage.

See Also:
GC_GridCoverage.isDataEditable()

getSources

public GridCoverage[] getSources()
Deprecated. 
Returns the source data for a grid coverage. If the GridCoverage was produced from an underlying dataset, the returned list is an empty list. If the GridCoverage was produced using GridCoverageProcessor then it should return the source grid coverage of the one used as input to GridCoverageProcessor. In general the getSources() method is intended to return the original GridCoverage on which it depends. This is intended to allow applications to establish what GridCoverages will be affected when others are updated, as well as to trace back to the "raw data".


getGridGeometry

public GridGeometry getGridGeometry()
Deprecated. 
Returns information for the grid coverage geometry. Grid geometry includes the valid range of grid coordinates and the georeferencing.

See Also:
GC_GridCoverage.getGridGeometry()

getEnvelope

public Envelope getEnvelope()
Deprecated. 
Returns The bounding box for the coverage domain in coordinate system coordinates.

Overrides:
getEnvelope in class Coverage
Returns:
The bounding box for the coverage domain in coordinate system coordinates.
See Also:
CV_Coverage.getEnvelope()

getSampleDimensions

public SampleDimension[] getSampleDimensions()
Deprecated. 
Retrieve sample dimension information for the coverage. For a grid coverage, a sample dimension is a band. The sample dimension information include such things as description, data type of the value (bit, byte, integer...), the no data values, minimum and maximum values and a color table if one is associated with the dimension. A coverage must have at least one sample dimension.

Specified by:
getSampleDimensions in class Coverage
Returns:
Sample dimension information for the coverage.
See Also:
CV_Coverage.getNumSampleDimensions(), CV_Coverage.getSampleDimension(int)

getInterpolation

public javax.media.jai.Interpolation getInterpolation()
Deprecated. 
Returns the interpolation used for all evaluate(...) methods. The default implementation returns InterpolationNearest.

Returns:
The interpolation.

evaluate

public int[] evaluate(CoordinatePoint coord,
                      int[] dest)
               throws org.opengis.coverage.CannotEvaluateException
Deprecated. 
Returns a sequence of integer values for a given point in the coverage.

Overrides:
evaluate in class Coverage
Parameters:
coord - The coordinate point where to evaluate.
dest - An array in which to store values, or null.
Returns:
An array containing values.
Throws:
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.
See Also:
CV_Coverage.evaluateAsInteger(org.opengis.pt.PT_CoordinatePoint)

evaluate

public float[] evaluate(CoordinatePoint coord,
                        float[] dest)
                 throws org.opengis.coverage.CannotEvaluateException
Deprecated. 
Returns a sequence of float values for a given point in the coverage.

Overrides:
evaluate in class Coverage
Parameters:
coord - The coordinate point where to evaluate.
dest - An array in which to store values, or null.
Returns:
An array containing values.
Throws:
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.

evaluate

public double[] evaluate(CoordinatePoint coord,
                         double[] dest)
                  throws org.opengis.coverage.CannotEvaluateException
Deprecated. 
Returns a sequence of double values for a given point in the coverage.

Specified by:
evaluate in class Coverage
Parameters:
coord - The coordinate point where to evaluate.
dest - An array in which to store values, or null.
Returns:
An array containing values.
Throws:
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.
See Also:
CV_Coverage.evaluateAsDouble(org.opengis.pt.PT_CoordinatePoint)

evaluate

public int[] evaluate(java.awt.geom.Point2D coord,
                      int[] dest)
               throws org.opengis.coverage.CannotEvaluateException
Deprecated. 
Returns a sequence of integer values for a given two-dimensional point in the coverage.

Parameters:
coord - The coordinate point where to evaluate.
dest - An array in which to store values, or null.
Returns:
An array containing values.
Throws:
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.

evaluate

public float[] evaluate(java.awt.geom.Point2D coord,
                        float[] dest)
                 throws org.opengis.coverage.CannotEvaluateException
Deprecated. 
Returns a sequence of float values for a given two-dimensional point in the coverage.

Parameters:
coord - The coordinate point where to evaluate.
dest - An array in which to store values, or null.
Returns:
An array containing values.
Throws:
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.

evaluate

public double[] evaluate(java.awt.geom.Point2D coord,
                         double[] dest)
                  throws org.opengis.coverage.CannotEvaluateException
Deprecated. 
Returns a sequence of double values for a given two-dimensional point in the coverage.

Parameters:
coord - The coordinate point where to evaluate.
dest - An array in which to store values, or null.
Returns:
An array containing values.
Throws:
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.

getDebugString

public java.lang.String getDebugString(CoordinatePoint coord)
Deprecated. 
Returns a debug string for the specified coordinate. This method produces a string with pixel coordinates and pixel values for all bands (with geophysics values or category name in parenthesis). Example for a 1-banded image:
(1171,1566)=[196 (29.6 ?C)]

Parameters:
coord - The coordinate point where to evaluate.
Returns:
A string with pixel coordinates and pixel values at the specified location, or null if coord is outside coverage.

getRenderedImage

public java.awt.image.RenderedImage getRenderedImage()
Deprecated. 
Returns grid data as a rendered image.


prefetch

public void prefetch(java.awt.geom.Rectangle2D area)
Deprecated. 
Hints that the given area may be needed in the near future. Some implementations may spawn a thread or threads to compute the tiles while others may ignore the hint.

Parameters:
area - A rectangle indicating which geographic area to prefetch. This area's coordinates must be expressed according the grid coverage's coordinate system, as given by Coverage.getCoordinateSystem().

geophysics

public GridCoverage geophysics(boolean geo)
Deprecated. 
If true, returns the geophysics companion of this grid coverage. In a geophysics grid coverage, all sample values are equals to geophysics ("real world") values without the need for any transformation. In such geophysics coverage, the sample to geophysics transform is the identity transform for all sample dimensions. "No data" values are expressed by NaN numbers.

This method may be understood as applying the JAI's piecewise operation with breakpoints specified by the Category objects in each sample dimension. However, it is more general in that the transformation specified with each breakpoint doesn't need to be linear. On an implementation note, this method will really try to use the first of the following operations which is found applicable: identity, lookup, rescale, piecewise and in last ressort a more general (but slower) sample transcoding algorithm.

GridCoverage objects live by pair: a geophysics one (used for computation) and a non-geophysics one (used for packing data, usually as integers). The geo argument specifies which object from the pair is wanted, regardless if this method is invoked on the geophysics or non-geophysics instance of the pair. In other words, the result of geophysics(b1).geophysics(b2).geophysics(b3) depends only on the value in the last call (b3).

Parameters:
geo - true to get a grid coverage with sample values equals to geophysics values, or false to get the packed version.
Returns:
The grid coverage. Never null, but may be this.
See Also:
SampleDimension.geophysics(boolean), Category.geophysics(boolean), LookupDescriptor, RescaleDescriptor, PiecewiseDescriptor

createGeophysics

protected GridCoverage createGeophysics(boolean geo)
Deprecated. 
Invoked by geophysics(boolean) when the packed or geophysics companion of this grid coverage need to be created. Subclasses may override this method in order to modify the object to be created.

Parameters:
geo - true to get a grid coverage with sample values equals to geophysics values, or false to get the packed version.
Returns:
The newly created grid coverage.
Task:
HACK: IndexColorModel seems to badly choose its sample model. As of JDK 1.4-rc1, it construct a ComponentSampleModel, which is drawn very slowly to the screen. A much faster sample model is PixelInterleavedSampleModel, which is the sample model used by BufferedImage for TYPE_BYTE_INDEXED. We should check if this is fixed in future J2SE release., HACK: This method provides an optimisation for the case of a linear transformations: it use the JAI's "Rescale" or "Piecewise" operations, which may be hardware accelerated. Unfortunatly, bug #4726416 prevent us to use this optimisation with JAI 1.1.1. The optimisation is enabled only if we are running JAI 1.1.2. This hack should be removed when JAI 1.1.2 will be widely available., HACK: The "Piecewise" operation is disabled because javac 1.4.1_01 generate illegal bytecode. This bug is fixed in javac 1.4.2-beta. However, we still have an ArrayIndexOutOfBoundsException in JAI code..., REVISIT: A special case (exactly one linear relationship with one NaN value mapping exactly to the index value 0) was optimized to the "Rescale" operation in previous version. This case is very common, which make this optimization a usefull one. Unfortunatly, it had to be disabled because there is nothing in the "Rescale" preventing some real number (not NaN) to maps to 0 through the normal linear relationship. Note that the optimization worked well in previous version except for the above-cited problem. We can very easily re- enable it later if we know the range of values really stored in the image (as of JAI's "extrema" operation). If would suffice to add a check making sure that the range of transformed values doesn't contains 0.

interpolate

protected GridCoverage interpolate(GridCoverage coverage)
Deprecated. Override createGeophysics(boolean) instead. This method will be removed in a future version.

Apply to the specified grid coverage the same interpolation than this grid coverage. This method is invoked internally by geophysics(boolean).

Parameters:
coverage - The coverage for which to apply the interpolation.
Returns:
A coverage with the same data than coverage but the same interpolation than this.

toString

public java.lang.String toString()
Deprecated. 
Returns a string repr?sentation of this coverage. This string is for debugging purpose only and may change in future version.

Overrides:
toString in class Coverage

fromGeoAPI

public static GridCoverage fromGeoAPI(org.opengis.coverage.grid.GridCoverage gc)
Deprecated. 
Mimic a GeoAPI interface as a legacy implementation. This method is provided as a temporary bridge for using new CRS object with J2D-Renderer for example.



Copyright © GeoTools. All Rights Reserved.