| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.media.jai.PropertySourceImpl
org.geotools.cv.Coverage
org.geotools.gc.GridCoverage
GridCoverage2D.
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).
GC_GridCoverage, 
Serialized Form| Nested Class Summary | |
| protected  class | GridCoverage.ExportDeprecated. Export a Geotools GridCoverageas an OpenGISGC_GridCoverageobject. | 
| static interface | GridCoverage.RemoteDeprecated. Interface for OpenGIS's GC_GridCoveragecapable to produce aRenderedImage. | 
| Nested classes inherited from class org.geotools.cv.Coverage | 
| Coverage.Renderable | 
| Field Summary | |
| protected  GridGeometry | gridGeometryDeprecated. The grid geometry. | 
| protected  javax.media.jai.PlanarImage | imageDeprecated. 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 trueif 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 | 
protected transient javax.media.jai.PlanarImage image
protected final GridGeometry gridGeometry
| Constructor Detail | 
protected GridCoverage(GridCoverage coverage)
coverage - The source grid coverage.
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
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.
org.opengis.spatialschema.geometry.MismatchedDimensionException - If the grid range's dimension
         is not the same than the coordinate system's dimension.
public GridCoverage(java.lang.String name,
                    java.awt.image.WritableRaster raster,
                    Envelope envelope)
             throws org.opengis.spatialschema.geometry.MismatchedDimensionException
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.
org.opengis.spatialschema.geometry.MismatchedDimensionException - If the envelope's dimension is not 2.
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)
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)Hints.SAMPLE_DIMENSION_TYPE specifies the
                    SampleDimensionType to be used at rendering time, which can be
                    one of UBYTE or
                    USHORT.
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.
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)
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)Hints.SAMPLE_DIMENSION_TYPE specifies the
                    SampleDimensionType to be used at rendering time, which can be
                    one of UBYTE or
                    USHORT.
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.
public GridCoverage(java.lang.String name,
                    java.awt.image.RenderedImage image,
                    CoordinateSystem cs,
                    Envelope envelope)
             throws org.opengis.spatialschema.geometry.MismatchedDimensionException
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.
org.opengis.spatialschema.geometry.MismatchedDimensionException - If the envelope's dimension
         is not the same than the coordinate system's dimension.
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
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.
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.
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
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.
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 | 
public boolean isDataEditable()
true if grid data can be edited. The default
 implementation returns true  if  image is an
 instance of WritableRenderedImage.
GC_GridCoverage.isDataEditable()public GridCoverage[] getSources()
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".
public GridGeometry getGridGeometry()
GC_GridCoverage.getGridGeometry()public Envelope getEnvelope()
getEnvelope in class CoverageCV_Coverage.getEnvelope()public SampleDimension[] getSampleDimensions()
getSampleDimensions in class CoverageCV_Coverage.getNumSampleDimensions(), 
CV_Coverage.getSampleDimension(int)public javax.media.jai.Interpolation getInterpolation()
evaluate(...) methods.
 The default implementation returns InterpolationNearest.
public int[] evaluate(CoordinatePoint coord,
                      int[] dest)
               throws org.opengis.coverage.CannotEvaluateException
evaluate in class Coveragecoord - The coordinate point where to evaluate.dest - An array in which to store values, or null.
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.CV_Coverage.evaluateAsInteger(org.opengis.pt.PT_CoordinatePoint)
public float[] evaluate(CoordinatePoint coord,
                        float[] dest)
                 throws org.opengis.coverage.CannotEvaluateException
evaluate in class Coveragecoord - The coordinate point where to evaluate.dest - An array in which to store values, or null.
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.
public double[] evaluate(CoordinatePoint coord,
                         double[] dest)
                  throws org.opengis.coverage.CannotEvaluateException
evaluate in class Coveragecoord - The coordinate point where to evaluate.dest - An array in which to store values, or null.
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.CV_Coverage.evaluateAsDouble(org.opengis.pt.PT_CoordinatePoint)
public int[] evaluate(java.awt.geom.Point2D coord,
                      int[] dest)
               throws org.opengis.coverage.CannotEvaluateException
coord - The coordinate point where to evaluate.dest - An array in which to store values, or null.
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.
public float[] evaluate(java.awt.geom.Point2D coord,
                        float[] dest)
                 throws org.opengis.coverage.CannotEvaluateException
coord - The coordinate point where to evaluate.dest - An array in which to store values, or null.
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.
public double[] evaluate(java.awt.geom.Point2D coord,
                         double[] dest)
                  throws org.opengis.coverage.CannotEvaluateException
coord - The coordinate point where to evaluate.dest - An array in which to store values, or null.
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.public java.lang.String getDebugString(CoordinatePoint coord)
(1171,1566)=[196 (29.6 ?C)]
coord - The coordinate point where to evaluate.
null if coord is outside coverage.public java.awt.image.RenderedImage getRenderedImage()
public void prefetch(java.awt.geom.Rectangle2D area)
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().public GridCoverage geophysics(boolean geo)
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.
 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).
geo - true to get a grid coverage with sample values equals to geophysics
         values, or false to get the packed version.
null, but may be this.SampleDimension.geophysics(boolean), 
Category.geophysics(boolean), 
LookupDescriptor, 
RescaleDescriptor, 
PiecewiseDescriptorprotected GridCoverage createGeophysics(boolean geo)
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.
geo - true to get a grid coverage with sample values equals to
         geophysics values, or false to get the packed version.
protected GridCoverage interpolate(GridCoverage coverage)
createGeophysics(boolean) instead.
             This method will be removed in a future version.
geophysics(boolean).
coverage - The coverage for which to apply the interpolation.
coverage but
         the same interpolation than this.public java.lang.String toString()
toString in class Coveragepublic static GridCoverage fromGeoAPI(org.opengis.coverage.grid.GridCoverage gc)
| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||