Open Geospatial Consortium, Inc.
OpenGIS® Implementation Specification:
Grid Coverage

R
ET

IR

ED

Revision 1.00

OpenGIS Project Document 01-004
Release Date: 12 January 2001

Copyright © Open Geospatial Consortium, Inc (2005)
To obtain additional rights of use, visit http://www.opengeospatial.org/legal/License Agreement
Permission is hereby granted by the Open Geospatial Consortium, ("Licensor"), free of charge and subject to the terms set forth below,
to any person obtaining a copy of this Intellectual Property and any associated documentation, to deal in the Intellectual Property
without restriction (except as set forth below), including without limitation the rights to implement, use, copy, modify, merge, publish,
distribute, and/or sublicense copies of the Intellectual Property, and to permit persons to whom the Intellectual Property is furnished to
do so, provided that all copyright notices on the intellectual property are retained intact and that each person to whom the Intellectual
Property is furnished agrees to the terms of this Agreement.
If you modify the Intellectual Property, all copies of the modified Intellectual Property must include, in addition to the above
copyright notice, a notice that the Intellectual Property includes modifications that have not been approved or adopted by LICENSOR.
THIS LICENSE IS A COPYRIGHT LICENSE ONLY, AND DOES NOT CONVEY ANY RIGHTS UNDER ANY PATENTSTHAT MAY BE IN FORCE ANYWHERE IN THE WORLD.
THE INTELLECTUAL PROPERTY IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULARPURPOSE, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE COPYRIGHT HOLDER OR HOLDERS INCLUDEDIN THIS NOTICE DO NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE INTELLECTUAL PROPERTY WILLMEET YOUR REQUIREMENTS OR THAT THE OPERATION OF THE INTELLECTUAL PROPERTY WILL BE
UNINTERRUPTED OR ERROR FREE. ANY USE OF THE INTELLECTUAL PROPERTY SHALL BE MADE ENTIRELY AT
THE USER’S OWN RISK. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ANY CONTRIBUTOR OFINTELLECTUAL PROPERTY RIGHTS TO THE INTELLECTUAL PROPERTY BE LIABLE FOR ANY CLAIM, OR ANY
DIRECT, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTINGFROM ANY ALLEGED INFRINGEMENT OR ANY LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
CONTRACT, NEGLIGENCE OR UNDER ANY OTHER LEGAL THEORY, ARISING OUT OF OR IN CONNECTION WITH
THE IMPLEMENTATION, USE, COMMERCIALIZATION OR PERFORMANCE OF THIS INTELLECTUAL PROPERTY.
This license is effective until terminated. You may terminate it at any time by destroying the Intellectual Property together with all
copies in any form. The license will also terminate if you fail to comply with any term or condition of this Agreement. Except asprovided in the following sentence, no such termination of this license shall require the termination of any third party end-user
sublicense to the Intellectual Property which is in force as of the date of notice of such termination. In addition, should the Intellectual
Property, or the operation of the Intellectual Property, infringe, or in LICENSOR’s sole opinion be likely to infringe, any patent,
copyright, trademark or other right of a third party, you agree that LICENSOR, in its sole discretion, may terminate this license
without any compensation or liability to you, your licensees or any other party. You agree upon termination of any kind to destroy orcause to be destroyed the Intellectual Property together with all copies in any form, whether held by you or by any third party.
Except as contained in this notice, the name of LICENSOR or of any other holder of a copyright in all or part of the Intellectual
Property shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Intellectual Property without
prior written authorization of LICENSOR or such copyright holder. LICENSOR is and shall at all times be the sole entity that may
authorize you or any third party to use certification marks, trademarks or other special designations to indicate compliance with any
LICENSOR standards or specifications.
This Agreement is governed by the laws of the Commonwealth of Massachusetts. The application to this Agreement of the United
Nations Convention on Contracts for the International Sale of Goods is hereby expressly excluded. In the event any provision of thisAgreement shall be deemed unenforceable, void or invalid, such provision shall be modified so as to make it valid and enforceable,
and as so modified the entire Agreement shall remain in full force and effect. No decision, action or inaction by LICENSOR shall be
construed to be a waiver of any rights or remedies available to it.
None of the Intellectual Property or underlying information or technology may be downloaded or otherwise exported or reexported inviolation of U.S. export laws and regulations. In addition, you are responsible for complying with any local laws in your jurisdiction
which may impact your right to import, export or use the Intellectual Property, and you represent that you have complied with any
regulations or registration procedures required by applicable law to make this license enforceableii

Copyright © 2012 Open Geospatial Consortium

OpenGIS Implementation Specification

Grid Coverages

TABLE OF CONTENTSTABLE OF CONTENTS _____________________________________________________________ 3
TABLE OF FIGURES _______________________________________________________________ 8

0.0

PREFACE _______________________________________________________________ 9

0.1

SUBMITTING COMPANIES____________________________________________________ 9

0.2

SUBMISSION CONTACT POINTS ______________________________________________ 9

0.3

DOCUMENT CONVENTIONS __________________________________________________ 9

0.4

REVISION HISTORY _________________________________________________________ 10

0.5

EDITORIAL NOTES__________________________________________________________ 10

0.6

CHANGES TO THE ABSTRACT SPECIFICATION _______________________________ 10

0.7

DEPENDENCIES ON OTHER OGC SPECIFICATIONS ___________________________ 10

SPECIFICATION OVERVIEW_______________________________________________ 10

2

ARCHITECTURE _________________________________________________________ 11
2.1

ED

1

Grid Coverages _______________________________________________________________ 11
Grid Coverage Characteristics_______________________________________________________ 11
Grid Coordinate System ____________________________________________________________ 12
Grid Coverage Tiling ______________________________________________________________ 12
Color Palettes_____________________________________________________________________ 12Interoperability ___________________________________________________________________ 12

IR

2.1.1
2.1.2
2.1.3
2.1.4
2.1.5

CV_Coverage ________________________________________________________________ 13

2.3

GC_GridCoverage ____________________________________________________________ 14

2.4

GC_CoverageExchange ________________________________________________________ 15

2.5

GP_GridAnalysis (optional) ____________________________________________________ 16

2.6

GP_GridCoverageProcessor (optional) ___________________________________________ 17

2.7Interfaces Supporting Coverage (CV) Package _____________________________________ 18

R
ET

2.2

2.7.1

2.8

CV_SampleDimension _____________________________________________________________ 18

Interfaces/Datatypes Supporting Grid Coverage (GC) Package_______________________ 18

2.8.1
2.8.2
2.8.3
2.8.4
2.8.5
2.8.6

2.9

GC_GridPacking__________________________________________________________________ 18
GC_GridGeometry ________________________________________________________________ 18
GC_GridRange ___________________________________________________________________ 18
GC_ParameterInfo ________________________________________________________________ 18
GC_Parameter____________________________________________________________________ 18
GC_Format ______________________________________________________________________ 18

Interfaces Supporting Grid Coverage Processing (GP) Package ______________________ 18

2.9.1

GP_Operation ____________________________________________________________________ 18

3 COMPONENT SERVICES ____________________________________________________ 19
3.1

GRID CONPONENTS CLASSES AND INTERFACES _____________________________ 19

3.1.1
CV_Coverage_____________________________________________________________________ 19
3.1.1.1 Attributes ______________________________________________________________________ 19
3.1.1.1.1 +numSampleDimensions : Integer ________________________________________________ 19

Page 3 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

R
ET

IR

ED

3.1.1.1.2 +dimensionNames : Sequence<CharacterString>____________________________________ 19
3.1.1.1.3 +numSource : Integer __________________________________________________________ 20
3.1.1.1.4 +metadataNames : Sequence <CharacterString> ____________________________________ 20
3.1.1.1.5 +coordinateSystem : CS_CoordinateSystem ________________________________________ 20
3.1.1.1.6 +envelope : PT_Envelope________________________________________________________ 20
3.1.1.2 getSampleDimension_____________________________________________________________ 20
3.1.1.3 getSource ______________________________________________________________________ 21
3.1.1.4
getMetadataValue _____________________________________________________________ 21
3.1.1.5 evaluate _______________________________________________________________________ 21
3.1.1.6 evaluateAsBoolean ______________________________________________________________ 22
3.1.1.7 evaluateAsByte _________________________________________________________________ 22
3.1.1.8 evaluateAsInteger _______________________________________________________________ 22
3.1.1.9 evaluateAsDouble _______________________________________________________________ 23
3.1.2
GC_GridCoverage ________________________________________________________________ 23
3.1.2.1 Attributes ________________________________________________________________________ 24
3.1.2.1.1 +dataEditable : Boolean_________________________________________________________ 24
3.1.2.1.2 +gridPacking : GC_GridPacking _______________________________________________ 25
3.1.2.1.3 +gridGeometry : GC_GridGeometry ____________________________________________ 25
3.1.2.1.4 +numOverviews : Integer _______________________________________________________ 25
3.1.2.2 getOverviewGridGeometry _______________________________________________________ 25
3.1.2.3 getOverview ____________________________________________________________________ 25
3.1.2.4 getDataBlockAsXXX_____________________________________________________________ 26
3.1.2.5 getPackedDataBlock _____________________________________________________________ 27
3.1.2.6 setDataBlockAsXXX _____________________________________________________________ 28
3.1.2.7 setPackedDataBlock _____________________________________________________________ 28
3.1.3 GC_GridCoverageExchange____________________________________________________________ 29
3.1.3.1 Attributes ________________________________________________________________________ 29
3.1.3.1.1 +numFormats : Integer _________________________________________________________ 29
3.1.3.1.2 +metadataNames : Sequence<CharacterString> ____________________________________ 29
3.1.3.2 getFormat _____________________________________________________________________ 29
3.1.3.3 getMetadataValue _________________________________________________________________ 30
3.1.3.4 createFromName__________________________________________________________________ 30
3.1.3.5 listSubNames _____________________________________________________________________ 30
3.1.3.6 createFromSubName ______________________________________________________________ 31
3.1.3.7 exportTo_______________________________________________________________________ 31
3.1.3.8 move __________________________________________________________________________ 32
3.1.4
GP_GridAnalysis__________________________________________________________________ 32
3.1.4.1 histrogram _______________________________________________________________________ 33
3.1.4.2 minValue ________________________________________________________________________ 33
3.1.4.3 maxValue ________________________________________________________________________ 33
3.1.4.4 meanValue _______________________________________________________________________ 34
3.1.4.5 medianValue _____________________________________________________________________ 34
3.1.4.6 modeValue _______________________________________________________________________ 34
3.1.4.7 stdDev___________________________________________________________________________ 34
3.1.4.8 correlation _______________________________________________________________________ 35
3.1.5
GP_GridCoverageProcessor ________________________________________________________ 35
3.1.5.1 Attributes ________________________________________________________________________ 35
3.1.5.1.1 +metadataNames : Sequence<CharacterString> ____________________________________ 35
3.1.5.1.2 +numOperations : Integer _____________________________________________________ 36
3.1.5.2 getMetadataValue _________________________________________________________________ 36
3.1.5.3 getOperation _____________________________________________________________________ 36
3.1.5.4 Analyze__________________________________________________________________________ 36
3.1.5.5 doOperation ______________________________________________________________________ 36
3.1.6
Supporting Interfaces in the Coverage (CV) Package ____________________________________ 37
3.1.6.1 CV_SampleDimension ___________________________________________________________ 37
3.1.6.1.1 Attributes ____________________________________________________________________ 37

Page 4 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

R
ET

IR

ED

3.1.6.1.1.1 +description : CharacterString__________________________________________________ 37
3.1.6.1.1.2 +sampleDimensionType : CV_SampleDimensionType ______________________________ 37
3.1.6.1.1.3 +categoryNames : Sequence<CharacterString> ____________________________________ 38
3.1.6.1.1.4 +colorInterpretation : CV_ColorInterpretation _____________________________________ 38
3.1.6.1.1.5 +paletteInterpretation : CV_PaletteInterpretation ___________________________________ 38
3.1.6.1.1.6 +palette : Sequence<Sequence<Integer>> ________________________________________ 38
3.1.6.1.1.7 +noDataValue : Sequence<Number> ____________________________________________ 38
3.1.6.1.1.8 +minimumValue : Number ____________________________________________________ 38
3.1.6.1.1.9 +maximumValue : Number____________________________________________________ 39
3.1.6.1.1.10 +units: CS_Unit____________________________________________________________ 39
3.1.6.1.1.11 +offset : Double____________________________________________________________ 39
3.1.6.1.1.12 +scale : Double ____________________________________________________________ 39
3.1.6.1.1.13 +metadataNames : Sequence<CharacterString> ___________________________________ 39
3.1.6.1.2 getMetadataValue _____________________________________________________________ 39
3.1.6.2 CV_SampleDimensionType _________________________________________________________ 40
3.1.6.3 CV_PaletteInterpretation___________________________________________________________ 40
3.1.6.4 CV_ColorInterpretation____________________________________________________________ 40
3.1.7
Supporting Interfaces and Structures in the Grid Coverage (GC) Package __________________ 41
3.1.7.1 GC_GridPacking__________________________________________________________________ 41
3.1.7.1.1 Attributes ____________________________________________________________________ 42
3.1.7.1.1.1 +byteInValuePacking : GC_ByteInValuePakcing __________________________________ 42
3.1.7.1.1.2 +valueInBytePacking : GC_ValueInBytePacking___________________________________ 42
3.1.7.1.1.3 +bandPacking : Integer _______________________________________________________ 42
3.1.7.2 GC_GridGeometry ________________________________________________________________ 43
3.1.7.2.1 Attributes ____________________________________________________________________ 43
3.1.7.2.1.1 +gridRange : GC_GridRange __________________________________________________ 43
3.1.7.2.1.2 +gridToCoordinateSystem : CT_MathTransform ___________________________________ 43
3.1.7.3 GC_GridRange ___________________________________________________________________ 43
3.1.7.3.1 Attributes ____________________________________________________________________ 44
3.1.7.3.1.1 +lo : Sequence<Integer> ______________________________________________________ 44
3.1.7.3.1.2 +hi : Sequence<Integer> ______________________________________________________ 44
3.1.7.4 GC_ParameterInfo ______________________________________________________________ 44
3.1.7.4.1 Attributes ___________________________________________________________________ 44
3.1.7.4.1.1 +name : CharacterString ______________________________________________________ 44
3.1.7.4.1.2 +description : CharacterString__________________________________________________ 44
3.1.7.4.1.3 +type : GC_ParameterInfoType ________________________________________________ 44
3.1.7.4.1.4 +defaultValue : Object _______________________________________________________ 45
3.1.7.4.1.5 +minimumValue : Number ____________________________________________________ 45
3.1.7.4.1.6 +maximumValue : Number____________________________________________________ 45
3.1.7.5 GC_Parameter__________________________________________________________________ 45
3.1.7.5.1 Attributes ____________________________________________________________________ 45
3.1.7.5.1.1 +name : CharacterString ______________________________________________________ 45
3.1.7.5.1.2 +value : Object _____________________________________________________________ 45
3.1.7.6 GC_Format ____________________________________________________________________ 46
3.1.7.6.1 Attributes ____________________________________________________________________ 46
3.1.7.6.1.1 +name : CharacterString ______________________________________________________ 46
3.1.7.6.1.2 +description : CharacterString__________________________________________________ 46
3.1.7.6.1.3 +vendor : CharacterString _____________________________________________________ 46
3.1.7.6.1.4 +docURL : CharacterString____________________________________________________ 46
3.1.7.6.1.5 +version : CharacterString_____________________________________________________ 46
3.1.7.6.1.6 +numParameters : Integer _____________________________________________________ 47
3.1.7.6.2 getParameterInfo ______________________________________________________________ 47
3.1.7.7 GC_ValueInBytePacking _________________________________________________________ 47
3.1.7.8 GC_ByteInValuePacking ___________________________________________________________ 47
3.1.8
Supporting Interfaces in Grid Coverage Processing (GP) Package_________________________ 48
3.1.8.1 GP_Operation __________________________________________________________________ 48

Page 5 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

3.1.8.1.1 Attributes ____________________________________________________________________ 49
3.1.8.1.1.1 +name : CharacterString ______________________________________________________ 49
3.1.8.1.1.2 +description : CharacterString__________________________________________________ 49
3.1.8.1.1.3 +vendor : CharacterString _____________________________________________________ 49
3.1.8.1.1.4 +docURL : String ___________________________________________________________ 49
3.1.8.1.1.5 +version : String ____________________________________________________________ 49
3.1.8.1.1.6 +numSources : Integer _______________________________________________________ 49
3.1.8.1.1.7 +numParameters : Integer _____________________________________________________ 50
3.1.8.1.2 getParameterInfo ______________________________________________________________ 50

3.2

Well-known Binary Representations _____________________________________________ 50

3.2.1

3.3

WKBGeoTIFF ____________________________________________________________________ 50

GP_GridCoverageProcessor Operations __________________________________________ 51

4

R
ET

IR

ED

