org.opengis.cv
Interface CV_Coverage

All Superinterfaces:
java.rmi.Remote
All Known Subinterfaces:
GC_GridCoverage, GP_GridAnalysis
All Known Implementing Classes:
CV_Coverage_Impl, GC_GridCoverage_Impl, GP_GridAnalysis_Impl, ImageGridCoverage

public interface CV_Coverage
extends java.rmi.Remote

Provides access to an OpenGIS coverage. The essential property of coverage is to be able to generate a value for any point within its domain. How coverage is represented internally is not a concern. For example consider the following different internal representations of coverage:

  1. A coverage may be represented by a set of polygons which exhaustively tile a plane (that is each point on the plane falls in precisely one polygon). The value returned by the coverage for a point is the value of an attribute of the polygon that contains the point.
  2. A coverage may be represented by a grid of values. The value returned by the coverage for a point is that of the grid value whose location is nearest the point.
  3. Coverage may be represented by a mathematical function. The value returned by the coverage for a point is just the return value of the function when supplied the coordinates of the point as arguments.
  4. Coverage may be represented by combination of these. For example, coverage may be represented by a combination of mathematical functions valid over a set of polynomials.
A coverage has a corresponding CV_SampleDimension for each sample dimension in the coverage.

Since:
1.00
Version:
1.00

Method Summary
 java.lang.Object evaluate(PT_CoordinatePoint point)
          Return the value vector for a given point in the coverage.
 boolean[] evaluateAsBoolean(PT_CoordinatePoint point)
          Return a sequence of Boolean values for a given point in the coverage.
 byte[] evaluateAsByte(PT_CoordinatePoint point)
          Return a sequence of unsigned byte values for a given point in the coverage.
 double[] evaluateAsDouble(PT_CoordinatePoint point)
          Return a sequence of double values for a given point in the coverage.
 int[] evaluateAsInteger(PT_CoordinatePoint point)
          Return a sequence of integer values for a given point in the coverage.
 CS_CoordinateSystem getCoordinateSystem()
          This specifies the coordinate system used when accessing a coverage or grid coverage with the evaluate methods.
 java.lang.String[] getDimensionNames()
          The names of each dimension in the coverage.
 PT_Envelope getEnvelope()
          The bounding box for the coverage domain in coordinate system coordinates.
 java.lang.String[] getMetadataNames()
          List of metadata keywords for a coverage.
 java.lang.String getMetadataValue(java.lang.String name)
          Retrieve the metadata value for a given metadata name.
 int getNumSampleDimensions()
          The number of sample dimensions in the coverage.
 int getNumSources()
          Number of grid coverages which the grid coverage was derived from.
 CV_SampleDimension getSampleDimension(int index)
          Retrieve sample dimension information for the coverage.
 GC_GridCoverage getSource(int sourceDataIndex)
          Returns the source data for a grid coverage.
 

Method Detail

getNumSampleDimensions

public int getNumSampleDimensions()
                           throws java.rmi.RemoteException
The number of sample dimensions in the coverage. For grid coverages, a sample dimension is a band.

Returns:
the number of sample dimensions in the coverage.
Throws:
java.rmi.RemoteException - if a remote method call failed.

getDimensionNames

public java.lang.String[] getDimensionNames()
                                     throws java.rmi.RemoteException
The names of each dimension in the coverage. Typically these names are x, y, z and t. The number of items in the sequence is the number of dimensions in the coverage. Grid coverages are typically 2D (x, y) while other coverages may be 3D (x, y, z) or 4D (x, y, z, t). The number of dimensions of the coverage is the number of entries in the list of dimension names.

Returns:
the names of each dimension in the coverage.
Throws:
java.rmi.RemoteException - if a remote method call failed.

getNumSources

public int getNumSources()
                  throws java.rmi.RemoteException
Number of grid coverages which the grid coverage was derived from. This implementation specification does not include interfaces for creating collections of coverages therefore this value will usually be one indicating an adapted grid coverage, or zero indicating a raw grid coverage.

Returns:
the number of grid coverages which the grid coverage was derived from.
Throws:
java.rmi.RemoteException - if a remote method call failed.

getMetadataNames

public java.lang.String[] getMetadataNames()
                                    throws java.rmi.RemoteException
List of metadata keywords for a coverage. If no metadata is available, the sequence will be empty.

Returns:
the list of metadata keywords for a coverage.
Throws:
java.rmi.RemoteException - if a remote method call failed.

getCoordinateSystem

public CS_CoordinateSystem getCoordinateSystem()
                                        throws java.rmi.RemoteException
This specifies the coordinate system used when accessing a coverage or grid coverage with the evaluate methods. It is also the coordinate system of the coordinates used with the math transform (see gridToCoordinateSystem). This coordinate system is usually different than the grid coordinate system of the grid. grid coverage can be accessed (re-projected) with new coordinate system with the GP_GridCoverageProcessor component. In this case, a new instance of a grid coverage is created.

Note: If a coverage does not have an associated coordinate system, the returned value will be null. The gridToCoordinateSystem) attribute should also be null if the coordinate system is null.

Returns:
the coordinate system used when accessing a coverage or grid coverage with the evaluate methods.
Throws:
java.rmi.RemoteException - if a remote method call failed.

