Documentation of 'org.opengis.coverage.grid.GridCoverage' Java class
GridCoverage
org.opengis.coverage.grid

Interface GridCoverage

  • All Superinterfaces:
    Coverage
    All Known Subinterfaces:
    GridAnalysis


    @UML(identifier="CV_GridCoverage",
         specification=OGC_01004)
    public interface GridCoverage
    extends Coverage
    Represent the basic implementation which provides access to grid coverage data. A GridCoverage implementation may provide the ability to update grid values.

     

    WARNING: THIS CLASS WILL CHANGE. Current API is derived from OGC Grid Coverages Implementation specification 1.0. We plan to replace it by new interfaces derived from ISO 19123 (Schema for coverage geometry and functions). Current interfaces should be considered as legacy and are included in this distribution only because they were part of GeoAPI 1.0 release. We will try to preserve as much compatibility as possible, but no migration plan has been determined yet.

    Since:
    GeoAPI 1.0
    See Also:
    RenderedImage, javax.media.jai.PixelAccessor
    • Method Detail

      • getOptimalDataBlockSizes

        @UML(identifier="optimalDataBlockSizes",
             obligation=OPTIONAL,
             specification=OGC_01004)
        int[] getOptimalDataBlockSizes()
        Optimal size to use for each dimension when accessing grid values. These values together give the optimal block size to use when retrieving grid coverage values. For example, a client application can achieve better performance for a 2-D grid coverage by reading blocks of 128 by 128 if the grid is tiled into blocks of this size. The sequence is ordered by dimension. If the implementation does not have optimal sizes, the sequence will be null.
        Returns:
        The optimal size to use for each dimension when accessing grid values, or null if none.
      • getOverviewGridGeometry

        @UML(identifier="getOverviewGridGeometry",
             obligation=MANDATORY,
             specification=OGC_01004)
        GridGeometry getOverviewGridGeometry(int overviewIndex)
                                                                                                                                          throws java.lang.IndexOutOfBoundsException
        Returns the grid geometry for an overview.
        Parameters:
        overviewIndex - Overview index for which to retrieve grid geometry. Indices start at 0.
        Returns:
        The grid geometry for an overview.
        Throws:
        java.lang.IndexOutOfBoundsException - if overviewIndex is out of bounds.
      • getOverview

        @UML(identifier="getOverview",
             obligation=MANDATORY,
             specification=OGC_01004)
        GridCoverage getOverview(int overviewIndex)
                                                                                                                  throws java.lang.IndexOutOfBoundsException
        Returns a pre-calculated overview for a grid coverage. The overview indices are numbered from 0 to numberOverviews-1. The overviews are ordered from highest (index 0) to lowest (numberOverviews-1) resolution. Overview grid coverages will have overviews which are the overviews for the grid coverage with lower resolution than the overview. For example, a 1 meter grid coverage with 3, 9, and 27 meter overviews will be ordered as in the left side below. The 3 meter overview will have 2 overviews as in the right side below:
        1 meter GC   3 meter overview
        Index   resolution
        0 3
        1 9
        2 27
                    
        Index   resolution
        0 9
        1 27
        Parameters:
        overviewIndex - Index of grid coverage overview to retrieve. Indexes start at 0.
        Returns:
        a pre-calculated overview for a grid coverage.
        Throws:
        java.lang.IndexOutOfBoundsException - if overviewIndex is out of bounds.
      • getDataBlock

        @UML(identifier="getDataBlockAsBoolean",
             obligation=MANDATORY,
             specification=OGC_01004)
        boolean[] getDataBlock(GridRange gridRange,
                                                                                                                                 boolean[] destination)
                                                                                                                          throws InvalidRangeException,
                                                                                                                                 java.lang.ArrayIndexOutOfBoundsException
        Return a sequence of boolean values for a block. A value for each sample dimension will be returned. The semantic is the same as getDataBlock(GridRange, double[]) except for the return type.
        Parameters:
        gridRange - Grid range for block of data to be accessed.
        destination - An optionally preallocated array in which to store the values, or null if none.
        Returns:
        A sequence of boolean values for a given block in the coverage. If destination was non-null, then it is returned. Otherwise, a new array is allocated and returned.
        Throws:
        InvalidRangeException - if gridRange is out of this grid range bounds.
        java.lang.ArrayIndexOutOfBoundsException - if the destination array is not null and too small to hold the output.
        See Also:
        setDataBlock(GridRange, boolean[])
      • getDataBlock

        @UML(identifier="getDataBlockAsByte",
             obligation=MANDATORY,
             specification=OGC_01004)
        byte[] getDataBlock(GridRange gridRange,
                                                                                                                           byte[] destination)
                                                                                                                    throws InvalidRangeException,
                                                                                                                           java.lang.ArrayIndexOutOfBoundsException
        Return a sequence of 8 bits values for a block. A value for each sample dimension will be returned. The semantic is the same as getDataBlock(GridRange, double[]) except for the return type.
        Parameters:
        gridRange - Grid range for block of data to be accessed.
        destination - An optionally preallocated array in which to store the values, or null if none.
        Returns:
        A sequence of 8 bits values for a given block in the coverage. If destination was non-null, then it is returned. Otherwise, a new array is allocated and returned.
        Throws:
        InvalidRangeException - if gridRange is out of this grid range bounds.
        java.lang.ArrayIndexOutOfBoundsException - if the destination array is not null and too small to hold the output.
        See Also:
        setDataBlock(GridRange, byte[]), javax.media.jai.UnpackedImageData#getByteData()
      • getDataBlock

        @UML(identifier="getDataBlockAsInteger",
             obligation=MANDATORY,
             specification=OGC_01004)
        short[] getDataBlock(GridRange gridRange,
                                                                                                                               short[] destination)
                                                                                                                        throws InvalidRangeException,
                                                                                                                               java.lang.ArrayIndexOutOfBoundsException
        Return a sequence of 16 bits values for a block. A value for each sample dimension will be returned. The semantic is the same as getDataBlock(GridRange, double[]) except for the return type.
        Parameters:
        gridRange - Grid range for block of data to be accessed.
        destination - An optionally preallocated array in which to store the values, or null if none.
        Returns:
        A sequence of 16 bits values for a given block in the coverage. If destination was non-null, then it is returned. Otherwise, a new array is allocated and returned.
        Throws:
        InvalidRangeException - if gridRange is out of this grid range bounds.
        java.lang.ArrayIndexOutOfBoundsException - if the destination array is not null and too small to hold the output.
        See Also:
        setDataBlock(GridRange, int[]), javax.media.jai.UnpackedImageData#getShortData()
      • getDataBlock

        @UML(identifier="getDataBlockAsInteger",
             obligation=MANDATORY,
             specification=OGC_01004)
        int[] getDataBlock(GridRange gridRange,
                                                                                                                             int[] destination)
                                                                                                                      throws InvalidRangeException,
                                                                                                                             java.lang.ArrayIndexOutOfBoundsException
        Return a sequence of 32 bits values for a block. A value for each sample dimension will be returned. The semantic is the same as getDataBlock(GridRange, double[]) except for the return type.
        Parameters:
        gridRange - Grid range for block of data to be accessed.
        destination - An optionally preallocated array in which to store the values, or null if none.
        Returns:
        A sequence of 32 bits values for a given block in the coverage. If destination was non-null, then it is returned. Otherwise, a new array is allocated and returned.
        Throws:
        InvalidRangeException - if gridRange is out of this grid range bounds.
        java.lang.ArrayIndexOutOfBoundsException - if the destination array is not null and too small to hold the output.
        See Also:
        setDataBlock(GridRange, int[]), Raster.getPixels(int,int,int,int,int[]), javax.media.jai.UnpackedImageData#getIntData()
      • getDataBlock

        float[] getDataBlock(GridRange gridRange,
                             float[] destination)
                      throws InvalidRangeException,
                             java.lang.ArrayIndexOutOfBoundsException
        Return a sequence of float values for a block. A value for each sample dimension will be returned. The semantic is the same as getDataBlock(GridRange, double[]) except for the return type.
        Parameters:
        gridRange - Grid range for block of data to be accessed.
        destination - An optionally preallocated array in which to store the values, or null if none.
        Returns:
        A sequence of float values for a given block in the coverage. If destination was non-null, then it is returned. Otherwise, a new array is allocated and returned.
        Throws:
        InvalidRangeException - if gridRange is out of this grid range bounds.
        java.lang.ArrayIndexOutOfBoundsException - if the destination array is not null and too small to hold the output.
        See Also:
        setDataBlock(GridRange, float[]), Raster.getPixels(int,int,int,int,float[]), javax.media.jai.UnpackedImageData#getFloatData()
      • getDataBlock

        @UML(identifier="getValueBlockAsDouble",
             obligation=MANDATORY,
             specification=OGC_01004)
        double[] getDataBlock(GridRange gridRange,
                                                                                                                                double[] destination)
                                                                                                                         throws InvalidRangeException,
                                                                                                                                java.lang.ArrayIndexOutOfBoundsException
        Return a sequence of double values for a block. A value for each sample dimension will be returned. The return value is an N+1 dimensional safe-array, with dimensions (sample dimension, dimension n, dimension n-1, ... dimension 1). For 2 dimensional grid coverages, this safe array will be accessed as (sample dimension, column, row). The index values will be based from 0. The indices in the returned N dimensional safe array will need to be offset by gridRange minimum coordinates to get equivalent grid coordinates.

        The requested grid range must satisfy the following rules for each dimension of the grid coverage:

        minimum grid coordinate <= grid range mimimun <= grid range maximum <= maximum grid coordinate
        The number of values returned will equal:
        (max1 � min1 + 1) * (max2 � min2 + 1) ... * (maxn � minn + 1) * numSampleDimensions
        Where min is the minimum ordinate in the grid range, max is the maximum ordinate in the grid range and N is the number of dimensions in the grid coverage.
        Parameters:
        gridRange - Grid range for block of data to be accessed.
        destination - An optionally preallocated array in which to store the values, or null if none.
        Returns:
        A sequence of double values for a given block in the coverage. If destination was non-null, then it is returned. Otherwise, a new array is allocated and returned.
        Throws:
        InvalidRangeException - if gridRange is out of this grid range bounds.
        java.lang.ArrayIndexOutOfBoundsException - if the destination array is not null and too small to hold the output.
        See Also:
        setDataBlock(GridRange, double[]), Raster.getPixels(int,int,int,int,double[]), javax.media.jai.UnpackedImageData#getDoubleData()
      • getPackedDataBlock

        @UML(identifier="getPackedDataBlock",
             obligation=MANDATORY,
             specification=OGC_01004)
        byte[] getPackedDataBlock(GridRange gridRange)
                                                                                                                          throws InvalidRangeException
        Return a block of grid coverage data for all sample dimensions. A value for each sample dimension will be returned. This operation provides efficient access of the grid values. The sequencing order of the values in the sequence will follow the rules given by valueInBytePacking and bandPacking defined in GridPacking. The requested grid range must satisfy the following rules for each dimension of the grid coverage:
        minimum grid coordinate <= grid range mimimun <= grid range maximum <= maximum grid coordinate
        The sequence of bytes returned will match the data type of the dimension. For example, a grid with one 16 bit unsigned (UNSIGNED_16BITS) sample dimension will return 2 bytes for every cell in the block.

        Byte padding rules for grid values of less than 8 bits
        For 2D grid coverages, padding is to the nearest byte for the following cases:

        For PixelInterleaved For grids with multiple sample dimensions, padding occurs between pixels for each change in dimension type.
        For LineInterleaved Padding occurs at the end of each row or column (depending on the valueSequence of the grid).
        For BandSequencial Padding occurs at the end of every sample dimension.
        For grid values smaller than 8 bits, their order within each byte is given by the value defined in valueInBytePacking. For grid values bigger than 8 bits, the order of their bytes is given by the value defined in byteInValuePacking.
        Parameters:
        gridRange - Grid range for block of data to be accessed.
        Returns:
        a block of grid coverage data for all sample dimensions.
        Throws:
        InvalidRangeException - if gridRange is out of this grid range bounds.

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.