3.3.1 Gray Scale Threshold _________________________________________________________________ 52
3.3.2 Image Enhancements __________________________________________________________________ 52
3.3.2.1 Linear Enhancement_______________________________________________________________ 53
3.3.2.2 Root Enhancement ________________________________________________________________ 53
3.3.2.3 Equalization Enhancement__________________________________________________________ 54
3.3.2.4 Infrequency Enhancement __________________________________________________________ 55
3.3.3 Interpolate___________________________________________________________________________ 55
3.3.4 Band Ratioing________________________________________________________________________ 56
3.3.5 Spatial Filtering ______________________________________________________________________ 57
3.3.5.1 Mean Filter ______________________________________________________________________ 57
3.3.5.2 Mode Filter ______________________________________________________________________ 58
3.3.5.3 Median Filter _____________________________________________________________________ 59
3.3.5.4 Gausian Filter ____________________________________________________________________ 60
3.3.5.5 LaplacianType 1 Filter _____________________________________________________________ 61
3.3.5.6 Laplacian Type 2 Filter_____________________________________________________________ 61
3.3.6 Select Sample Dimensions ______________________________________________________________ 62
3.3.7 Resample ____________________________________________________________________________ 63
3.3.8 Sequence ____________________________________________________________________________ 64
3.3.9 Density Slice _________________________________________________________________________ 65

REFERENCES ____________________________________________________________ 65

APPENDICES ________________________________________________________________ 66
A.1

GLOSSARY OF TERMS ______________________________________________________ 66

A.2

SUPPORTING WELL-KNOWN VALUES________________________________________ 66

A.3

EXCEPTIONS, ERRORS AND ERROR CODES __________________________________ 67
Specific Exceptions___________________________________________________________________ 67

A.4

CONVERSION RULES FOR GRID VALUES TO SPECIFIC DATA TYPES __________ 67
Conversion of Value to Boolean _________________________________________________________ 67
Conversion of Value to 2 bit integer ______________________________________________________ 67
Conversion of Value to 4 bit integer ______________________________________________________ 67
Conversion of Value to Unsigned Character (0 to 255) _______________________________________ 68
Conversion of Value to Signed Character (-128 to 127) _______________________________________ 68

A.5

COM IDL SPECIFICATION ___________________________________________________ 68

A.6

CORBA IDL SPECIFICATION _________________________________________________ 69

A.7

SPECIFICATION SEQUENCE DIAGRAMS _____________________________________ 69

A.7.1
A.7.2

Page 6 of 71

SIMPLE GRID COVERAGE CREATION EXAMPLE__________________________________ 69
GRID COVERAGE PROCESSING USING THE DISCOVERY MECHANISM _____________ 70

OGC Document Number 01-004

OpenGIS Implementation Specification

A.8

Grid Coverages

VISUAL BASIC SAMPLE CODE _______________________________________________ 70
READING GRID DATA VALUES ___________________________________________________ 70

R
ET

IR

ED

A.8.1

Page 7 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

TABLE OF FIGURES

R
ET

IR

ED

Figure 1: Specification Packages __________________________________________________________________ 11
Figure 2: CV_Coverage Package. _________________________________________________________________ 14
Figure 3: GC_GridCoverage Package. _____________________________________________________________ 15
Figure 4: GC_GridCoverageExchange Interface and its relationships _____________________________________ 16
Figure 5: GP_GridAnalysis Interface is a subclass of GC_GridCoverage. __________________________________ 16
Figure 6: GP_GridCoverageProcessor Interface discovery mechanism.____________________________________ 17
Figure 7: CV_Coverage interface for generic coverages. _______________________________________________ 19
Figure 8: GC_GridCoverage interface providing access to grid data values. ________________________________ 24
Figure 9: GC_GridCoverageExchange Interface. _____________________________________________________ 29
Figure 10: GP_GridAnalysis Interface. GP_GridAnalysis inherits from GC_GridCoverage.____________________ 32
Figure 11: GP_GridCoverageProcessor for performing operations in grid coverages. ________________________ 35
Figure 12: CV_SampleDimension Interface. Descriptive information for a sample dimension. __________________ 37
Figure 13: Context Diagram: CV_SampleDimensionType_______________________________________________ 40
Figure 14: Context Diagram: CV_PaletteInterpretation ________________________________________________ 40
Figure 15: Context Diagram: CV_ColorInterpretation _________________________________________________ 41
Figure 16: GC_GridPacking data type. _____________________________________________________________ 42
Figure 17: GC_GridGeometry data type. ____________________________________________________________ 43
Figure 18: GC_GridRange data type. ______________________________________________________________ 43
Figure 19: GC_ParameterInfo data type.____________________________________________________________ 44
Figure 20: GC_Parameter data type. _______________________________________________________________ 45
Figure 21: Context Diagram: GC_Format. __________________________________________________________ 46
Figure 22: Context Diagram: GC_ValueInBytePacking ________________________________________________ 47
Figure 23: Context Diagram: GC_ByteInValuePacking ________________________________________________ 47
Figure 24: Context Diagram: GC_ParameterType ____________________________________________________ 48
Figure 25: GP_Operation Interface ________________________________________________________________ 49
Figure 26: Simple grid coverage creation ___________________________________________________________ 69
Figure 27: Grid coverage processing using the discovery mechanism______________________________________ 70

Page 8 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

0.0

Grid Coverages

PREFACEThis implementation specification refers to The Open GIS Abstract Specification Topic 6: The Coverage Typeand it’s Subtypes, the project document 99-106.
0.1

SUBMITTING COMPANIESThe following companies submitted this implementation specification, in response to the OGC Request Number 5Core Task Force Working Group A Request For Proposals: Access to Open GIS Coverages, OpenGIS Project
Document Number 98-007r1.

0.2

Computer Aided Development Corporation Ltd (Cadcorp)
Environmental Systems Research Institute (ESRI)Intergraph Corporation
Laser-Scan, Ltd.
OraclePCI Geomatics Inc
SUBMISSION CONTACT POINTS

ED

•
•
•
•
•
•

R
ET

Louis Burry
PCI Geomatics
490 St. Joseph Blvd., Suite 400
Hull, Quebec, Canada, J8Y 3Y7
burry@pcigeomatics.com

IR

All questions regarding this submission should be directed to:Adam Gawne-Cain
Cadcorp Ltd
4 Fitzroy Square
London, UK W1P 5AH
adam@cadcorpdev.co.uk
John Herring
Oracle Corporation
196 vanBuren Street
Herndon, Virginia 20170
jrherrin@us.oracle.com

0.3

DOCUMENT CONVENTIONSThis submission adheres to OGC conventions for UML modeling and CORBA IDL. The COM IDL has
followed the Microsoft guidelines for naming conventions since applications will mix OGC/Non-OGC interfaces. The
main difference between the OGC and Microsoft conventions is OGC uses a lower case for the first letter for attributes
and operations while Microsoft uses upper case.
This document uses the OGC convention of using a two-letter prefix for packages. The following two-letter
prefixes used are:Page 9 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification
Prefix
CV
GC
GP
0.4

REVISION HISTORY

0.5

EDITORIAL NOTES

Grid Coverages

Package
Coverage
Grid Coverage
Grid Coverage Processing

This specification focuses on grid coverages but effort has been made to ensure generic interfaces andcomponents have been specified at the coverage level for future extensions to other coverage types.

0.6

CHANGES TO THE ABSTRACT SPECIFICATIONEDThe Essential Model for Grid Coverages lists seven varieties of simple pixel modifications. This submission
addresses a subset of these. Radiometric Correction Services and Noise Removal Services have a range of complexities
and should be addressed by Image Exploitation SIG

To allow for other georeferencing methods, the GridMatrixValue class was modified. The members of theclass which described the georeferencing of the grid, were moved into another class. This change from the abstract
specification allows for support of non- orthorectified grids.

0.7

R
ET

IR

The sequential enumeration methods for accessing grid matrix values were limited to row dominant, column
dominant and band order. Morton order and pyramid sequences were not addressed. Pyramid sequence was perceived
to be an association of lower resolution grid coverages to the grid coverage. This is addressed as overviews in thesubmission.
DEPENDENCIES ON OTHER OGC SPECIFICATIONSThe specification uses interfaces from the Open GIS Coordinate Transformation specification.
The following packages are used:
PrefixPT
CSCT

Package
Positioning
Coordinate Systems
Coordinate Transforms

Components from the CT and CS package provide the georeferencing information for the grid coverage. The
georeferencing include the projection and the mapping of grid to projection coordinate for the grid..
1

SPECIFICATION OVERVIEWThis implementation specification was drafted with the following goals:••

Allow for a range of implementations. This will allow for relatively quick and easy implementations of thespecification to more comprehensive ones.
This specification was designed to promote interoperatablity between implementations done by data vendors andsoftware vendors providing analysis and grid processing implementations. An analysis implementation can utilize
a data access implementation

Page 10 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification
•
•
•
•
•
•
•

Grid Coverages

This specification is written as a general specification with COM and CORBA implementations in mind. This
specification could later be extended to include other Distributed Computing Platforms (DCPs) such as JAVA.
Any implementations of this specification should support creation of coverages from a GeoTIFF raster. GeoTIFF
is becoming an industry standard and this is meant to allow for standard test datasets to ensure implementations
conform to the specification.
The specification must allow for efficient access to very large datasets. Datasets can be up to several gigabytes insize.
Support N dimensions even though most implementations of the specification will be 2 D.
Extensible framework for image processing and analysis.
Be able to handle a wide range of grid data from raw to thematically classified grid coverages.
Support a variety of color models.

2

ARCHITECTURE

ED

The architecture of the grid coverage specification is composed of three packages as shown in Figure 1. The
specification includes a package for the general coverage specification (CV), a package specifically for grid coverages(GC) and a package for grid coverage processing (GP). The GP package is optional and not required for an OGC
compliant implementation.

GC

GP+ GP_GridAnalysis+ GP_GridCoverageProcessor+ GP_Operation

R
ET

IR

CV
+ CV_ColorInt erpretation+ CV_Pale t teInterpre tation+ CV_SampleDimensionTyp e+ CV_Coverag e+ CV_SampleDimension+ GC_ByteInValuePacking+ GC_ValueInBytePacking+ GC_Format+ GC_GridCoverage+ GC_GridCoverageExchange+ GC_GridGeometry+ GC_GridPacking+ GC_GridRange+ GC_Parameter+ GC_ParameterInfo

Figure 1: Specification Packages

2.1

Grid Coverages

2.1.1

Grid Coverage Characteristics

This Grid Coverage Implementation specification can accommodate grid coverages with the following
characteristics:
•

•
•
•
•
•

Variable number of bits per grid value (bits per pixel).
1, 2, 4
unsigned integer
8, 16, 32
signed, unsigned integer32, 64Real
1 to N number of bands
1 to N dimensions
For grids with multiple bands, band values can be ordered by dimension. For example, a 2 D grid coverage can beordered row, column, band (pixel interleaved), row, band, column (line interleaved) or band, row, column (bandsequential).
Support for a variable number of “no data values”
Various color models: Gray Scale, pseudo color (any size), RGB, CMYK and HSL.

Page 11 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification•

Grid Coverages

Support of overviews or pyramids (reduced resolution data sets).

2.1.2

Grid Coordinate System

A grid coverage has a grid coordinate system which allows for addressing individual cells in the grid.
Individual cells are centered on the grid points. A grid has an ordering of cell values with the first cell in this ordering
having a grid coordinate of 0, 0. A two dimensional grid coverage with 512 rows and 512 columns would have gridcoordinates with a range from 0 to 511 rows and 0 to 511 columns.
The gridRange attribute in the GC_GridGeometry structure defines the grid coordinate range.
The number of cells in a dimension of the grid can be calculated as grid range maximum – minimum
2.1.3

Grid Coverage Tiling

2.1.4

Color Palettes

ED

This implementation specification has no explicit interfaces to retrieve data values from a grid coverage intiles. It is expected that the implementation will efficiently retrieve data values when the client implementation
retrieves data values on tile boundaries. The optimal size to access a dimension can be determined from the
GC_GridCoverage optimumDataBlockSizes attribute

R
ET

IR

A coverage can have a color palette. A color palette is valid for only coverages which are integer values(usually bytes). Color palettes supported include gray scale, RGB, HSL and CMYK. The coverage dimension
information maps the grid sample dimensions to a color palette or to color model components. For example 8-bit
pseudo color TIFF image would be represented as a grid with one sample dimension and a color palette with 256 RGB
entries. A 24-bit RGB TIFF file would be represented as a grid with three bands and no color palette. The dimension
information would indicate which bands to use for the RGB color components. The following illustrates example
values for different color components:

2.1.5

Gray Scale

Vector contains one entry which a shade of gray. 0 is black and 255 is white.

RGB

Vector contains three values: Red Green Blue. Each value ranges from 0 to 255
where 0 is no intensity and 255 is maximum intensity.

RGBA

Vector contains four values RGBA: Red Green Blue Alpha. The alpha value is thelevel of transparency of the color. Alpha of 0 is transparent and 255 is opaque

HSL

Vector contains three values: Hue Saturation Lightness. Hue is a value from 0 to360. Saturation is a value from 0 to 100 where 0 is no color intensity and 100 is fullcolor intensity. Lightness is a value from 0 to 100 where 0 is no lightness and 100
is full lightness.

CMYK

Vector contains four values: Cyan Magenta Yellow Black. Each value ranges from0 to 255 where 0 is no intensity and 255 is maximum intensity.

Interoperability

To help interoperability, many interfaces contained in this architecture have been made immutable. The
assumption is that the objects supporting these interfaces should be immutable. This means that the objects should notchange after a factory has created them.

Page 12 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

In particular, the following interfaces are assumed to be backed by immutable objects:
CV_SampleDimension, GC_Format, GC_GridCoverageExchange, GP_Operation, GP_GridAnalysis,
GP_GridCoverageProcessor
In a GC_GridCoverage, only the cell values may change. The size, geometry, interpolation, sequencing etc
should never change. However, clients should be aware that the Grid Coverage object behind the GC_GridCoverageinterface may be adapted from other GC_GridCoverage interfaces, so changing the grid point (pixel) values throughone GC_GridCoverage could change the grid point values in others. To allow client applications to anticipate adapted
Grid Coverages being changed indirectly, the source Grid Geometry object(s) for adapted Grid Geometry objects canbe traced.
2.2

CV_Coverage

Abstract interface providing access to an OpenGIS coverage.

2.
3.

R
ET

4.

A coverage may be represented by a set of polygons which exhaustively tile a plane (that is each point on theplane falls in precisely one polygon). The value returned by the coverage for a point is the value of an attributeof the polygon that contains the point.
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.
Coverage may be represented by a mathematical function. The value returned by the coverage for a point isjust the return value of the function when supplied the coordinates of the point as arguments.
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.

IR

1.

ED

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

Figure 2 illustrates the CV_Coverage package. A coverage has a corresponding CV_SampleDimension for eachsample dimension in the coverage.

Page 13 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages<<Interface>>
CV_Coverage+ numSampleDimensions : Integer+ dimensionNames : Sequence<CharacterString>+ numSources : Integer+ metadataNames : Sequence<CharacterString>+ coordinateSystem : CS_CoordinateSystem+ envelope : PT_Envelope+ getSampleDimension(index : Integer) : CV_SampleDimension+ getSource(index : Integer) : CV_Coverage+ getMetadataValue(name : CharacterString) : CharacterString+ evaluate(pt : PT_CoordinatePoint) : Sequence<Number>+ evaluateAsBoolean(pt : PT_CoordinatePoint) : Sequence<Boolean>+ evaluateAsByte(pt : PT_CoordinatePoint) : Sequence<byte>+ evaluateAsInteger(pt : PT_CoordinatePoint) : Sequence<Integer>+ evaluateAsDouble(pt : PT_CoordinatePoint) : Sequence<Double><<Interface>>
CV_SampleDimension+ categoryNames : Sequence<CharacterString>+ colorInterpretation : CV_ColorInterpretation+ description : CharacterString+ minimumValue : Number+ maximumValue : Number+ nodataValue : Sequence<Number>+ paletteInterpretation : CV_PaletteInterpretation+ palette : Sequence2D<Integer>+ sampleDimensionType : CV_SampleDimensionType+ units : CS_Unit+ valueOffset : Double+ valueScale : Double+ metadataNames : Sequence<CharacterString>+ getMetadataValue(name : CharacterString) : CharacterString<<CodeList>>
CV_PaletteInterpretation+ CV_Gray : Integer = 0+ CV_RGB : Integer = 1+ CV_CMYK : Integer = 2+ CV_HLS : Integer = 3<<CodeList>>
CV_SampleDimensionType+ CV_1BIT : Integer = 0+ CV_2BIT : Integer = 1+ CV_4BIT : Integer = 2+ CV_8BIT_U : Integer = 3+ CV_8BIT_S : Integer = 4+ CV_16BIT_U : Integer = 5+ CV_16BIT_S : Integer = 6+ CV_32BIT_U : Integer = 7+ CV_32BIT_S : Integer = 8+ CV_32BIT_REAL : Integer = 9+ CV_64BIT_REAL : Integer = 10