getEnvelope

public PT_Envelope getEnvelope()
                        throws java.rmi.RemoteException
The bounding box for the coverage domain in coordinate system coordinates. For grid coverages, the grid cells are centered on each grid coordinate. The envelope for a 2-D grid coverage includes the following corner positions.
 (Minimum row - 0.5, Minimum column - 0.5) for the minimum coordinates
 (Maximum row - 0.5, Maximum column - 0.5) for the maximum coordinates
 
If a grid coverage does not have any associated coordinate system, the minimum and maximum coordinate points for the envelope will be empty sequences.

Returns:
the bounding box for the coverage domain in coordinate system coordinates.
Throws:
java.rmi.RemoteException - if a remote method call failed.

getSampleDimension

public CV_SampleDimension getSampleDimension(int index)
                                      throws java.rmi.RemoteException
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.

Parameters:
index - Index for sample dimension to retrieve. Indices are numbered 0 to (n-1).
Returns:
Sample dimension information for the coverage.
Throws:
java.rmi.RemoteException - if a remote method call failed.

getSource

public GC_GridCoverage getSource(int sourceDataIndex)
                          throws java.rmi.RemoteException
Returns the source data for a grid coverage. If the GC_GridCoverage was produced from an underlying dataset (by createFromName or createFromSubName for instance) the getNumSources() method should returns zero, and this method should not be called. If the GC_GridCoverage} was produced using {link org.opengis.gp.GP_GridCoverageProcessor} then it should return the source grid coverage of the one used as input to GP_GridCoverageProcessor. In general the source() method is intended to return the original GC_GridCoverage on which it depends. This is intended to allow applications to establish what GC_GridCoverages will be affected when others are updated, as well as to trace back to the "raw data".

Parameters:
sourceDataIndex - Source grid coverage index. Indexes start at 0.
Returns:
the source data for a grid coverage.
Throws:
java.rmi.RemoteException - if a remote method call failed.

getMetadataValue

public java.lang.String getMetadataValue(java.lang.String name)
                                  throws java.rmi.RemoteException
Retrieve the metadata value for a given metadata name.

Parameters:
name - Metadata keyword for which to retrieve data.
Returns:
the metadata value for a given metadata name.
Throws:
java.rmi.RemoteException - if a remote method call failed.

evaluate

public java.lang.Object evaluate(PT_CoordinatePoint point)
                          throws java.rmi.RemoteException
Return the value vector for a given point in the coverage. A value for each sample dimension is included in the vector. The default interpolation type used when accessing grid values for points which fall between grid cells is nearest neighbor. The coordinate system of the point is the same as the grid coverage coordinate system (specified by the getCoordinateSystem()).

Parameters:
point - Point at which to find the grid values.
Returns:
the value vector for a given point in the coverage.
Throws:
java.rmi.RemoteException - if a remote method call failed.

evaluateAsBoolean

public boolean[] evaluateAsBoolean(PT_CoordinatePoint point)
                            throws java.rmi.RemoteException
Return a sequence of Boolean values for a given point in the coverage. A value for each sample dimension is included in the sequence. The default interpolation type used when accessing grid values for points which fall between grid cells is nearest neighbor. The coordinate system of the point is the same as the grid coverage coordinate system.

Parameters:
point - Point at which to find the coverage values.
Returns:
a sequence of Boolean values for a given point in the coverage.
Throws:
java.rmi.RemoteException - if a remote method call failed.

evaluateAsByte

public byte[] evaluateAsByte(PT_CoordinatePoint point)
                      throws java.rmi.RemoteException
Return a sequence of unsigned byte values for a given point in the coverage. A value for each sample dimension is included in the sequence. The default interpolation type used when accessing grid values for points which fall between grid cells is nearest neighbor. The coordinate system of the point is the same as the grid coverage coordinate system.

Parameters:
point - Point at which to find the coverage values.
Returns:
a sequence of unsigned byte values for a given point in the coverage.
Throws:
java.rmi.RemoteException - if a remote method call failed.

evaluateAsInteger

public int[] evaluateAsInteger(PT_CoordinatePoint point)
                        throws java.rmi.RemoteException
Return a sequence of integer values for a given point in the coverage. A value for each sample dimension is included in the sequence. The default interpolation type used when accessing grid values for points which fall between grid cells is nearest neighbor. The coordinate system of the point is the same as the grid coverage coordinate system.

Parameters:
point - Point at which to find the grid values.
Returns:
a sequence of integer values for a given point in the coverage.
Throws:
java.rmi.RemoteException - if a remote method call failed.

evaluateAsDouble

public double[] evaluateAsDouble(PT_CoordinatePoint point)
                          throws java.rmi.RemoteException
Return a sequence of double values for a given point in the coverage. A value for each sample dimension is included in the sequence. The default interpolation type used when accessing grid values for points which fall between grid cells is nearest neighbor. The coordinate system of the point is the same as the grid coverage coordinate system.

Parameters:
point - Point at which to find the grid values.
Returns:
a sequence of double values for a given point in the coverage.
Throws:
java.rmi.RemoteException - if a remote method call failed.