ED<<CodeList>>
CV_ColorInterpretation+ CV_Undefined : Integer = 0+ CV_GrayIndex : Integer = 1+ CV_PaletteIndex : Integer = 2+ CV_RedBand : Integer = 3+ CV_GreenBand : Integer = 4+ CV_BlueBand : Integer = 5+ CV_AlphaBand : Integer = 6+ CV_HueBand : Integer = 7+ CV_SaturationBand : Integer = 8+ CV_LightnessBand : Integer = 9+ CV_CyanBand : Integer = 10
+ CV_MagentaBand : Integer = 11
+ CV_YellowBand : Integer = 12
+ CV_BlackBand : Integer = 13

GC_GridCoverage

R
ET

2.3

IR

Figure 2: CV_Coverage Package.

This interface would represent the basic implementation which provides access to grid coverage data. A
GC_GridCoverage implementation may provide the ability to update grid values. A basic read-only implementation
would be fairly easy to implement. The GC package is illustrated in figure 3.

Page 14 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages<<Interface>>
GC_GridCoverageExchange+ numFormats : Integer+ metadataNames : Sequence<CharacterString>+ getMetadataValue(name : CharacterString) :+ createFromName(name : CharacterString) : GC_GridCoverage+ listSubNames(name : CharacterString) : Sequence<CharacterString>+ createFromSubName(name : CharacterString, subName : CharacterString) : GC_GridCoverage+ getFormat(index : Integer) : GC_Format+ exportTo(gridCoverage : GC_GridCoverage, format : CharacterString, name : CharacterString, parameters : Sequence<GC_Parameter>) : void+ move(gridCoverage : GC_GridCoverage, coordsys : CS_CoordinateSystem, gridToCoordinateSystem : CT_MathTransform) : GC_GridCoverage<<Interface>>
GC_Format+ name : CharacterString+ description : CharacterString+ vendor : CharacterString+ docURL : CharacterString+ version : CharacterString+ numParameters : Integer<<Interface>>
GC_GridCoverage+ dataEditable : Boolean+ gridPacking : GC_GridPacking+ gridGeometry : GC_GridGeometry+ numOverviews : Integer+ optimumDataBlockSizes : Sequence<Integer><<Data Type>>
GC_GridGeometry+ gridRange : GC_GridRange+ gridToCoordinateSystem : CT_MathTransform<<Data Type>>
GC_GridPacking+ byteInValuePacking : GC_ByteInValuePacking+ valueInBytePacking : GC_ValueInBytePacking+ bandPacking : Integer

IR<<Data Type>>
GC_ParameterInfo+ name : CharacterString+ description : CharacterString+ defaultValue : Number+ minimumValue : Number+ maximumValue : Number+ getOverviewGridGeometry(index : Integer) : GC_GridGeometry+ getOverview(index : Integer) : GC_GridCoverage+ getDataBlockAsBoolean(gridRange : GC_GridRange) : Sequence<Boolean>+ getDataBlockAsByte(gridRange : GC_GridRange) : Sequence<byte>+ getDataBlockAsInteger(gridRange : GC_GridRange) : Sequence<Integer>+ getDataBlockAsDouble(gridRange : GC_GridRange) : Sequence<Double>+ getPackedDataBlock(gridRange : GC_GridRange) : Sequence<byte>+ setDataBlockAsBoolean(gridRange : GC_GridRange, val : Sequence<Boolean>) : void
+ setDataBlockAsByte(gridRange : GC_GridRange, val : Sequence<byte>) : void
+ setDataBlockAsInteger(gridRange : GC_GridRange, val : Sequence<Integer>) : void
+ setDataBlockAsDouble(gridRange : GC_GridRange, val : Sequence<Double>) : void
+ setPackedDataBlock(gridRange : GC_GridRange, val : Sequence<byte>) : voidED+ getParameterInfo(index : Integer) : GC_ParameterInfo<<Data Type>>
GC_Parameter+ name : CharacterString+ value : Number<<CodeList>>
GC_ByteInValuePacking+ GC_wkbXDR : Integer = 0+ GC_wkbNDR : Integer = 1<<CodeList>>
GC_ValueInBytePacking+ GC_LoBitFirst : Integer = 0+ GC_HiBitFirst : Integer = 1

RET<<Data Type>>
GC_GridRange+ lo : Sequence<Integer>+ hi : Sequence<Integer>

Figure 3: GC_GridCoverage Package.

2.4

GC_CoverageExchange

Support for creation of grid coverages from persistent formats as well as exporting a grid coverage to apersistent formats. For example, it allows for creation of grid coverages from the GeoTIFF Well-known Binary format
and exporting to the GeoTIFF file format. Basic implementations only require creation of grid coverages from a fileformat or resource. The interface given in figure 4 has a discovery mechanism to query the available file formats
supported.

Page 15 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages<<Interface>>
GC_GridCoverageExchange+ numFormats : Integer+ metadataNames : Sequence<CharacterString>+ getMetadataValue(name : CharacterString) : CharacterString+ createFromName(name : CharacterString) : GC_GridCoverage+ listSubNames(name : CharacterString) : Sequence<CharacterString>+ createFromSubName(name : CharacterString, subName : CharacterString) : GC_GridCoverage+ getFormat(index : Integer) : GC_Format+ exportTo(gridCoverage : GC_GridCoverage, format : CharacterString, name : CharacterString, parameters : Sequence<GC_Parameter>) : void+ move(gridCoverage : GC_GridCoverage, coordsys : CS_CoordinateSystem, gridToCoordinateSystem : CT_MathTransform) : GC_GridCoverage<<Interface>>
GC_Format<<Interface>>
GC_GridCoverage<<Data Type>>
GC_Parameter

Figure 4: GC_GridCoverageExchange Interface and its relationships

GP_GridAnalysis (optional)

ED

2.5

This optional interface performs analysis of the grid data. Such processing functionality includes histogram
calculation, grid coverage covariance and other statistical measurements. This interface is illustrated in figure 5.
GP_GridAnalysis operates on a GC_GridCoverage to create a new GC_GridCoverage.

IR<<Interface>>
GP_GridCoverageProcessor+ numOperations : Integer+ metadataNames : Sequence<CharacterString>RET+ getMetadataValue(name : CharacterString) : CharacterString+ getOperation(index : Integer) : GP_Operation+ Analyse(gridCoverage : GC_GridCoverage) : GP_GridAnalysis+ doOperation(operationName : CharacterString, parameters : Sequence<GC_Parameter>) : GC_GridCoverage<<Interface>>
GP_Operation+ name : CharacterString+ description : CharacterString+ vendor : CharacterString+ docURL : CharacterString+ version : CharacterString+ numSources : Integer+ numParameters : Integer+ getParameterInfo(index : Integer) : GC_ParameterInfo<<Interface>>
GP_GridAnalysis+ histogram(band : Integer, minValue : Number, maxValue : Number, numBuckets : Integer) : Sequence<Integer>+ minValue(band : Integer) : Integer+ maxValue(band : Integer) : Integer+ meanValue(band : Integer) : Double+ medianValue(band : Integer) : Double+ modeValue(band : Integer) : Double+ stdDev(band : Integer) : Double+ correlation() : PT_Matrix

Figure 5: GP_GridAnalysis Interface is a subclass of GC_GridCoverage.

Page 16 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

2.6

Grid Coverages

GP_GridCoverageProcessor (optional)

This optional interface provides operations for different ways of accessing the grid coverage values as well as
image processing functionality. The list of available processing operations is implementation dependent. The interface
has a discovery mechanism to determine the available processing operations. This is shown in figure 6.
<<Interface>>
GP_GridCoverageProcessor+ numOperations : Integer+ metadataNames : Sequence<CharacterString><<Interface>>
GC_GridCoverage<<Data Type>>
GC_Parameter(from GC)

(from GC)ED

+ getMetadataValue(name : CharacterString) : CharacterString+ getOperation(index : Integer) : GP_Operation+ Analyse(gridCoverage : GC_GridCoverage) : GP_GridAnalysis+ doOperation(operationName : CharacterString, parameters : Sequence<GC_Parameter>) : GC_GridCoverage<<Interface>>
GP_GridAnalysis<<Interface>>
GP_Operation

IR

Figure 6: GP_GridCoverageProcessor Interface discovery mechanism.

R
ET

These processing operations will transform values within a single sample dimension, and leave the values in othersample dimensions unaffected. The modified sample dimension may also change its type (e.g. from CV_4BIT to
CV_1BIT). The actual underlying grid data remains unchanged.
The interface has been designed to allow the adaptations to be done in a “pipe-lined” manner. The interface
operates on GC_GridCoverage to create new a GC_GridCoverage. The interface does not need to make a copy of thesource grid data. Instead, it can return a grid coverage object which applies the adaptations on the original gridcoverage whenever a block of data is requested. In this way, a pipeline of several grid coverages can be constructedcheaply.
This interface can perform any of the following:

Change the number of bands being accessed.
Change the value sequencing in which the grid values are retrieved.
Allow re-sampling of the grid coverage for a different geometry. Creating a new GC_GridCoverage withdifferent grid geometry allows for reprojecting the grid coverage to another projection and anothergeoreferencing type, resampling to another cell resolution and subsetting the grid coverage.
Modify the way the grid values are accessed (filtered, classified…).
Change the interpolation method used when evaluating points which fall between grid cells.
Filtering
Image enhancements.
etc.

Page 17 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

2.7

Interfaces Supporting Coverage (CV) Package

2.7.1

CV_SampleDimension

This interface contains information for an individual sample dimension of coverage. This interface isapplicable to any coverage type. For grid coverages, the sample dimension refers to an individual band.
2.8

Interfaces/Datatypes Supporting Grid Coverage (GC) Package

2.8.1

GC_GridPacking

This datatype describes the packing of data values within grid coverages. It includes the packing scheme ofdata values with less then 8 bits per value within a byte, byte packing (Little Endian / Big Endian) for values with morethan 8 bits and the packing of the values within the dimensions.
2.8.2

GC_GridGeometry

GC_GridRange

IR

2.8.3

ED

This datatype describes the geometry and georeferencing information of the grid coverage. The grid range
attribute determines the valid grid coordinates and allows for calculation of grid size. See 2.1.2 Grid Coordinate
System for more details. A grid coverage may or may not have georeferencing.

This datatype specifies the range of valid coordinates for each dimension of the coverage.
GC_ParameterInfo

R
ET

2.8.4

This datatype provides information for the parameters required for grid coverage processing operations andgrid exchange. This information includes such information as the name of the parameter, parameter description,
parameter type etc.
2.8.5

GC_Parameter

This datatype for a parameter required for grid coverage processing operations and grid exchange. The
parameter contains the parameter keyword and it’s value.
2.8.6

GC_Format

This interface is a discovery mechanism to determine the formats supported by a GC_GridCoverageExchange
implementation. A GC_GridCoverageExchange implementation can support a number of file format or resources.
2.9Interfaces Supporting Grid Coverage Processing (GP) Package

2.9.1

GP_Operation

This interface provides descriptive information for a grid coverage processing operation. The descriptive
information includes such information as the name of the operation, operation description, number of source gridcoverages required for the operation etc.

Page 18 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

3 COMPONENT SERVICES

3.1

GRID CONPONENTS CLASSES AND INTERFACES

3.1.1

CV_Coverage

This interface is common to all coverage types. Other coverage types are subtypes of coverage. This interface
is shown in figure 7.
<<Interface>>
CV_Coverage+ numSampleDimensions : Integer+ dimensionNames : Sequence<CharacterString>+ numSources : Integer+metaDataNames : Sequence<CharacterString>+ coordinateSystem : CS_CoordinateSystem+ envelope : PT_EnvelopeED+ getSampleDimension(index : Integer) : CV_SampleDimension+ getSource(index : Integer) : CV_Coverage+ getMetadataValue(name : CharacterString) :IR+ evaluate(pt : PT_CoordinatePoint) : Sequence<Number>+ evaluateAsBoolean(pt : PT_CoordinatePoint) : Sequence<Boolean>+ evaluateAsByte(pt : PT_CoordinatePoint) : Sequence<byte>+ evaluateAsInteger(pt : PT_CoordinatePoint) : Sequence<Integer>+ evaluateAsDouble(pt : PT_CoordinatePoint) : Sequence<Double><<Interface>>
GC_GridCoverageRET(from GC)

Figure 7: CV_Coverage interface for generic coverages.

3.1.1.1 Attributes

3.1.1.1.1 +numSampleDimensions : Integer
Description:
Type:

The number of sample dimensions in the coverage. For grid coverages, a sample dimension
is a band.
Integer {frozen}

3.1.1.1.2 +dimensionNames : Sequence<CharacterString>
Description:

Type:

Page 19 of 71

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.
Sequence<CharacterString> {frozen}

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

3.1.1.1.3 +numSource : Integer
Description:

Type:

Number of grid coverages which the grid coverage was derived from. This implementation
specification does not include interfaces for creating collections of coverages therefore thisvalue will usually be one indicating an adapted grid coverage, or zero indicating a raw gridcoverage.
Integer {frozen}

3.1.1.1.4 +metadataNames : Sequence <CharacterString>
Description:
Type:

List of metadata keywords for a coverage. If no metadata is available, the sequence will be
empty.
Sequence<CharacterString> {frozen}

3.1.1.1.5 +coordinateSystem : CS_CoordinateSystem
This specifies the coordinate system used when accessing a coverage or grid coverage withthe “evaluate” methods. It is also the coordinate system of the coordinates used with themath transform (see GC_GridGeometry attribute - gridToCoordinateSystem:
CT_MathTransform). This coordinate system is usually different than the grid coordinate
system of the grid. A grid coverage can be accessed (re-projected) with new coordinate
system with the GP_GridCoverageProcessor component. In this case, a new instance of agrid coverage is created.

IR

ED

Description:

Type:

R
ET

Note: If a coverage does not have an associated coordinate system, coordinateSystem will be
NULL. The gridToCoordinateSystem attribute for GC_GridGeometry should also be NULL
if coordinateSystem is NULL.
CS_CoordinateSystem {frozen}

3.1.1.1.6 +envelope : PT_Envelope
Description:

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 2D grid coverage includes the following corner positions.
(Minimum row - 0.5, Minimum column - 0.5)
(Maximum row - 0.5, Maximum column - 0.5)Type:

for the minimum coordinates
for the maximum coordinates

Note: If a grid coverage does not have any associated coordinate system, the minimum andmaximum coordinate points for the envelope will be empty sequences.
PT_Envelope {frozen}

3.1.1.2 getSampleDimension
Prototype:Class:
Description:

getSampleDimension(index : Integer) : CV_SampleDimension
CV_Coverage
Retrieve Sample dimension information for the coverage. For a grid coverage, a sample dimension isa band. The sample dimension information include such things as description, data type of the value

Page 20 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages(bit, byte, integer…), the no data values, minimum and maximum values and a color table if one isassociated with the dimension. A coverage must have at least one sample dimension.
Inputs:index

Index for sample dimension to retrieve. Indices are numbered 0 to (n-1).

OutPuts:
Returns:
Exceptions:

None
CV_SampleDimension
CV_InvalidIndex

3.1.1.3 getSource
Prototype:Class:
Description:ED

getSource(sourceDataIndex : Integer) : GC_GridCoverage
CV_Coverage
Returns the source data for a grid coverage. . If the GC_GridCoverage was produced from anunderlying dataset (by createFromName() or createFromSubName for instance) the NumSource
property should be zero, and this method should not be called. If the GC_GridCoverage wasproduced using GP_GridCoverageProcessor then it should return the source grid coverage of the oneused as input to GP_GridCoverageProcessor. In general the source() method is intended to return theoriginal 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".

Inputs:None
GC_GridCoverage
CV_InvalidIndex

RET

OutPuts:
Returns:
Exceptions:IRsourceDataIndex Source grid coverage index. Indexes start at 0.

3.1.1.4 getMetadataValue
Prototype:Class:
Description:
Inputs:getMetadataValue(name : CharacterString) : CharacterString
CV_Coverage
Retrieve the metadata value for a given metadata name.

nameMetadata keyword for which to retrieve metadata.

OutPuts:
Returns:
Exceptions:

None
CharacterString
CV_MetadataNameNotFound

3.1.1.5 evaluate
Prototype:Class:
Description:

evaluate(point : PT_CoordinatePoint) : Vector
CV_Coverage
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 coordinateSystem attribute).

Page 21 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

Inputs:point
Point at which to find the grid values.
None
OutPuts:
VectorReturns:
CV_PointOutsideCoverage
Exceptions:3.1.1.6 evaluateAsBoolean
Prototype:Class:
Description:

evaluateAsBoolean(point : PT_CoordinatePoint) : Sequence<Boolean>
CV_Coverage
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 gridvalues for points which fall between grid cells is nearest neighbor. . The coordinate system of thepoint is the same as the grid coverage coordinate system.

Parameters
Point at which to find the coverage values.

OutPuts:
Returns:
Exceptions:

NoneSequence<Boolean>
CV_PointOutsideCoverage

Prototype:Class:
Description:

RET

3.1.1.7 evaluateAsByte

IR

point

ED

For converting a value to Boolean, see APPENDICE 5 CONVERSION RULES FOR VALUES TOLANGUAGE SPECIFIC DATA TYPES.

evaluateAsByte(point : PT_CoordinatePoint) : Sequence<Byte>
CV_Coverage
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 gridvalues for points which fall between grid cells is nearest neighbor. . The coordinate system of thepoint is the same as the grid coverage coordinate system.
For converting a value to Byte, see APPENDICE 5 CONVERSION RULES FOR VALUESTO LANGUAGE SPECIFIC DATA TYPES.
For integral values which have less than 8 bits, values are padded to 8 bits.

Inputs:point

Point at which to find the coverage values.

OutPuts:
Returns:
Exceptions

None
Sequence<Byte>
CV_PointOutsideCoverage

3.1.1.8 evaluateAsInteger
Prototype:

Page 22 of 71

evaluateAsInteger(point : PT_CoordinatePoint) : Sequence<Integer>

OGC Document Number 01-004

OpenGIS Implementation Specification
Class:
Description:

Grid Coverages

CV_Coverage
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 gridvalues for points which fall between grid cells is nearest neighbor. . The coordinate system of thepoint is the same as the grid coverage coordinate system.
For converting a value to Integer, see APPENDICE 5 CONVERSION RULES FOR VALUES TOLANGUAGE SPECIFIC DATA TYPES.
For integral values which have less than 32 bits, values are padded to 32 bits.

Inputs:point

Point at which to find the grid values.

OutPuts:
Returns:
Exceptions:

NoneSequence<Integer>
CV_PointOutsideCoverage

evaluateAsDouble(point : PT_CoordinatePoint) : Sequence<Double>
CV_Coverage
Return an 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 gridvalues for points which fall between grid cells is nearest neighbor. . The coordinate system of thepoint is the same as the grid coverage coordinate system.

IR

Prototype:Class:
Description:

ED

3.1.1.9 evaluateAsDouble

Inputs:point

Point at which to find the grid values.

OutPuts:
Returns:
Exceptions:
3.1.2

R
ET

For converting a value (v) to double (d), see APPENDICE 5 CONVERSION RULES FOR GRIDVALUES TO LANGUAGE SPECIFIC DATA TYPES.

None
Sequence<Double>
CV_PointOutsideCoverage

GC_GridCoverage

The GC_GridCoverage interface provides basic access to grid data values. This interface is shown in figure 8.
Each band in an image is represented as a sample dimension.

Page 23 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages<<Interfac e>>
CV_Coverage(from CV)<<Interface>>
GC_GridCoverage+ dataEditable : Boolean+ gridPacking : GC_GridPacking+ gridGeome try : GC_Grid Geome try+ numOverviews : Intege r+ opt im umDataBlockSizes : Se quence<Integer>

IRED+ get Overvie w GridGe omet ry(index : Integer) : GC_GridGeometry+ get Overvie w (inde x : Intege r) : GC_GridCoverage+ get DataBlo c kAsBoo le an(grid Range : GC_GridRang e) : Sequence<Boo le an>+ get DataBlo c kAsByte(gridRange : GC_GridRange) : Sequenc e<byte>+ get DataBlo c kAsInteger(gridRange : GC_GridRange) : Sequenc e<Inte ger>+ get DataBlo c kAsDoub le ( gridRan ge : GC_GridRange) : Sequ ence<Double>+ get PackedDataBlo c k(gridRange : GC_GridRange) : Sequenc e<b yte>
+ setDataBlockAsBoolean(gridRange : GC_GridRange, val : Sequence <Bo ole an>) : void
+ setDataBlockAsByte( gridRan ge : GC_GridRange, val : Sequenc e<byte>) : void
+ setDataBlockAsInte ger( gridRang e : GC_Grid Range, val : Sequenc e<Integer>) : void
+ setDataBlockAsDo uble(grid Range : GC_GridRange , val : Seq uence<Double>) : void
+ setPac kedDataBlock(gridRange : GC_Grid Range, val : Sequenc e<byte> ) : void

R
ET<<Data Type>>
GC_GridGeometry<<Dat a Type>>
GC_GridPacking<<Dat a Type>>
GC_GridRange

Figure 8: GC_GridCoverage interface providing access to grid data values.

3.1.2.1 Attributes

3.1.2.1.1 +dataEditable : Boolean
Description:
Type:

Page 24 of 71

True if grid data can be edited.
Boolean {frozen}

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

3.1.2.1.2 +gridPacking : GC_GridPacking
Description:
Type:

Information for the packing of grid coverage values.
GC_GridPacking {frozen}

3.1.2.1.3 +gridGeometry : GC_GridGeometry
Description:
Type:

Information for the grid coverage geometry. Grid geometry includes the valid range of gridcoordinates and the georeferencing.
GC_GridGeometry {frozen}

3.1.2.1.4 +numOverviews : Integer
Number of predetermined overviews for the grid.
Integer {frozen}

ED

Description:
Type:

3.1.2.1.5 +optimalDataBlockSizes : Sequence<Integer>

IR

Type:

Optimal size to use for each dimension when accessing grid values. These values together give theoptimal block size to use when retrieving grid coverage values. For example, a client application canachieve 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.
Note: If the implementation does not have optimal sizes the sequence will be empty.
Sequence<Integer> {frozen}

R
ET

Description:

3.1.2.2 getOverviewGridGeometry
Prototype:Class:
Description:
Inputs:getOverviewGridGeometry(overviewIndex : Integer)
GC_GridCoverage
Return the grid geometry for an overview.

overviewIndex
OutPuts:
Returns:
Exceptions:: GC_GridGeometry

Overview index for which to retrieve grid geometry. Indices start at 0.
None
GC_GridGeometry
GC_InvalidIndex

3.1.2.3 getOverview
Prototype:Class:
Description:

getOverview(overviewIndex : Integer) : GC_GridCoverage
GC_GridCoverage
Returns a pre-calculated overview for a grid coverage. The overview indices are numbered from 0 to
numberOverviews – 1.

Page 25 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

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 withlower resolution than the overview.
For example:
A 1 meter grid coverage with 3, 9, and 27 meter overviews will be ordered as follows:
Index
0
1
2

resolution3
9
27

The 3 meter overview will have 2 overviews as follows:
Index
0
1

resolution
927

Index of grid coverage overview to retrieve. Indexes start at 0.

OutPuts:
Returns:
Exceptions

None
GC_GridCoverage
GC_InvalidIndex

Class:
Description:

getDataBlockAsBoolean(gridRange : GC_GridRange) : Sequence<Boolean>
getDataBlockAsByte(gridRange : GC_GridRange) : Sequence<Byte>
getDataBlockAsInteger(gridRange : GC_GridRange) : Sequence<Integer>
getValueBlockAsDouble(gridRange : GC_GridRange) : Sequence<Double>
GC_GridCoverage
Return a sequence of strongly typed values for a block. A value for each sample dimension will be
returned.

R
ET

Prototype:IR

3.1.2.4 getDataBlockAsXXX

ED

overviewIndex

For CORBA, the sequencing order of the values in the sequence will follow the rules defined in
bandPacking GC_GridPacking.
For COM, 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 beaccessed 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 toget equivalent grid coordinates.
The requested grid range must satisfy the following rules for each dimension of the grid coverage:
Min grid coordinate <= grid range mimimun <= grid range maximum <= maximum gridcoordinate
The number of values returned will equal:(Max1 – Min1 + 1) * (Max2 – Min2 + 1)… * (Maxn – Minn + 1) * numberSampleDimensions
Where MinMax

Page 26 of 71

is the minimum ordinate in the grid range
is the maximum ordinate in the grid range

OGC Document Number 01-004

OpenGIS Implementation SpecificationN

Grid Coverages
is the number of dimensions in the grid coverage

Inputs:gridRange
OutPuts:
Returns:
Exceptions:

Grid range for block of data to be accessed.
NoneSequence<XXX>
GC_InvalidRange

3.1.2.5 getPackedDataBlock
Prototype:Class:
Description:

getPackedDataBlock(gridRange : GC_GridRange) : Sequence<Byte>
GC_GridCoverage
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 ofthe values in the sequence will follow the rules given by valueInBytePacking and bandPacking
defined in GC_GridPacking.

ED

The requested grid range must satisfy the following rules for each dimension of the grid coverage:
Min grid coordinate <= grid range minimum <= grid range maximum <= maximum gridcoordinateIR

The sequence of bytes returned will match the data type of the dimension. For example, a grid withone 16 bit unsigned (CV_16BIT_U) sample dimension will return 2 bytes for every cell in the block.
Byte padding Rules for grid values of less than 8 bits

R
ET

For 2 D 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 thevalueSequence 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 valueInBytePacking
defined in GC_GridPacking.
For grid values bigger than 8 bits, the order of their bytes is given by the byteInValuePacking definedin GC_GridPacking.
Inputs:gridRange

Grid range for block of data to be accessed.

OutPuts:
Returns:
Exceptions:

NoneSequence<Byte>
GC_InvalidRange

Page 27 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

3.1.2.6 setDataBlockAsXXX
Prototype:Class:
Description:

setDataBlockAsBoolean(gridRange : GC_GridRange, values :Sequence<Boolean>): Null
setDataBlockAsByte(gridRange : GC_GridRange, values :Sequence<Byte>): Null
setDataBlockAsInteger(gridRange : GC_GridRange, values :Sequence<Integer>) : Null
setDataBlockAsDouble(gridRange : GC_GridRange, values :Sequence<Double>) : Null
GC_GridCoverage
Set a block of strongly typed values for all sample dimensions.
The requested grid range must satisfy the following rules for each dimension of the grid coverage:
Min grid coordinate <= grid range minimum <= grid range maximum <= maximum gridcoordinateED

The number of values must equal:(Max1 – Min1 + 1) * (Max2 – Min2 + 1)… * (Maxn – Minn + 1) * numberSampleDimensions
Where Min
Max
N
gridRange

Grid range for block of data to be accessed.

Sequence of grid values for the given region.

OutPuts:
Returns:
Exceptions:RETvaluesIR

Inputs:is the mimium ordinate in the grid range
is the maximum ordinate in the grid range
is the number of dimensions in the grid coverage

None
Null
GC_InvalidRange
GC_GridNotEditable

3.1.2.7 setPackedDataBlock
Prototype:Class:
Description:

setPackedDataBlock(gridRange : GC_GridRange, values :Sequence<Byte>) : Null
GC_GridCoverage
Set a block of grid coverage data for all sample dimensions. See GetDataBlock for details on how topack the values.
The requested grid range must satisfy the following rules for each dimension of the grid coverage:
Min grid coordinate <= grid range minimum <= grid range maximum <= maximum gridcoordinate
For byte padding rules see getDataBlock.

Inputs:gridRange

Page 28 of 71

Grid range for block of data to be accessed.

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

valuesSequence of grid values for the given region.

OutPuts:
Returns:
Exceptions:

None
None
GC_InvalidRange
GC_GridNotEditable

3.1.3 GC_GridCoverageExchange

The GC_GridCoverageExchange creates instances of grid coverages and can export grid coverage to persistent
file formats. This interface is illustrated in figure 9.
<<Interface>>
GC_GridCoverageExchange+ numFormats : Integer+ metadataNames : Sequence<CharacterString><<Interface>>
GC_GridCoverage

IR<<Interface>>
GC_FormatED+ getMetadataValue(name : CharacterString) : CharacterString+ createFromName(name : CharacterString) : GC_GridCoverage+ listSubNames(name : CharacterString) : Sequence<CharacterString>+ createFromSubName(name : CharacterString, subName : CharacterString) : GC_GridCoverage+ getFormat(index : Integer) : GC_Format+ exportTo(gridCoverage : GC_GridCoverage, format : CharacterString, name : CharacterString, parameters : Sequence<GC_Parameter>) : void+ move(gridCoverage : GC_GridCoverage, coordsys : CS_CoordinateSystem, gridToCoordinateSystem : CT_MathTransform) : GC_GridCoverage<<Data Type>>
GC_Parameter

R
ET

Figure 9: GC_GridCoverageExchange Interface.

3.1.3.1 Attributes

3.1.3.1.1 +numFormats : Integer
Description:
Type:

The number of formats supported by the GC_GridCoverageExchange.
Integer {frozen}

3.1.3.1.2 +metadataNames : Sequence<CharacterString>
Description:
Type:
3.1.3.2

List of metadata keywords for the interface. If no metadata is available, the sequnce will be empty.
Sequence<CharacterString> {frozen}

getFormat

Prototype:Class:
Description:

getFormat(index : integer) : GC_Format
GC_GridCoverageExchange
Retrieve information on file formats or resources available with the GC_GridCoverageExchange
implementation. Indices start at zero.

Inputs:index

Page 29 of 71

Index for which to retrieve the format information.

OGC Document Number 01-004

OpenGIS Implementation Specification

OutPuts:
Returns:
Exceptions:

Grid Coverages

None
GC_Format
GC_InvalidIndex

3.1.3.3 getMetadataValue
getMetadataValue(name : CharacterString) : CharacterString
GC_GridCoverageExchange
Retrieve the metadata value for a given metadata name.

name
OutPuts:
Returns:
Exceptions

Metadata keyword for which to retrieve metadata.
None
CharacterString
GC_MetadataNameNotFoundED

Prototype:Class:
Description:
Inputs:3.1.3.4 createFromName

createFromName(name : CharacterString) : GC_GridCoverage
GC_GridCoverageExchange
Create a new GC_GridCoverage from a grid coverage file. This method is meant to allow
implementations to create a GC_GridCoverage from any file format. A implementation can support
nay number of formats which is determined from the GC_Format interface.

IR

Prototype:Class:
Description:
Inputs:

OutPuts:
Returns:
Exceptions:File name (including path) from which to create a grid coverage interface.. This file name can be any
valid file name within the underlying operating system of the server or a valid string, such as a URL
which specifics a grid coverage. Each implementation must determine if file name is valid for it’s own
use.
None
GC_GridCoverage
GC_CannotCreateGridCoverage

R
ET

name

3.1.3.5 listSubNames
Prototype:Class:
Description:

listSubNames(name : CharacterString) : Sequence<CharacterString>
GC_GridCoverageExchange
Retrieve the list of grid coverages contained within the given file or resource. Each grid can have a
different coordinate system, number of dimensions and grid geometry.
For example, a HDF-EOS file (GRID.HDF) contains 6 grid coverages each having a different
projection.
GRID.HDF:____ UTM|___ Geo|___ Polar|___ IGoode|___ SOM|___ Lamaz

Page 30 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

Note: An empty sequence will be returned if no sub names exist.
Inputs:name

OutPuts:
Returns:
Exceptions:File name (including path) from which to retrieve the grid coverage names .. This file name can be
any valid file name within the underlying operating system of the server or a valid string, such as a
URL which specifics a grid coverage. Each implementation must determine if file name is valid for it’s
own use. Implementations can support many different of file formats
NoneSequence<CharacterString>None

3.1.3.6 createFromSubName

Class:
Description:

createFromSubName(name : CharacterString, subName : CharacterString): GC_GridCoverage
GC_GridCoverageExchange
Create a new GC_GridCoverage from a file where the file contains many grid coverages. Thismethod is meant to allow implementations to create a GC_GridCoverage from any file format whichcontains many grid coverages. An example of such a format is HDF-EOS format.

ED

Prototype:

Inputs:File name (including path) from which to create a grid coverage interface.. This file name can be any
valid file name within the underlying operating system of the server or a valid string, such as a URL
which specifics a grid coverage. Each implementation must determine if name is valid for it’s own use.

subNameName of grid coverage contained in file name or resource.

OutPuts:
Returns:
Exceptions:

None
GC_GridCoverage
GC_CannotCreateGridCoverage

R
ET

IR

name

3.1.3.7 exportTo
Prototype:Class:
Description:
Inputs:exportTo(gridCoverage : GC_GridCoverage, fileFormat :CharacterString, fileName : CharacterString, creationOptions :Sequence<GC_Parameter>) : Null
GC_GridCoverageExchange
Export a grid coverage to a persistent file format.

gridCoverage

Source grid coverage.

fileFormat

String which indicates exported file format. The file format types are implementation specific.
The file format name is determined from the GC_Format interface.
Sample file formats include:“GeoTIFF”“PIX”“HDF-EOS”“NITF”“STDS-DEM”

Page 31 of 71- GeoTIFF- PCI Geomatics PIX- NASA HDF-EOS- National Image Transfer Format- Standard Transfer Data Standard

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

Other file format names are implementation dependent.
fileName

File name to store grid coverage. This file name can be any valid file name within theunderlying operating system of the server.

createOptions

Options to use for creating the file. These options are implementation specific are the valid
options is determined from the GC_Format interface.

OutPuts:
Returns:
Exceptions:

None
Null
GC_FileFormatNotCompatiableWithGridCoverage
GC_ErrorExportingGridCoverage
GC_InvalidParameterName
GC_InvalidParameterValue

3.1.3.8 move

Class:
Description:
Inputs:move(gridCoverage : GC_GridCoverage, coordsys : CS_CoordinateSystem,
gridToCoordinateSystem : CT_MathTransform) : GC_GridCoverage
GC_GridCoverageExchange
Create a new coverage with a different coordinate reference system.

ED

Prototype:

Source grid coverage.

coordsys

Coordinate system of the new grid coverage.

IR

gridCoverage

OutPuts:
Returns:
Exceptions:
3.1.4

R
ET

gridToCoordinateSystem Math transform to assign to grid coverage.
None
GC_GridCoverage
None

GP_GridAnalysis

The GP_GridAnalysis interface performs various analysis operations on a grid coverage. This interface isshown in figure 10.
<<Interface>>
GP_GridAnalysis+ histogram(band : Integer, minValue : Number, maxValue : Number, numBuckets : Integer) : Sequence<Integer>+ minValue(band : Integer) : Integer+ maxValue(band : Integer) : Integer+ meanValue(band : Integer) : Double+ medianValue(band : Integer) : Double+ modeValue(band : Integer) : Double+ stdDev(band : Integer) : Double+ correlation() : PT_Matrix

Figure 10: GP_GridAnalysis Interface. GP_GridAnalysis inherits from GC_GridCoverage.

Page 32 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

3.1.4.1 histrogram
Prototype:

histogram(sampleDimension : Integer, minimumEntryValue : Number,maximumEntryValue : Number, numberEntries : Integer) :Sequence<Integer>
GP_GridAnalysis
Determine the histogram of the grid values for a sample dimension.

Class:
Description:
Inputs:Index of sample dimension to be histogrammed..

miniumEntryValue

Minimum value stored in the first histogram entry.

maximumEntryValue

Maximum value stored in the last histogram entry.

numberEntries

Number of entries in the histogram.

OutPuts:
Returns:
Exceptions:

NoneSequence<Integer>
GP_InvalidSampleDimension

minValue(sampleDimension : Integer) : Number
GP_GridAnalysis
Determine the minimum grid value for a sample dimension.

R
ET

Prototype:Class:
Description:
Inputs:IR

3.1.4.2 minValue

sampleDimension
OutPuts:
Returns:
Exceptions:EDsampleDimension

Index of sample dimension.

None
Number
GP_InvalidSampleDimension

3.1.4.3 maxValue
Prototype:Class:
Description:
Inputs:maxValue(sampleDimension : Integer) : Number
GP_GridAnalysis
Determine the maximum grid value for a sample dimension.

sampleDimension
OutPuts:
Returns:
Exceptions:Page 33 of 71

Index of sample dimension.

None
Number
GP_InvalidSampleDimension

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

3.1.4.4 meanValue
Prototype:Class:
Description:

meanValue(sampleDimension : Integer) : Double
GP_GridAnalysis
Determine the mean grid value for a sample dimension.

Inputs:sampleDimension
OutPuts:
Returns:
Exceptions:Index of sample dimension.

None
DoubleGP_InvalidSampleDimension

3.1.4.5 medianValue

sampleDimension
OutPuts:
Returns:
Exceptions:

None
Number
GP_InvalidSampleDimension

RET

3.1.4.6 modeValue
Prototype:Class:
Description:
Inputs:modeValue(sampleDimension : Integer) : Number
GP_GridAnalysis
Determine the mode grid value for a sample dimension.

sampleDimension
OutPuts:
Returns:
Exceptions:Index of sample dimension.

ED

medianValue(sampleDimension : Integer) : Number
GP_GridAnalysis
Determine the median grid value for a sample dimension.

IR

Prototype:Class:
Description:
Inputs:Index of sample dimension.

None
Number
GP_InvalidSampleDimension

3.1.4.7 stdDev
Prototype:Class:
Description:
Inputs:stdDev(sampleDimension : Integer) : Double
GP_GridAnalysis
Determine the standard deviation from the mean of the grid values for a sample dimension.

sampleDimension
OutPuts:
Returns:
xceptions:Page 34 of 71

Index of sample dimension.

None
DoubleGP_InvalidSampleDimension

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

3.1.4.8 correlation
Prototype:Class:
Description:
Inputs:correlation() : PT_Matrix
GP_GridAnalysis
Determine the correlation between sample dimensions in the grid.

None
OutPuts:
Returns:
Exceptions:

3.1.5

None
PT_Matrix
GP_GridCoverageHasOnlyOneSampleDimension

GP_GridCoverageProcessor

ED

The GP_GridCoverageProcessor allows for different ways of accessing the grid coverage values. This interface
is shown in figure 11.
<<Interface>>
GP_GridCoverageProcessor+ metadataNames : Sequence<CharacterString>+ numOperations : Integer

R
ET

IR

+ getMetadataValue(name : CharacterString) : CharacterString+ getOperation(index : Integer) : GP_Operation+ Analyse(gridCoverage : GC_GridCoverage) : GP_GridAnalysis+ doOperation(operationName : CharacterString, parameters : Sequence<GC_Parameter>) : GC_GridCoverage<<Interface>>
GC_GridCoverage<<Data Type>>
GC_Parameter(from GC)

(from GC)<<Interface>>
GP_GridAnalysis<<Interface>>
GP_Operation

Figure 11: GP_GridCoverageProcessor for performing operations in grid coverages.

Using one of these operations to change the way the grid is being accessed will not affect the state of the gridcoverage controlled by another operations. For example, changing the interpolation method should not affect the numberof sample dimensions currently being accessed or value sequence.
3.1.5.1 Attributes
3.1.5.1.1 +metadataNames : Sequence<CharacterString>
Description:
Type:

Page 35 of 71

Retrieve the list of metadata keywords for the interface. An empty list will returned if no metadata isavailable.
Sequence<CharacterString> {frozen}

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

3.1.5.1.2 +numOperations : Integer
Description:
Type:

The number of operations supported by the GP_GridCoverageProcessor.
Integer {frozen}

3.1.5.2 getMetadataValue
getMetadataValue(name : CharacterString) : CharacterString
GP_GridCoverageProcessor
Retrieve the metadata value for a given metadata name.

nameMetadata keyword for which to retrieve metadata.

OutPuts:
Returns:
Exceptions:

None
CharacterString
GP_MetadataNameNotFoundED

Prototype:Class:
Description:
Inputs:3.1.5.3 getOperation

getOperation(index : Integer) : GP_Operation
GP_GridCoverageProcessor
Retrieve a grid processing operation information. The operation information will contain the name ofthe operation as well as a list of its parameters.

IR

Prototype:Class:
Description:
Inputs:Index for which to retrieve the operation information.

OutPuts:
Returns:
Exceptions:3.1.5.4 Analyze
Prototype:Class:
Description:

R
ET

Index

None
GP_Operation
GP_InvalidIndex

Analyze(gridCoverage: GC_GridCoverage) : GP_GridAnalysis
GP_GridCoverageProcessor
Creates a GP_GridAnalysis interface from a grid coverage.. This allows grid analysis functions to be
performed on a grid coverage

Inputs:gridCoverage
OutPuts:
Returns:
Exceptions:

Grid coverage on which the analysis will be performed.
None
GP_GridAnalysis
None3.1.5.5 doOperation
Prototype:

Page 36 of 71

doOperation(operationName : String, parameters :Sequence<GC_Parameter>) : GC_GridCoverage

OGC Document Number 01-004

OpenGIS Implementation Specification
Class:
Description:

Grid Coverages

GP_GridCoverageProcessor
Apply a process operation to a grid coverage.

Inputs:operationName

Name of the operation to be applied to the grid coverage..

parameters

List of name value pairs for the parameters required for the operation.

OutPuts:
Returns:
Exceptions:

None
GC_GridCoverage
GP_OperationNotFound
GP_InvalidParameterName
GP_InvalidParameterValue

3.1.6

Supporting Interfaces in the Coverage (CV) Package

ED

3.1.6.1 CV_SampleDimension
The CV_SampleDimension interface describes the data values for a coverage. For a grid coverage a sample
dimension is a band. This interface is shown in figure 12.

R
ET

IR

<<Interface>>
CV_SampleDimension+ categoryNames : Sequence<CharacterString>+ colorInterpretation : CV_ColorInterpretation+ description : CharacterString+ minimumValue : Number+ maximumValue : Number+ nodataValue : Sequence<Number>+ paletteInterpretation : CV_PaletteInterpretation+ palette : Sequence2D<Integer>+ sampleDimensionType : CV_SampleDimensionType+ units : CS_Unit+ valueOffset : Double+ valueScale : Double+ metadataNames : Sequence<CharacterString><<CodeList>>
CV_SampleDimensionType+ getMetadataValue(name : CharacterString) :<<CodeList>>
CV_ColorInterpretation<<CodeList>>
CV_PaletteInterpretation

Figure 12: CV_SampleDimension Interface. Descriptive information for a sample dimension.
3.1.6.1.1 Attributes
3.1.6.1.1.1 +description : CharacterString
Description:
Type:

Sample dimension title or description. This string may be empty if no description is present.
CharacterString {frozen}

3.1.6.1.1.2 +sampleDimensionType : CV_SampleDimensionType

Page 37 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification
Description:Type:

Grid Coverages

A code value indicating grid value data type. This will also indicate the number of bits for the datatype.
CV_SampleDimensionType {frozen}

3.1.6.1.1.3 +categoryNames : Sequence<CharacterString>
Description:

Sequence of category names for the values contained in a sample dimension. This allows for names
to be assigned to numerical values. The first entry in the sequence relates to a cell value of zero. For
grid coverages, category names are only valid for a classified grid data.
For example:“Background““Water”“ Forest”“Urban”

Note: If no category names exist, an empty sequence is returned.
Sequence<CharacterString> {frozen}

ED

Type:

0
1
2
3

3.1.6.1.1.4 +colorInterpretation : CV_ColorInterpretation

Type:

Color interpretation of the sample dimension. A sample dimension can be an index into a color
palette or be a color model component. If the sample dimension is not assigned a color interpretation
the value is CV_Undefined.
CV_ColorInterpretation {frozen}

IR

Description:

3.1.6.1.1.5 +paletteInterpretation : CV_PaletteInterpretation

Indicates the type of color palette entry for sample dimensions which have a palette. If a sample
dimension has a palette, the color interpretation must be CV_GrayIndex or CV_PaletteIndex. A
palette entry type can be Gray, RGB, CMYK or HLS.
CV_PaletteInterpretation {frozen}

Description:R
ET

Description:Type:

Note: If the grid coverage has no color palette, an empty sequence will be returned.
Sequence<Sequence<Integer>> {frozen}

Type:

3.1.6.1.1.6 +palette : Sequence<Sequence<Integer>>

Color palette associated with the sample dimension. A color palette can have any number of colors.
See palette interpretation for meaning of the palette entries.

3.1.6.1.1.7 +noDataValue : Sequence<Number>
Description:

Type:

Values to indicate “no data” values for the sample dimension. For low precision sample dimensions,this will often be no “no data values”.
Note: If there are no “no data values”, the sequence will be empty.
Sequence<Number> {frozen}

3.1.6.1.1.8 +minimumValue : Number

Page 38 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification
Description:Type:

Grid Coverages

The minimum value occurring in the sample dimension. If this value is not available, this value canbe determined from the GP_GridAnalysis minValue operation.
Note: This value can be empty if this value is not provided by the implementation.
Number {frozen}

3.1.6.1.1.9 +maximumValue : Number
Description:

Type:

The maximum value occurring in the sample dimension. If this value is not available, this value canbe determined from the GP_GridAnalysis maxValue operation.
Note: This value can be empty if this value is not provided by the implementation.
Number {frozen}

3.1.6.1.1.10 +units: CS_Unit

Type:

The unit information for this sample dimension. This interface typically is provided with gridcoverages which represent digital elevation data.
Note: This value will be NULL if no unit information is available.
CS_Unit {frozen}

Offset is the value to add to grid values for this sample dimension. This attribute is typically used
when the sample dimension represents elevation data. The default for this value is 0.
Double {frozen}

R
ET

Type:

IR

3.1.6.1.1.11 +offset : Double
Description:ED

Description:

3.1.6.1.1.12 +scale : Double
Description:
Type:

Scale is the value which is multiplied to grid values for this sample dimension. This attribute is
typically used when the sample dimension represents elevation data. The default for this value is 1.
Double {frozen}

3.1.6.1.1.13 +metadataNames : Sequence<CharacterString>
Description:
Type:

The list of metadata keywords for a sample dimension. If no metadata is available. The sequence will
be empty.
Sequence<CharacterString> {frozen}

3.1.6.1.2 getMetadataValue
Prototype:Class:
Description:
Inputs:getMetadataValue(name : CharacterString) : CharacterString
CV_SampleDimension
Retrieve the metadata value for a given metadata name.

nameMetadata keyword for which to retrieve metadata.

Page 39 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Outputs:
Returns:
Exceptions:

Grid Coverages

None
CharacterString
CV_MetadataNameNotFound

3.1.6.2 CV_SampleDimensionType
CV_SampleDimensionType specifies the various dimension types for coverage values. For grid coverages,
these correspond to band types. This codelist is shown in figure 13.
<<CodeLis t> >CV_Sample Dim ensionType

ED+ CV _1BIT : Integer = 0+ CV _2BIT : Integer = 1+ CV _4BIT : Integer = 2+ CV _8BIT_ U : Integer = 3+ CV _8BIT_ S : Integer = 4+ CV _16BIT_U : In teger = 5+ CV _16BIT_S : Integer = 6+ CV _32BIT_U : In teger = 7+ CV _32BIT_S : Integer = 8+ CV _32BIT_REA L : Intege r = 9+ CV _64BIT_REA L : Intege r = 10

3.1.6.3 CV_PaletteInterpretation

IR

Figure 13: Context Diagram: CV_SampleDimensionType

R
ET

CV_PaletteInterpretation describes the color entry in a color table. See Appendix 3 for specifics on how thesetype relate to the color entry Well-known Structure. This codelist is shown in figure 14<<CodeList>>
CV_PaletteInterpretation+ CV_Gray : Integer = 0+ CV_RGB : Integer = 1+ CV_CMYK : Integer = 2+ CV_HLS : Intege r = 3

Figure 14: Context Diagram: CV_PaletteInterpretation
3.1.6.4 CV_ColorInterpretation
CV_ColorInterpretation specifies the mapping of a band to a color model component. This codelist is shown in figure
15.

Page 40 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages<<CodeList>>
CV_ColorInterpretation+ CV_Undefined : Integer = 0+ CV_GrayIndex : Integer = 1+ CV_PaletteIndex : Integer = 2+ CV_RedBand : Integer = 3+ CV_GreenBand : Integer = 4+ CV_BlueBand : Integer = 5+ CV_AlphaBand : Integer = 6+ CV_HueBand : Integer = 7+ CV_SaturationBand : Integer = 8+ CV_LightnessBand : Integer = 9+ CV_CyanBand : Integer = 10
+ CV_MagentaBand : Integer = 11
+ CV_YellowBand : Integer = 12
+ CV_BlackBand : Integer = 13

Figure 15: Context Diagram: CV_ColorInterpretationED

The values of CV_ColorInterpretation mean:
CV_UndefinedBand is not associated with a color model component.
Band is an index into a lookup table.

CV_PaletteIndex

Band is a color index into a color table.

CV_RedBand
CV_GreenBand
CV_BlueBand
CV_AlphaBand

Bands correspond to RGB color model components. AlphaBand may or may not bepresent.

R
ET

IR

CV_GrayIndex

3.1.7

CV_HueBand
CV_SaturationBand
CV_LightnessBand

Bands correspond to HSL color model.

CV_CyanBand
CV_MagentaBand
CV_YellowBand
CV_BlackBand

Bands correspond to CMYK color model.

Supporting Interfaces and Structures in the Grid Coverage (GC) Package

3.1.7.1 GC_GridPacking
The GC_GridPacking data type indicates the packing organization of grid coverage data values. This data typeis shown in figure 16.

Page 41 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages<<Data Type>>
GC_GridPacking+ byteInValuePacking : GC_ByteInValuePacking+ valueInBytePacking : GC_ValueInBytePacking+ bandPacking : Integer<<CodeList>>
GC_ByteInValuePacking<<CodeList>>
GC_ValueInBytePacking

Figure 16: GC_GridPacking data type.

ED

3.1.7.1.1 Attributes

3.1.7.1.1.1 +byteInValuePacking : GC_ByteInValuePakcing
Description:
Type:

Order of bytes packed in values for sample dimensions with greater than 8 bits.
GC_ByteInValuePakcing {frozen}

Order of values packed in a byte for CV_1BIT, CV_2BIT and CV_4BIT data types.
GC_ValueInBytePacking {frozen}

R
ET

Description:
Type:

IR

3.1.7.1.1.2 +valueInBytePacking : GC_ValueInBytePacking

3.1.7.1.1.3 +bandPacking : Integer
Description:

Gives the ordinate index for the band. This index indicates how to form a band-specific coordinate
from a grid coordinate and a sample dimension number.
This indicates the order in which the grid values are stored in streamed data. This packing order isused when grid values are retrieved using the PackedDataBlock or set using SetPackedDataBlock
operations on GC_GridCoverage.
bandPacking of0
the full band-specific coordinate is (b, n1, n2...)
1
the full band-specific coordinate is (n1, b, n2...)
2
the full band-specific coordinate is (n1, n2, b...)
Where b
n1
n2

Type:

Page 42 of 71

is bandis dimension 1
is dimension 2

For 2 dimensional grids, band packing of 0 is referred to as band sequential, 1 line interleaved and 2
pixel interleaved.
Integer {frozen}

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

3.1.7.2 GC_GridGeometry
The GC_GridGeometry data type describes the valid range of grid coordinates and the math transform totransform grid coordinates to real world coordinates. This data type is shown in figure 17.
<<Data Type>>
GC_GridGeometry+ gridRange : GC_GridRange+ gridToCoordinateSystem : CT_MathTransform<<Data Type>>
GC_GridRange

3.1.7.2.1 Attributes

IR

3.1.7.2.1.1 +gridRange : GC_GridRange

ED

Figure 17: GC_GridGeometry data type.

The valid coordinate range of a grid coverage. The lowest valid grid coordinate is zero.

Type:

A grid with 512 cells can have a minimum coordinate of 0 and maximum of 512, with 511 as thehighest valid index.
GC_GridRange {frozen}

R
ET

Description:

3.1.7.2.1.2 +gridToCoordinateSystem : CT_MathTransform
Description:Type:

The CT_MathTransform allows for the transformations from grid coordinates to real world earth
coordinates. The transform is often an affine transformation. The coordinate system of the real world
coordinates is given by the coordinateSystem : CS_CoordinateSystem attribute on the CV_Coverage.
Note: If no math transform is given, gridToCoordinateSystem will be NULL.
CT_MathTransform {frozen}

3.1.7.3 GC_GridRange
GC_GridRange defines a range of grid coverage coordinates. For example this data type is used to access a
block of grid coverage data values. This is shown in figure 18.
<<Data Type>>
GC_GridRange+ lo : Sequence<Integer>+ hi : Sequence<Integer>

Figure 18: GC_GridRange data type.

Page 43 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

3.1.7.3.1 Attributes
3.1.7.3.1.1 +lo : SequenceInteger>
Description:
Type:

The valid minimum inclusive grid coordinate. The sequence contains a minimum value for eachdimension of the grid coverage. The lowest valid grid coordinate is zero.
Sequence<Integer> {frozen}

3.1.7.3.1.2 +hi : Sequence<Integer>
Description:
Type:

The valid maximum exclusive grid coordinate. The sequence contains a maximum value for eachdimension of the grid coverage.
Sequence<Integer> {frozen}

3.1.7.4 GC_ParameterInfo

ED

This structure contains information about a parameter required for a grid coverage processing operation. This
information includes the name of the parameter, parameter description, parameter type etc. This data type is illustrated
in figure 19.
<<Data Type>>
GC_ParameterInfo(from GC)

R
ET

IR

name : CharacterString
description : CharacterString
type : GC_ParameterTypedefaultValue : Object
minimumValue : Number
maximumValue : Number

Figure 19: GC_ParameterInfo data type.

3.1.7.4.1 Attributes

3.1.7.4.1.1 +name : CharacterString
Description:
Type:

Parameter name.
CharacterString {frozen}

3.1.7.4.1.2 +description : CharacterString
Description:
Type:

Parameter description. If no description, the value will be an empty string.
CharacterString {frozen}

3.1.7.4.1.3 +type : GC_ParameterInfoType
Description:
Type:

Page 44 of 71

Parameter type. The enumeration contains standard parameter types for integer, string, floating-point
numbers, objects, etc.
GC_ParameterInfoType {frozen}

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

3.1.7.4.1.4 +defaultValue : Object
Description:

Type:

Default value for parameter. The type Object can be any type including a Number or a
CharacterString. For example, a filtering operation could have a default kernel size of 3.
Note: If there is no default value, defaultValue will be empty.
Object {frozen}

3.1.7.4.1.5 +minimumValue : Number
Description:Type:

Minimum parameter value.. For example, a filtering operation could have a minimum kernel size of
3.
Note: If there is no minimum value, minimumValue will be empty.
Number {frozen}

Type:

Maximum parameter value.. For example, a filtering operation could have a maximum kernel size of
9.
Note: If there is no maximum value, maximumValue will be empty.
Number {frozen}

3.1.7.5 GC_ParameterIR

Description:

ED

3.1.7.4.1.6 +maximumValue : Number

RET

The parameter codelist required for a grid coverage processing operation. This structure contains theparameter name (as defined from the GC_ParameterInfo structure) and it’s value. This data type is shown in figure 20.
<<Data Type>>
GC_Parameter(from GC)

name : CharacterStringvalue : Object

Figure 20: GC_Parameter data type.

3.1.7.5.1 Attributes
3.1.7.5.1.1 +name : CharacterString
Description:
Type:

Parameter name.
CharacterString {frozen}

3.1.7.5.1.2 +value : Object
Description:

The value for parameter. The type Object can be any type including a Number, a CharacterString or
an instance of an interface. For example, a grid processor operation will typically require a parameterfor the input grid coverage. This parameter may have “Source” as the parameter name and theinstance of the grid coverage as the value.

Page 45 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification
Type:

Grid Coverages

Object {frozen}

3.1.7.6 GC_Format
This interface is a discovery mechanism for the information on each format supported by the
GC_GridCoverageExchange. This interface is shown in figure 21.
<<Interface>>
GC_Format+ name : CharacterString+ description : CharacterString+ vendor : CharacterString+ docURL : CharacterString+ version : CharacterString+ numParameters : IntegerED+ getParameterInfo(index : Integer) : GC_ParameterInfo<<Data Type>>
GC_ParameterInfo

3.1.7.6.1 Attributes
3.1.7.6.1.1 +name : CharacterString

Name of the file format. This name is used as the name of the file in the exportTo operation.
CharacterString {frozen}

R
ET

Description:
Type:

IR

Figure 21: Context Diagram: GC_Format.

3.1.7.6.1.2 +description : CharacterString
Description:Type:

Description of the file format. If no description, the value will be an empty string.
CharacterString {frozen}

3.1.7.6.1.3 +vendor : CharacterString
Description:
Type:

Vendor or agency for the format.
CharacterString {frozen}

3.1.7.6.1.4 +docURL : CharacterString
Description:
Type:

Documentation URL for the format.
CharacterString {frozen}

3.1.7.6.1.5 +version : CharacterString
Description:
Type:

Page 46 of 71

Version number of the format.
CharacterString {frozen}

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

3.1.7.6.1.6 +numParameters : Integer
Description:
Type:

Number of optional parameters for the exportTo operation.
Integer {frozen}

3.1.7.6.2 getParameterInfo
getParameterInfo(index : Integer) : GC_ParameterInfo
GC_Format
Retrieve the parameter information for a given index.

index

Index to the parameter.

Outputs:
Returns:
Exceptions

None
GC_ParameterInfo
GC_InvalidIndex

3.1.7.7 GC_ValueInBytePacking

ED

Prototype:Class:
Description:
Inputs:IR

Order of the pixels in a byte for CV_1BIT, CV_2BIT and CV_4BIT grid values. This codelist is shown infigure 22.
<<Code List >>GC_V alue InByt e Packing

RET+ GC_LoBitF ir st : Int e ge r = 0+ GC_HiBit Firs t : Int ege r = 1

Figure 22: Context Diagram: GC_ValueInBytePacking

3.1.7.8 GC_ByteInValuePacking

Specifies the order of the bytes in multi-byte values. GC_wkbXDR is Big Endian. GC_wkbNDR is Little
Endian.This is shown in figure 23.
<<CodeLis t> >GC_ByteInValuePacking+ GC_w kbXDR : Int eger = 0+ GC_w kbNDR : Integer = 1

Figure 23: Context Diagram: GC_ByteInValuePacking
3.1.7.9 GC_ParameterType
Specifies the type of a parameter value. A sequence of parameters is used to pass a variable number ofarguments to an operation and each of these parameters can have a different parameter type. An operation requiring astring and grid coverage would use two parameters for type GC_StringType and GC_GridCoverageType. This codelist
is shown in figure 24.

Page 47 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages<<CodeList>>
GC_ParameterType(from GC)

GC_IntegerType : Integer = 0
GC_FloatingPointType : Integer = 1
GC_StringType : Integer = 2
GC_VectorType : Integer = 3
GC_GridCoverageType : Integer = 4
CT_MathTransformType : Integer = 5
GC_CoordinateSystemType : Integer = 6
GC_GridGeometryType : Integer = 7
GC_ByteInValuePackingType : Integer = 8
GC_ValueInBytePackingType : Integer = 9

Figure 24: Context Diagram: GC_ParameterType
Descriptions of various values in GC_ParameterType are:ED

Supporting Interfaces in Grid Coverage Processing (GP) Package

R
ET

3.1.8

Integer parameter.
Floating point parameter
String parameter
Sequence of numbers
Grid coverage instance
Math transform instance
Coordinate system instance
Grid geometry instance
Byte in value packing enumeration see GC_ByteInValuePacking
Value in byte packing enumeration see GC_ValueInBytePacking

IR

GC_IntegerType
GC_FloatingPointType
GC_StringType
GC_VectorType
GC_GridCoverageType
CT_MathTransformType
CS_CoordinateSystemType
GC_GridGeometryType
GC_ByteInValuePackingType
GC_ValueInBytePackingType

This interface provides different methods to access grid coverage values and image-processing capabilities forgrid coverages. These processors will transform values within a single sample dimension, and leave the values in othersample dimensions unaffected. The modified sample dimension may also change its type (e.g. from CV_4BIT to
CV_1BIT). The actual underlying grid data remains unchanged.
3.1.8.1 GP_Operation

This interface provides descriptive information for a grid coverage processing operation. The descriptive
information includes such information as the name of the operation, operation description, and number of source gridcoverages required for the operation. The operations and attributes of this interface is given figure 25.

Page 48 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages<<Interface>>
GP_Operation+ name : CharacterString+ description : CharacterString+ vendor : CharacterString+ docURL : CharacterString+ version : CharacterString+ numSources : Integer+ numParameters : Integer+ getParameterInfo(index : Integer) : GC_ParameterInfo<<Data Type>>
GC_ParameterInfo(from GC )3.1.8.1.1 Attributes
3.1.8.1.1.1 +name : CharacterString
Name of the processing operation.
CharacterString {frozen}

IR

Description:
Type:

ED

Figure 25: GP_Operation Interface

Description:
Type:

R
ET

3.1.8.1.1.2 +description : CharacterString

Description of the processing operation. If no description, the value will be an empty string.
CharacterString {frozen}

3.1.8.1.1.3 +vendor : CharacterString
Description:
Type:

Implementation vendor name.
CharacterString {frozen}

3.1.8.1.1.4 +docURL : String
Description:Type:

URL for documentation on the processing operation. If no online documentation is available thestring will be empty.
String {frozen}

3.1.8.1.1.5 +version : String
Description:
Type:

Version number for the implementation.
String {frozen}

3.1.8.1.1.6 +numSources : Integer

Page 49 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification
Description:Type:

Grid Coverages

Number of source grid coverages required for the operation.
Integer {frozen}

3.1.8.1.1.7 +numParameters : Integer
Description:
Type:

Number of parameters for the operation.
Integer {frozen}

3.1.8.1.2 getParameterInfo
getParameterInfo(index : Integer) : GC_ParameterInfo
GP_Operation
Retrieve the parameter information for a given index.

index

Parameter information index to retrieve. Index starts at 0.

Outputs:
Returns:
Exceptions:

None
GC_ParameterInfo
GP_InvalidIndex

Well-known Binary Representations

3.2.1

WKBGeoTIFF

IR

3.2

ED

Prototype:Class:
Description:
Inputs:R
ET

GeoTIFF represents an effort by over 160 different remote sensing, GIS, cartographic, and surveying relatedcompanies and organizations to establish a TIFF based interchange format for georeferenced raster imagery.
The initial efforts to define a TIFF "geotie" specification began under the leadership of Ed Grissom at
Intergraph, and others in the early 1990's. In 1994 a formal GeoTIFF mailing-list was created and maintained by Niles
Ritter at JPL which quickly grew to over 140 subscribers from government and industry. The purpose of the list is to
discuss common goals and interests in developing an industry-wide GeoTIFF standard. This culminated in a conferencein March of 1995 hosted by SPOT Image, with representatives from USGS, Intergraph, ESRI, ERDAS, SoftDesk,
MapInfo, NASA/JPL, and others, in which the current working proposal for GeoTIFF was outlined. Niles Ritter, andMike Ruth of SPOT Image condensed the outline into a prerelease GeoTIFF specification document.
Following discussions with Dr. Roger Lott of the European Petroleum Survey Group (EPSG), the GeoTIFF projection
parameterization method was extensively modified, and brought into compatibility with both the POSC Epicentre
model, and the Federal Geographic Data Committee (FGDC) metadata approaches.
GeoTIFF fully complies with the TIFF 6.0 specifications. Its extensions do not in any way go against the TIFF
recommendations, nor do they limit the scope of raster data supported by TIFF.
GeoTIFF uses a small set of reserved TIFF tags to store a broad range of georeferencing information, catering
to geographic as well as projected coordinate systems needs. Projections include UTM, US State Plane and National
Grids, as well as the underlying projection types such as Transverse Mercator, Lambert Conformal Conic, etc. No
information is stored in private structures, IFD's or other mechanisms which would hide information from naive TIFF
reading software.
More information on GeoTIFF can be found at:
GeoTIFF Home page:

Page 50 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

http://www.remotesensing.org/geotiff/geotiff.html
GeoTIFF Revision 1.0 specification:
http://www.remotesensing.org/geotiff/spec/geotiffhome.html
TIFF Revision 6.0 specification:
http://www.adobe.com/asn/developers/pssdk/CONTENTS/UNSUPPTD/TIFF/TIFF6.PDF
Sample GeoTIFF images:

3.3

GP_GridCoverageProcessor OperationsED

ftp://ftpmcmc.cr.usgs.gov/release/geotiff/images/

The following are examples of grid coverage processing operations. This list is not an exhaustive list.
Different GP_GridCoverageProcessor implementations will provide different operations and need not implement theentire list below.

IR

Using one of these operations to change the way the grid is being accessed will not affect the state of the gridcoverage controlled by another operations. For example, changing the interpolation method should not affect the numberof sample dimensions currently being accessed or value sequence.

R
ET

The GP_Operation tables below contains the following:
Name

Name of the processing operation. This name is passed as a parameter to the
GP_GridCoverageProcessor DoOperation method to instantiate a new grid coverageon which the processing operation is performed.

Description

Description of the processing operation.

VendorVendor of the processing operation.

DocURL

Documentation URL for the processing operation. This value will be an empty
string (“”) if no documentation URL is provided.

VersionVersion number of the implementation.
Number Source
Number of source grid coverages required for the operation.
Number Parameters

Number parameters required for the operation. The GC_ParameterInfo
table contains this number of rows.

The GC_ParameterInfo tables below contains one the following:

Page 51 of 71

Name

Name of parameter. The parameter name is used in the GC_Parametername value structure.

Description

Parameter description

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

GC_ParameterType

Parameter type see appendix A.2.2 Enumerations Supporting
GC_GridCoverage for details.

Default Value

Default value of the parameter. No default value will given (indicated byNA) if it is inappropriate for the parameter type. Those entries in the tablewith a * prefix indicates an implied default.

Minimum Value

Minimum value of the parameter. No default value will given (indicatedby NA) if it is inappropriate for the parameter type.

Maximum Value

Maximum value of the parameter. No default value will given(indicatedby NA) if it is inappropriate for the parameter type.

3.3.1 Gray Scale Threshold

GP_Operation

ED

A gray scale threshold classifies the grid coverage values into a Boolean value. This sample dimension will be
modified into a Boolean value and the dimension type of the source sample dimension will be represented as CV_1BIT.

Description

VendorDoc URL

Version“Threshold”

VendorSpecific

VendorSpecific

VendorSpecific

VendorSpecific

GC_ParameterInfo“Source”“SampleDimension”

Vendor SpecificVendor Specific

GC_GridCoverageType
GC_IntegerType

Default
Value
NA
0“Threshold”

Vendor Specific

GC_NumberType

NA

SourceDescription

GC_ParameterType

R
ET

Name

IR

Name

Number
Source1

NumberParameters
3

Minimum
Value
NA
0
NA

Maximum Value
NA
Dependent on Grid
coverage processed
NA

Source grid coverage to apply gray scale threshold.

SampleDimension

Sample dimension on which the operation will be applied. This sample dimension will be
modified into a Boolean value and the dimension type of the source sample dimension will be
CV_1BIT.

ThresholdThreshold value. Values below the threshold will be given a value of zero and values above or
equal to will be given a one. A “no data value” will be given a zero value.

Exceptions

GP_InvalidSampleDimension
GP_InvalidThresholdValue

3.3.2 Image Enhancements

Image enhancements are used to improve the contrast of grid data values in sample dimensions which have asmall range of data values. For example, a sample dimension with an 8 bit unsigned dimension type may only have adata range from 0 to 100. This sample dimension will appear dark when visualized. To improve the visualization of thegrid data values, a transformation or enhancement can be applied to the grid values to transform the values to a range

Page 52 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

from 0 to 255 thus improving the visualization of the grid data. The modified sample dimension will have a sample
dimension type of CV_8BIT_U.
3.3.2.1 Linear Enhancement
Perform a linear enhancement on a sample dimension of a grid coverage. The range of grid values is expanded
uniformly to fill the range of 0 to 255. Close grid values may now be distinquished when visualized
A linear enhancement uses the formula:
New value = (Value – Min)/(Max – Min) * 255
Where

New value
Value
Min
Max

the 8 bit unsigned output grid value
the input grid value
minimum grid value in the sample dimension
maximum grid value in the sample dimension

GP_Operation

ED

Note: When converting the floating-point new value to 8-bit integer, the new value is rounded.

Description

VendorDoc URL

Version“LinearEnhancement”

VendorSpecific

VendorSpecific

VendorSpecific

VendorSpecific

GC_ParameterInfo
Description

GC_ParameterType

R
ET

Name

IR

Name

“Source”“SampleDimension”

SourceVendor SpecificVendor Specific

GC_GridCoverageType
GC_IntegerType

Number
Source1

Default
Value
NA
0

NumberParameters
2

Minimum Maximum
Value
Value
NA
NA
0
Dependent on
Grid coverage
processed

Source grid coverage to apply enhancement.

SampleDimension

Sample dimension on which the operation will be applied. The dimension type of the source
sample dimension will be changed to CV_8BIT_U.

Exceptions

GP_InvalidSampleDimension

3.3.2.2 Root Enhancement
Perform a root enhancement on a grid coverage sample dimension.
A root enhancement uses the formula:
New value = sqrt (Value – Min)/sqrt (Max – Min) * 255
WherePage 53 of 71

New value
Value
Min

the 8 bit unsigned output grid value
the input grid value
minimum grid value in the sample dimension

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

Maxmaximum grid value in the sample dimension

Note: When converting the floating-point new value to 8-bit integer, the new value is rounded.
GP_Operation
Name

Description

VendorDoc URL

Version“RootEnhancement”

VendorSpecific

VendorSpecific

VendorSpecific

VendorSpecific

Number
Source1

NumberParameters
2

GC_ParameterInfo
Description

GC_ParameterType“Source”“SampleDimension”

Vendor SpecificVendor Specific

GC_GridCoverageType
GC_IntegerType

Default
Value
NA
0

Minimum
Value
NA
0

Maximum
Value
NA
Dependent on
Grid coverage
processed

ED

Name

Source grid coverage to apply enhancement.

SampleDimension

Sample dimension on which the operation will be applied. The dimension type of the source
sample dimension will be changed to CV_8BIT_U.

Exceptions

GP_InvalidSampleDimension

3.3.2.3 Equalization Enhancement

IR

SourceGP_Operation
Name

R
ET

Perform an equalization enhancement on a grid coverage sample dimension. Grid values are assigned newvalues based on their frequency of occurrence. A greater range of new values is assigned to portions of the histogramwith the higher frequency of occurrence.

“EqualizationEnhancement”

Description

VendorVendorSpecific

VendorSpecificDoc
URL
VendorSpecific

Version
VendorSpecific

Number
Source1

NumberParemeters
2

GC_ParameterInfo
Name

Description

GC_ParameterType“Source”“SampleDimension”

Vendor SpecificVendor Specific

GC_GridCoverageType
GC_IntegerType

Default
Value
NA
0

Minimum
Value
NA
0

Maximum
Value
NA
Dependent on
Grid coverage
processed

SourceSource grid coverage to apply enhancement.

SampleDimension

Sample dimension on which the operation will be applied. The dimension type of the source
sample dimension will be changed to CV_8BIT_U.

Page 54 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification
Exceptions

Grid Coverages

GP_InvalidSampleDimension

3.3.2.4 Infrequency Enhancement
Perform a infrequency enhancement on a grid coverage sample dimension. New grid values are produced
where the infrequently occurring values in the input image are mapped to 255 while the frequently occurring values are
mapped to 0.
GP_Operation
Name

Description

Vendor“InfrequencyEnhancement”

VendorSpecific

VendorSpecificDoc
URL
VendorSpecific

Version
VendorSpecific

Number
Source1

NumberParameters
2

GC_ParameterInfo
Description

GC_ParameterType“Source”“SampleDimension”

Vendor SpecificVendor Specific

GC_GridCoverageType
GC_IntegerType

Default
Value
NA
0

Minimum
Value
NA
0

Maximum
Value
NA
Dependent on
Grid coverage
processed

IR

ED

Name

Source grid coverage apply enhancement.

SampleDimension

Sample dimension on which the operation will be applied. The dimension type of the source
sample dimension will be changed to CV_8BIT_U.

Exceptions
3.3.3 Interpolate

R
ET

SourceGP_InvalidSampleDimension

This operation specifies the interpolation type to be used to interpolate values for points which fall between
grid cells. The default value is nearest neighbor. The new interpolation type operates on all sample dimensions.
GP_Operation
Name

Description

VendorDoc URL

Version“Interpolate”

VendorSpecific

VendorSpecific

VendorSpecific

VendorSpecific

Number
Source1

NumberParameters
2

GC_ParameterInfo
Name

Description

GC_ParameterType

Default Value“Source”

VendorSpecific
VendorSpecific

GC_GridCoverageType
GC_StringType“Type”

Page 55 of 71

NA

Minimum
Value
NA

Maximum
Value
NA“NearestNieghbor”

NA

NA

OGC Document Number 01-004

OpenGIS Implementation Specification
SourceGrid Coverages

Source grid coverage.

Possible values for type:
NearestNeighbor”

For a given point p, find the grid cell closest to p and return the values ofthat grid cell

“Bilinear”

For a given point p, suppose p is contained between grid cells C1, C2, C3
and C4 with values W1, W2, W3 and W4. The location of point p can be
defined at a location i, j where 0 <= i <= 1 and 0 <= j <= 1 between thesecells. The value W returned will be determined by: W = (1 – i)(1 – j) W1 +i (1 – j) W2 + (1 – i) j W3 + i j W4
If grid value has an intregal sample dimension type, W will be rounded to
the nearest integer value.
The optimum interpolation technique may be calculated using Wiener
filters and depends on factors that include the spectral power distributionof the scene, the sampling frequency and spectral power distribution of thenoise in the image. (See: Rosenfeld, A. and A. C. Kak, Digital Picture
Processing, Second Ed, Vol 1, Acedemic Press, 1982).

ED“Optimal”

If grid value has an intregal sample dimension type, W will be rounded to
the nearest integer value.
Cubic polynomials may be used to approximate optimal interpolation
filters. (See: Rosenfeld, A. and A. C. Kak, Digital Picture Processing,
Second Ed, Vol 1, Acedemic Press, 1982).

IR“Bicubic”

Exceptions

RET

If grid value has an integral sample dimension type, W will be rounded to the nearest integer value
GP_InvalidInterpolationType

3.3.4 Band Ratioing

Perform a band ratio operation. This operation will calculate (value of sample dimension 1)/(value of sample
dimension 2). The resulting new value will be zero if: 1) the value of sample dimension 2 is zero or 2) either sample
dimension 1 or sample dimension 2 have the “no data value”. This operation will modify sample dimension 1 (sample
dimension 1 will contain the output values). The sample dimension type of the modified sample dimension will be
CV_32BIT_REAL.
GP_Operation
Name

Description

VendorDoc URL

Version“BandRatio”

VendorSpecific

VendorSpecific

VendorSpecific

VendorSpecific

Number
Source1

NumberParameter
3

Default
Value
NA
0

Minimum
Value
NA
0

GC_ParameterInfo
Name

Description

GC_ParameterType“Source”“SampleDimension1”

Vendor SpecificVendor Specific

GC_GridCoverageType
GC_IntegerType

Page 56 of 71

Maximum
Value
NA
Dependent on
id

OGC Document Number 01-004

OpenGIS Implementation Specification“SampleDimension2”

Grid Coverages

Vendor Specific

GC_IntegerType

1

0

Grid coverage
processed
Dependent on
Grid coverage
processed

SourceSource grid coverage.

SampleDimension1

Source sample dimension 1 to perform band ratio. This sample dimension will contain themodified grid data values.

SampleDimension2

Source sample dimension 2 to perform band ratio.

Exceptions

GP_InvalidSampleDimension

3.3.5 Spatial Filtering

IR

ED

Filtering is an enhancement operation that alters the grid values on the basis of the neighborhood grid values.
For this reason, filtering is considered to be a spatial or area opeartion. There are many different filters that can beapplied to a grid coverage but the general concept of filtering is the same. A filter window or kernel is defined, its
dimension being an odd number in the x and y dimensions. Each cell in this window contains a co-efficient or weighting
factor representative of some mathmetical relationship. A filtered grid coverage is generated by multipling each coefficient in the window by the grid value in the original grid coverage corresponding to the window’s current location
and assigning the result to the central pixel location of the window in the filtered grid coverage. The window is moved
thoughout the grid coverage on pixel at a time. This window multiplication process is known as convolution.

RET

A grid coverage contains both low and high spatial information. High frequencies describe rapid change fromone grid cell to another such as roads or other boundary conditions. Low frequencies describe gradual change over alarge number of cells such as water bodies. High pass filters allow only high frequency information to be generated in
the new grid coverage Grid coverages generated with high pass filters will show edge conditions. Low pass filters allow
low frequency information to be generated in the new grid coverage. Examples of both low and high pass filters are
given below.
The grid coverage produced from a filtering operation will have the same dimension as the source gridcoverage. To produce filtered values around the edges of the source grid coverage, edge rows and columns will be
duplicated to fill a complete kernel.
3.3.5.1 Mean Filter
Perform a mean filter operation on a grid coverage. The new grid value will be the average of all the gridvalues in kernel. This filter results in a smoothing of the data thus elminating noise.
New grid value = sum (V (i, j)) / (Xsize + YSize)
Where i
j
Xsize
Ysize
V (i, j)x position in the kernel
y position in the kernel
X size of the kernel
Y Size of the kernel
value at position i, j

GP_Operation

Page 57 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

Name

Description

VendorDoc URL

Version“MeanFilter”

VendorSpecific

VendorSpecific

VendorSpecific

VendorSpecific

Number
Source1

NumberParameters
4

Minimum
Value
NA

Maximum
Value
NA
Dependent on
Grid coverage
processed
VendorSpecific
VendorSpecific

GC_ParameterInfo
Name

Description

GC_ParameterType“Source”

VendorSpecific
VendorSpecific

GC_GridCoverageType

Default
Value
NA

GC_IntegerType00

VendorSpecific
VendorSpecific

GC_IntegerType

3

1

GC_IntegerType

3

1“SampleDimension”“Xsize”“Ysize”

Source grid coverage.

SampleDimension

Sample dimension on which the operation will be applied. The dimension type of the source
sample dimension will not be changed

XSize

Number of rows for the filter kernel.

YSize

Number of columns for the filter kernel.

Exceptions

GP_InvalidSampleDimension
FilterSizeMustBeOdd

R
ET

IR

ED

Source3.3.5.2 Mode Filter

Perform a mode filter operation on a grid coverage. The new grid value is given the most frequently occurring
value in the kernel. This filter is primarily used to cleanup thematic grid data since this filter repalces small island cellsby their large surrounding grid data values.
GP_Operation
Name

Description

VendorDoc URL

Version“ModeFilter”

VendorSpecific

VendorSpecific

VendorSpecific

VendorSpecific

Number
Source1

NumberParameter
4

Minimum
Value
NA

Maximum
Value
NA

0

Dependent on
Grid coverage
processed

GC_ParameterInfo
Name

Description

GC_ParameterType“Source”

VendorSpecific
VendorSpecific

GC_GridCoverageType

Default
Value
NA

GC_IntegerType0“SampleDimension”

Page 58 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification“Xsize”

VendorSpecific
VendorSpecific“Ysize”

Grid Coverages

GC_IntegerType3

1

Vendor Specific

GC_IntegerType3

1

Vendor SpecificSourceSource grid coverage.

SampleDimension

Sample dimension on which the operation will be applied. The dimension type of the source
sample dimension will not be changed

XSize

Number of rows for the filter kernel.

YSize

Number of columns for the filter kernel.

Exceptions

GP_InvalidSampleDimension
GP_FilterSizeMustBeOdd

ED

3.3.5.3 Median Filter
Perform a median filter operation on a grid coverage. The new grid value will be the median of all the gridvalues in the kernel. This filter results in a smoothing of the grid values.
GP_Operation
Description

Vendor“MedianFilter”

VendorSpecific

VendorSpecific

Doc URL

Version

VendorSpecific

VendorSpecific

R
ET

IR

Name

Number
Source1

NumberParameter
4

Minimum
Value
NA

Maximum
Value
NA
Dependent on
Grid coverage
processed
VendorSpecific
VendorSpecific

GC_ParameterInfo
Name“Source”“SampleDimension”“Xsize”“Ysize”

Description

GC_ParameterType

VendorSpecific
VendorSpecific

GC_GridCoverageType

Default
Value
NA

GC_IntegerType00

VendorSpecific
VendorSpecific

GC_IntegerType

3

1

GC_IntegerType

3

1

SourceSource grid coverage.

SampleDimension

Sample dimension on which the operation will be applied. The dimension type of the source
sample dimension will not be changed

XSize

Number of rows for the filter kernel.

YSize

Number of columns for the filter kernel.

Exceptions

GP_InvalidSampleDimension
GP_FilterSizeMustBeOdd

Page 59 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

3.3.5.4 Gausian Filter
Perform a gausian filter operation on a grid coverage. This filter is a low pass filter to blur the grid coverage.
This filter uses the following Gausian function to compute the filter weights:
G (i, j) = exp(-(( i – u) **2 + (j – v) ** 2) / (2 * SIGMSQ) )Where i, ju, v
SIGMSG

the cell within the kermel
the center of the kernel
set to 4

The filter weights W (i, j) are normalized values of G (i, j) over the entire kernel, hence the sum of all weights
is 1.

GP_OperationED

The filtered grid values is the sum of W (i, j) * V (i ,j) over all the grid values in the kernel, where V (I, j) is
the original grid value at location (i, j).

Description

VendorDoc URL

Version“GausianFilter”

VendorSpecific

VendorSpecific

VendorSpecific

VendorSpecific

GC_ParameterInfo“Source”

Description“SampleDimension”“Xsize”“Ysize”

GC_ParameterType

Number
Source1

NumberParameter
4

Minimum
Value
NA

Maximum
Value
NA
Dependent on
Grid coverage
processed
VendorSpecific
VendorSpecific

VendorSpecific
VendorSpecific

GC_GridCoverageType

Default
Value
NA

GC_IntegerType00

VendorSpecific
VendorSpecific

GC_IntegerType

3

1

GC_IntegerType

3

1

R
ET

Name

IR

Name

SourceSource grid coverage.

SampleDimension

Sample dimension on which the operation will be applied. The dimension type of the source
sample dimension will not be changed

XSize

Number of rows for the filter kernel.

YSize

Number of columns for the filter kernel.

Exceptions

GP_InvalidSampleDimension
GP_FilterSizeMustBeOdd

Page 60 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

3.3.5.5 LaplacianType 1 Filter
Perform a laplacian filter operation on a grid coverage. This is a high pass filter which highlights the edges
having positive and negative brightness slopes. This filter mulitples the co-efficients in figure 3.4.12 with thecorresponding grid data value in the kernel window.
0

-1

0

-1

4

-1

0

-1

0

Figure 3.4.12

Kernel co-efficients for Laplacian Type 2 Filter

The new grid value will be calculated as the sum of (grid value * co-efficient) for each kernel cell divied by 9.
GP_Operation
Descript
ion
VendorSpecific“LaplacianType1Filter”

VendorDoc URL

VendorSpecific

VendorSpecific

Version

GC_ParameterInfo

VendorSpecific

Description

GC_ParameterType“Source”

VendorSpecific
VendorSpecific

GC_GridCoverageType

Default
Value
NA

GC_IntegerType

0

R
ET

SourceIR

Name“SampleDimension”

Number
Source1

NumberParameters
2

Minimum
Value
NA

Maximum
Value
NA

0

Dependent on
Grid coverage
processed

ED

Name

Source grid coverage.

SampleDimension

Sample dimension on which the operation will be applied. The dimension type of the source
sample dimension will not be changed

Exceptions

GP_InvalidSampleDimension

3.3.5.6 Laplacian Type 2 Filter
Perform a laplacian filter operation on a grid coverage. This is a high pass filter which highlights the edges
having positive and negative brightness slopes. This filter mulitples the co-efficients in figure 3.4.13 with thecorresponding grid data value in the kernel window.

Figure 3.4.13

Page 61 of 71

-1

-1

-1

-1

8

-1

-1

-1

-1

Kernel co-efficents for Laplacian Type 2 Filter

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

The new grid value will be calculated as the sum of (grid value * co-efficient) for each kernel cell divied by 9.
GP_Operation
Name

Description

Vendor“LaplacianType2Filter”

VendorSpecific

VendorSpecificDoc
URL
VendorSpecific

Version
VendorSpecific

Number
Source1

NumberParameters
2

Minimum
Value
NA

Maximum
Value
NA

0

Dependent on
Grid coverage
processed

GC_ParameterInfo
Name

Description

GC_ParameterType“Source”

VendorSpecific
VendorSpecific

GC_GridCoverageType

Default
Value
NA

GC_IntegerType0“SampleDimension”

Source grid coverage.

SampleDimension

Sample dimension on which the operation will be applied. The dimension type of the source
sample dimension will not be changed

Exceptions

GP_InvalidSampleDimension

IR

ED

Source3.3.6 Select Sample Dimensions

R
ET

This operation returns an GC_GridCoverage which uses a subset of the sample dimensions from an existing
GC_GridCoverage. For example, if sample dimensions 5, 9 and 10, then the new GC_GridCoverage will contain threesample dimensions numbered 0, 1 and 2.
This operation can also be used to “clone” sample dimensions, by repeating sample dimension index values.
This could be useful if an application intends to overlay an adapted sample dimension with its original unadapted
version.
GP_Operation
Name

Description

Vendor“SelectSampleDimension”

VendorSpecific

VendorSpecificDoc
URL
VendorSpecific

Version
VendorSpecific

Number
Source1

NumberParameters
2

GC_ParameterInfo
Name

Description

GC_ParameterType“Source”

VendorSpecific
VendorSpecific“SampleDimensions”
SourcePage 62 of 71

GC_GridCoverageType

Default
Value
NA

Minimum
Value
NA

Maximum
Value
NA

GC_VectorType

NA

NA

NA

Source grid coverage.

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

SampleDimensions

Sample dimensions on which the operation will be applied. The dimension type of thesource sample dimensions will not be changed

Exceptions

GP_InvalidSampleDimension

3.3.7 Resample

Resample a grid coverage using a different grid geometry. This interface provides the following functionality:
Resampling
The grid coverage can be resampled at a different cell resolution. Some implementations may be able to do
resampling efficiently at any resolution. This can be determined from the GP_GridCoverageProcessor metadata
HasArbitraryResolutions keyword. Also a non-rectilinear grid coverage can be accessed as rectilinear grid coveragewith this interface.
ReprojectingED

The new grid geometry can have a different coordinate sstem than the underlying grid geometry. For example,
a grid coverage can be reprojected from a geodetic coordinate system to Universal Transverse Mercator coordinate
system.
SubsettingIR

A subset of a grid can be viewed as a separate coverage by using this operation with a grid geometry which as
the same geoferencing and a region. Grid range in the grid geometry defines the region to subset in the grid coverage.
GP_Operation“Resample”

Description

VendorDoc URL

Version

VendorSpecific

VendorSpecific

VendorSpecific

VendorSpecific

R
ET

Name

Number
Source1

NumberParameters
3

GC_ParameterInfo
Name“Source”“InterpolationType”“CoordinateSystem”“GridGeometry”

Description

GC_ParameterType

Default ValueNA

Minimum ValueNA

Maximum
Value
NA

VendorSpecific
VendorSpecific
VendorSpecific
VendorSpecific

GC_GridCoverageType
GC_StringType“NearestNieghbor”

NA

NA

CS_CoordinateSystemType*Same as the source
grid coverage
NA

NA

NA

NA

NA

GC_GridGeometryType

SourceSource grid coverage.

SampleDimension

Sample dimension on which the operation will be applied. The dimension type of the source
sample dimension will not be changed

InterpolationType

Interpolation type to use when a grid is being resampled to a lower resolution and theresampled resolution is a multiple of the grid resolution.

Page 63 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

Recognized interpolation types are:“NearestNieghbor”“BlockAverage”“BlockMode”

Use the value of the nearest cell.
The resampled cell value is the average all the cells.
The resampled cell value is the value of the cell which
occurs most frequent.

Other interpolation types are implementation specific.
CoordinateSystem

Coordinate system to which the grid coverage is reprojected. If the operation only does asubsetting of the grid coverage this parameter is omitted.

GridGeometry

Grid geometry to resample grid coverage.

Exceptions

GP_CannotReproject
GP_InvalidInterpolationType

ED

3.3.8 Sequence

Returns an GC_GridCoverage which uses a different traversal order for the grid values.
GP_Operation
Description

VendorDoc URL

Version“Sequence”

VendorSpecific

VendorSpecific

VendorSpecific

VendorSpecific

Name“Source”“BandPacking”

R
ET

GC_ParameterInfo

IR

Name

“ValueInBytePacking”“ByteInValuePacking”

Description

GC_ParameterType

VendorSpecific
VendorSpecific
VendorSpecific
VendorSpecific

GC_GridCoverageType
GC_IntegerType
GC_ValueInBytePackingType
GC_ByteInValuePackingType

Number
Source1

Default
Value
NA

Minimum
Value
NA

Maximum
Value
NA*Same assource*Same assource*Same assource

NA

NA

NA

NA

SourceSource grid coverage.

BandPacking

Order in which to traverse the values in the grid.

ValueInBytePacking

Order of the bits within the byte for value using less than 8 bits.

ByteInValuePacking

Order of the bytes in a grid value for values with sample dimensions greater than 8 bits.

Exceptions

None

Page 64 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

3.3.9 Density Slice

Performs a density slice operation on a grid coverage. If the number of breakpoints specified is n, then the gridcoverage source sample dimension will be classified into n + 2 values. The color table must have the same number ofcolor entries as the number of new values. The ranges of the new categories may be retrieved from the category namesin the CV_SampleDimension interface.
For example, a density slice on an 8-bit sample dimension using breakpoints: 50, 100, 150 will give thefollowing categories:
Range
No data<= 50
50 – 100
100 – 150
150 <Category
0
1
2
3
4

GP_Operation
Description

VendorDoc URL

Version“DensitySlice”

VendorSpecific

VendorSpecific

VendorSpecific

VendorSpecific

IR

GC_ParameterInfo
Description“Source”“SampleDimension”“Grid Coverage”
Vendor Specific“BreakPoints””ColorPalette”“Break points”“Color Palette”

Source

GC_ParameterType

Number
Source4

GC_GridCoverageType
GC_IntegerType

Default
Value
NA
NA

Minimum
Value
NA
0

GC_VectorType
GC_VectorType

NA
NA

NA
NA

R
ET

Name

Number
Source1ED

Name

Maximum Value
NA
Dependent on
Grid coverage
processed
NA
NA

Source grid coverage.

SampleDimension

Sample dimension on which the operation will be applied. The dimension type of the source
sample dimension will be changed to CV_8BIT_U

BreakPoints

Break points to classify the grid values.

ColorPaletteColor palette associated with the classified grid.

Exceptions

GP_InvalidSampleDimension
GP_ColorPaletteMismatch

4
1.
2.
3.
4.
5.

REFERENCESThe Open GIS Specification Model Topic 6: The Coverage Type and Its Subtypes Version 3.2
OpenGIS Simple Features Specification For OLE/COM Revision 1.0
OpenGIS Simple Features Specification For CORBA Revision 1.0
OpenGIS Simple Features Specification For SQL Revision 1.0
OpenGIS Document 99-115 Topic 16 : Image Coordinate Transformation Services

Page 65 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification
6.
7.

Grid Coverages

OpenGIS Document 99-116 : Topic 15: Image Exploitation Services
GeoTIFF Revision 1.0 specification

APPENDICES
A.1

GLOSSARY OF TERMS

Sample dimension relates to particular values occurring at a spatial position. For a point
coverage with three values at every point, has three sample dimensions and which are often
referred to as “fields”. Sample dimensions are referred to as “bands” for a grid coverage.

Overview

A pre-calculated lower resolution representation of a grid coverage. A grid coverage can havea number of overviews. For example, a grid coverage with 1 metre pixel resolution may haveoverviews for 3, 9, and 27 metre resolutions. Overview resolution need not be a multiple
resolution of the full data set. An overview is typically used to enhance display performancefor large grid coverages.

A.2

SUPPORTING WELL-KNOWN VALUESED

Sample dimension

The following are Well-known values specific to this submission.

IR

For CV_PaletteInterpretation.Gray, the values are:R
ET

C1: Gray [0..255], with Black=0 and White=255.
C2: Unused [0]C3: Unused [0]C4: Unused [0]For CV_PaletteInterpretation RGB, the values are:
C1: Red [0..255]
C2: Green [0..255]
C3: Blue [0..255]
C4: Alpha[0..255] (0 if Alpha not present

For CV_PaletteInterpretation CMYK, the values are:
C1: Cyan [0..255]
C2: Magenta [0..255]
C3: Yellow [0..255]
C4: Black[0..255]
For CV_PaletteInterpretation HSL, the values are:
C1: Hue [0..360]
C2: Saturation [0..100]
C3: Lightness [0..100]
C4: Unused[0]Page 66 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification
A.3

Grid Coverages

EXCEPTIONS, ERRORS AND ERROR CODESFor the COM interfaces, exceptions will be returned using the HRESULTS of the interfaces. All interfaces
will return a non-negative value (e.g. S_OK) on success or a negative value (e.g. E_FAIL) on failure
CORBA error codes will be reported as exceptions.
Any error codes not listed below will indicate a provider specific error has occurred.
Specific Exceptions

GC_InvalidIndex
GC_InvalidRange
GC_GridNotEditable
GC_MetadataNameNotFound
GC_CannotCreateGridCoverage
GC_FileFormatNotCompatiableWithGridCoverage
GC_ErrorExportingGridCoverage
GC_InvalidParameterName
GC_InvalidParameterValue

Description:
A.4

R
ET

IR

GP_InvalidSampleDimension
GP_GridCoverageHasOnlyOneSampleDimension
GP_MetadataNameNotFound
GP_InvalidIndex
GP_OperationNotFound
GP_InvalidParameterName
GP_InvalidParameterValue
GP_InvalidThresholdValue
GP_InvalidInterpolationType
GP_FilterSizeMustBeOdd
GP_CannotReproject
GP_ColorPaletteMismatch

ED

CV_InvalidIndex
CV_MetadataNameNotFound
CV_PointOutsideCoverage

Specifies the different exceptions for the implementation specification.

CONVERSION RULES FOR GRID VALUES TO SPECIFIC DATA TYPES

Conversion of Value to Boolean
If value is 0 then Boolean is FALSE else Boolean is TRUE.
Conversion of Value to 2 bit integer
For real values, value is truncated to integer (rounded down).
If value is less than 0, the value is zero.
If value is greater than 3, the character value is 3.
Conversion of Value to 4 bit integer
For real values, value is truncated to integer (rounded down).

Page 67 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

If value is less than 0, the value is zero.
If value is greater than 15, the character value is 15.
Conversion of Value to Unsigned Character (0 to 255)
For real values, value is truncated to integer (rounded down).
If value is less than 0, the unsigned character value is zero.
If value is greater than 255, the character value is 255
Conversion of Value to Signed Character (-128 to 127)
For real values, value is truncated to integer (rounded down).
If value is less than -128, the signed character value is -128.
If value is greater than 127, the signed character value is 127.
Conversion of Value to Unsigned Short (0 to 65535)

ED

For real values, value is truncated to integer (rounded down).
If value is less 0, unsigned short is 0.
If value is greater than 65535, unsigned short is 65535.
Conversion of Value to Signed Short (-32768 to 32767)

IR

For real values, value is truncated to integer (rounded down).
If value is less –32768, signed short is -32768.
If value is greater than 32767, signed short is 32767
Conversion of Value to Unsigned Integer (0 to 0xffffffff)

RET

For real values, value is truncated to integer (rounded down).
If value is less 0, unsigned integer is 0.
If value is greater than 0xffffffff, unsigned integer is 0xffffffff.

Conversion of Value to Signed Integer (-2147483648 to 2147483647)
For real values, value is truncated to integer (rounded down).
If value is less -2147483648, signed integer is -2147483648.
If value is greater than 2147483647, signed integer is 2147483647.
Conversion of Value to Float
No conversion rules necessary
Conversion of Value to Double
No conversion rules necessary
A.5

COM IDL SPECIFICATION

The detailed interface specification is defined using Microsoft’s Interface Definition Language (MIDL).
This specification is consists of three MIDL files: OGC_CV.IDL (Coverage package), OGC_GC.IDL (Grid
Coverage package) and OGC_GP.IDL (Grid Coverage Processing package).

Page 68 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

The MIDL files require three Coordinate Transformation MIDL files (OGC_PT.IDL, OGC_CS.IDL and
OGC_CT.IDL).
A.6

CORBA IDL SPECIFICATION

The detailed interface specification is defined using CORBA Interface Definition Language (IDL).
This specification is consists of three IDL files: OGC_CV.IDL (Coverage package), OGC_GC.IDL (Grid
Coverage package) and OGC_GP.IDL (Grid Coverage Processing package).
The IDL files require three Coordinate Transformation IDL files (OGC_PT.IDL, OGC_CS.IDL and
OGC_CT.IDL).
A.7

SPECIFICATION SEQUENCE DIAGRAMS

A.7.1

SIMPLE GRID COVERAGE CREATION EXAMPLE

R
ET

IR

ED

Figure 26 illustrates the creation a grid coverage from a grid coverage exchange interface and how to performa simple grid processing operation (“Theshold”). Grid values are retrieved from the new grid. The grid coverage
processor will fetch grid values from the source grid coverage (grid) as required.

ClientgridExch : GC_GridCoverageExchange

createFromName(CharacterString)

grid : GC_GridCoverage

gridpro :GC_GridCoverage
Processor

newgrid : GC_Grid
Coverage"new"

Create a grid coverage(called grid) from a file

Create a processing
operation ie do
Operation("threshold",parameter) whereparameter contains
Source = "grid"
SampleDimension = "0"Threshold = "100"Retrieve threshold
grid values fromnewgrid

doOperation(CharacterString, Sequence<GC_Parameter>)"new"

getDataBlockAsByte(GC_GridRange)

getDataBlockAsByte(GC_GridRange)

newgrid pulls
grid values
from grid asneededFigure 26: Simple grid coverage creation

Page 69 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification
A.7.2

Grid Coverages

GRID COVERAGE PROCESSING USING THE DISCOVERY MECHANISM

Figure 27 illustrates the creation a grid coverage from a grid coverage exchange interface and invoking aprocessing operation after discovering the available operations. Grid values are retrieved from the modified gridcoverage (newgrid) and the grid coverage processor fetches grid values from the source grid coverage as required.

ClientgridExch : GC_GridCoverageExchange

gridpro : GP_GridCoverage
Processor

newgrid : GC_Grid
CoveragecreateFromName(CharacterString)

Create a gridcoversge cslled
grid from s file

getOperation(Integer)

User selects anoperation

User is prompted
to fill in operation
specificparametersdescribed in GC_
ParameterInfo

Parse parameter info

doOperation(CharacterString, Sequence<GC_Parameter>)R
ET

Create a processing
operation ie do
Operation("threshold",parameter) whereparameter contsins
Source = "grid"
SampleDimension = "0"Threshold = "100"IR

Display operation list

ED

"new"

Retrieve a list of
supported
operations

Retrieve threshold
grid values fromnewgrid

grid : GC_GridCoverage"new"getDataBlockAsByte(GC_GridRange)

newgrid pulls
grid values
from grid asneededFigure 27: Grid coverage processing using the discovery mechanism

A.8

VISUAL BASIC SAMPLE CODE

A.8.1

READING GRID DATA VALUES

The following pseudo code illustrates creation of a grid coverage (Grid) from a grid coverage exchange(GridExchange) and retrieving grid values. The grid coverage is created from a GeoTIFF file: “test.tif”. The grid values
are retrieved as bytes for the full image since the geometry of the grid coverage is used as input to DataBlockAsByte.
Public GridExchange As GC_GridCoverageExchange
Dim Grid As GC_GridCoverage
Dim GridGeometry As GC_GridGeometry

Page 70 of 71

OGC Document Number 01-004

OpenGIS Implementation Specification

Grid Coverages

Dim Buf() As Byte
Rem create an instance of a grid coverage exchange
Set GridExchange = New PCI_GC_GridCoverageExchange
Rem create the grid coverage from a GeoTIFF file
Set Grid = GridExchange.CreateFromName(“test.tif”)
Rem fetch the grid geometry for the GeoTIFF grid coverage
GridGeometry = Grid.GridGeometry

R
ET

IR

ED

Rem fetch the grid values for the full grid coverage
Buf = Grid.DataBlockAsByte(GridGeometry.GridRange)

Page 71 of 71

OGC Document Number 01-004