Open Geospatial Consortium |
Submission Date: 2016-03-08 |
Approval Date: 2018-01-16 |
Publication Date: 2018-11-27 |
External identifier of this OGC® document: http://www.opengis.net/doc/IS/CIS-GRIB2/1.0 |
Internal reference number of this OGC® document: 16-060r2 |
Version: 1.0 |
Category: OGC® Implementation Standard |
Editor: Daniel Lee |
OGC GML Application Schema – Coverages: GRIB2 Coverage Encoding Profile |
Copyright notice |
Copyright © 2018 Open Geospatial Consortium |
To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ |
Warning |
This document is an OGC Member approved international standard. This document is available on a royalty free, non-discriminatory basis. Recipients of this document are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.
Document type: OGC® Standard |
Document subtype: Profile |
Document stage: Approved for public release |
Document language: English |
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 PATENTS THAT 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 PARTICULAR PURPOSE, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE DO NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE INTELLECTUAL PROPERTY WILL MEET 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 OF INTELLECTUAL PROPERTY RIGHTS TO THE INTELLECTUAL PROPERTY BE LIABLE FOR ANY CLAIM, OR ANY DIRECT, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM 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 as provided 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 or cause 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 this Agreement 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.
i. Abstract
This OGC standard is a profile of the OGC GML Application Schema - Coverages version 1.0 [OC 09-146r2]. That document was renamed "OGC Coverage Implementation Schema (CIS)" for clarification in version 1.1. This standard specifies the usage of the GRIB2 data format for the encoding of OGC coverages. The GRIB2 specification is maintained by the World Meteorological Organization (WMO) and is the standard encoding for the exchange and storage of general regularly distributed information expressed in binary form.
ii. Keywords
The following are keywords to be used by search engines and document catalogues.
ogcdoc, OGC document, ogcdoc, wcs, grib, wmo
iii. Preface
Coverages represent digital geospatial information representing space/time-varying phenomena. OGC Abstract Topic 6 [OGC 07-011] - which is identical to ISO 19123 - defines an abstract model of coverages. Due to the generality of the ISO 19123 model, implementations of the model are not always interoperable. The OGC CIS establishes a concise, interoperable coverage model based on ISO 19123. Coverage instances represented according to the CIS version 1.1 [OGC 09-146r3] may be encoded in GML (based on the Geography Markup Language (GML) version 3.2 [OGC 07-036]) or other suitable ASCII or binary formats.
This CIS profile specifies the usage of the GRIB2 data format for the encoding of OGC coverages. The profile is based on the authoritative format specification available in the WMO Manual on Codes.
Attention is drawn to the possibility that some of the elements of this document may be the subject of patent rights. The Open Geospatial Consortium shall not be held responsible for identifying any or all such patent rights.
Recipients of this document are requested to submit, with their comments, notification of any relevant patent claims or other intellectual property rights of which they may be aware that might be infringed by any implementation of the standard set forth in this document, and to provide supporting documentation.
iv. Submitting organizations
The following organizations submitted this Document to the Open Geospatial Consortium (OGC):
Organization name(s)
Deutscher Wetterdienst
Météo-France
rasdaman GmbH
UK Met Office
v. Submitters
All questions regarding this submission should be directed to the editor or the submitters:
Name |
Affiliation |
Daniel Lee |
Deutscher Wetterdienst |
Marie-Francoise Voidrot |
Météo-France |
Peter Baumann |
rasdaman GmbH |
Chris Little |
UK Met Office |
1. Scope
This OGC GML Application Schema – Coverages - GRIB2 Coverage Encoding Profile - henceforth abbreviated as "CIS for GRIB2" - specifies an encoding of coverages in the GRIB2 data exchange format.
The GRIB edition 2 (GRIB2) format specification [GRIB2] is designed for the exchange and storage of general regularly distributed information in binary form. GRIB2 is primarily used to represent the outputs of numerical weather prediction models, but is in no way restricted to this domain. GRIB2 was preceded by GRIB edition 0 and GRIB edition 1. The differences between both of these formats, however, are of such structural magnitude that they can be seen as different formats. For this reason, GRIB editions 0 and 1 are outside the scope of this CIS for GRIB2 standard.
A GRIB2 file is composed of one or more GRIB2 messages, which are composed of several sections providing metadata and one or more 2D arrays of values. The values can be mapped from image space to corresponding points in model space. The 2d array of values can have a rectangular spatial shape. However other, non-regular coordinate systems can be used. Additionally, grid points are not necessarily representative of rectangular areas. Some coordinate systems used in GRIB2 represent their data using triangular grid cells (cf. GRIB2 format specification [GRIB2]).
In the near future it is to be expected that a new GRIB edition (GRIB edition 3) is approved by WMO. When the standard has been finalized and agreed upon, an appropriate encoding profile will be created which allows exchange of data encoded in GRIB3 as Coverages.
The only coverage types supported by this standard are cis:GridCoverage
, cis:RectifiedGridCoverage
, cis:ReferenceableGridCoverage
, and any coverage type derived from these two types.
Following the notation of the abstract coverage definition as specified in the CIS [OGC 09-146r2], the rangeType
is limited according to the GRIB2 specification.
2. Conformance
This standard defines the following requirements and conformance class:
-
grib2-coverage, of URI http://www.opengis.net/spec/CIS_grib2-coverages/1.0/req/grib2-coverage, with a single pertaining conformance class, grib2-coverage, of URI http://www.opengis.net/spec/CIS_grib2-coverages/1.0/conf/grib2-coverage.
Standardization targets are coverage instance documents encoded in GRIB2.
Conformance with this standard shall be checked using all the relevant tests specified in Annex A (normative) of this document. The framework, concepts, and methodology for testing, and the criteria to be achieved to claim conformance are specified in the OGC Compliance Testing Policies and Procedures and the OGC Compliance Testing web site [1].
All requirements-classes and conformance-classes described in this document are owned by the standard(s) identified.
3. References
The following normative documents contain provisions that, through reference in this text, constitute provisions of this document. For dated references, subsequent amendments to, or revisions of, any of these publications do not apply. For undated references, the latest edition of the normative document referred to applies.
-
WMO: WMO 306, Manual on Codes, International Codes, Volume I.2, Part B - Binary Codes, FM 92-XIV GRIB edition 2, 2017 (http://www.wmo.int/pages/prog/www/WMOCodes/WMO306_vI2/VolumeI.2.html)
-
OGC: OGC 07-036, OpenGIS Geography Markup Language (GML) Encoding Standard, version 3.2, 2007 (http://portal.opengeospatial.org/files/?artifact_id=20509)
-
OGC: OGC 09-146r2, OGC GML Application Schema - Coverages, version 1.0, 2012 (https://portal.opengeospatial.org/files/?artifact_id=48553)
Note
|
Conformance classes used:
|
4. Terms and Definitions
This document uses the terms defined in Sub-clause 5.3 of [OGC 06-121r8], which is based on the ISO/IEC Directives, Part 2, Rules for the structure and drafting of International Standards. In particular, the word “shall” (not “must”) is the verb form used to indicate a requirement to be strictly followed to conform to this standard.
For the purposes of this document, the following additional terms and definitions apply.
5. Conventions
5.1. Identifiers
The normative provisions in this specification are denoted by the URI
All requirements and conformance tests that appear in this document are denoted by partial URIs which are relative to this base.
5.2. Namespace prefix conventions
The following namespaces are used in this document. The prefix abbreviations used constitute conventions used here, but are not normative. However, the namespaces to which the prefixes refer are normative.
Prefix |
Namespace URI |
Description |
xsd |
XML Schema namespace |
|
gml |
GML 3.2.1 |
|
cis |
GML Application Schema - Coverages 1.0 |
|
grib2 |
CIS-GRIB2 Encoding Profile 1.0 |
|
wcs |
WCS 2.0 |
6. GRIB2 coverage representation requirements class
Requirements class grib2-coverage establishes how coverages are represented in the GRIB2 encoding format. The requirements class further specifies how coverages can be requested, such as from a WCS instance by defining the parameter for GRIB2 features compression
. The identifying URL of grib2-coverage is given by http://www.opengis.net/spec/wcs/grib2/1.0/req/grib2-coverage.
6.1. General
The GRIB2 format allows not only the use of controlled vocabulary which are published by the WMO, but also variables defined only locally. The following admonition from the WMO’s Manual on Codes should be reiterated at this juncture:
“… the use of Local tables in messages intended for non-local or international exchange is strongly discouraged.”
In this sense, it is possible to encode GRIB2 messages using locally defined variables, but the likelihood that users will be able to interpret these messages is much lower than when the tables published by the WMO are used. If locally defined variables are used to exchange data, however, the tables required for reading the data should be supplied to users in an appropriate fashion.
Requirement 1 |
http://www.opengis.net/spec/wcs/grib2/1.0/req/grib2-coverage/grib2-specification A GRIB2 encoded coverage shall follow the GRIB2 specification [GRIB2]. |
Requirement 2 |
/req/grib2-coverage/type A GRIB2 encoded coverage shall be a concrete subclass of type |
6.2. Domain
Requirement 3 |
/req/grib2-coverage/crs If the coverage instance under test is encoded in a multipart message and its first part consists of a GML document which is a concrete subclass of |
Note: The value of the srsName
attribute of the Envelope element shall be inherited by all directly expressed geometries (see GML 3.2 [OGC 07-036] clause 9.10), i.e. for all range set values encoded in GRIB2.
Requirement 4 |
/req/grib2-coverage/pixel-is-area The domain of a GRIB2 encoded coverage shall respect the coverage’s raster space as defined in the GRIB2 specification [GRIB2], i.e. the grid point position described in code table 3.8 [2] of the GRIB2’s grid definition section. |
Note: The definition of grids in GML 3.2 [OGC 07-036] clause 19.2.2 which CIS is based on reads: "When a grid point is used to represent a sample space (e.g. image pixel), the grid point represents the center of the sample space (see ISO 19123:2005, 8.2.2).”
Note: This requirement specifies that the gml:domainSet
element shall respect the raster type i.e. it shall include the half pixel border in case of PixelIsArea
(see also Figure 1) but not in case of PixelIsPoint
. In other words, in case of PixelIsArea
the gml:domainSet
element is decreased by the half of both gml:offsetVector
elements in the gml:lowerCorner
coordinate compared to the case of PixelIsPoint
. The gml:origin
element stays the same independently of the raster space.
6.2.1. Examples
The following XML fragments show the domainSet
and the domainSet
elements describing the domain of sample coverages respecting the axis ordering of the used CRS:
-
Default axis order (northing, easting) using
PixelIsArea
:
<gml:boundedBy>
<gml:Envelope srsName="http://www.opengis.net/def/crs/EPSG/0/4326"
srsDimension="2">
<gml:lowerCorner>29.4375 62.4375</gml:lowerCorner>
<gml:upperCorner>70.5625 336.5625</gml:upperCorner>
</gml:Envelope>
</gml:boundedBy>
<gml:domainSet>
<gml:RectifiedGrid dimension="2" gml:id="grid_p">
<gml:limits>
<gml:GridEnvelope>
<gml:low>0 0</gml:low>
<gml:high>657 1377</gml:high>
</gml:GridEnvelope>
</gml:limits>
<gml:origin>
<gml:Point gml:id="grid_origin_p"
srsName="http://www.opengis.net/def/crs/EPSG/0/3857">
<gml:pos>0 0</gml:pos>
</gml:Point>
</gml:origin>
<gml:offsetVector srsName="http://www.opengis.net/def/crs/EPSG/0/3857">
0.0625 0.0625
</gml:offsetVector>
</gml:RectifiedGrid>
</gml:domainSet>
-
Default axis order (northing, easting) using
PixelIsPoint
:
<gml:boundedBy> <gml:Envelope srsName="http://www.opengis.net/def/crs/EPSG/0/4326" srsDimension="2"> <gml:lowerCorner>29.4375 62.4375</gml:lowerCorner> <gml:upperCorner>70.5625 336.5625</gml:upperCorner> </gml:Envelope> </gml:boundedBy> <gml:domainSet> ... (same as above) </gml:domainSet>
The simple figure below provides an explanation of the relation between raster or image space and model space in the case of PixelIsArea
using the values from the examples above.
PixelIsArea
. Coordinates connected to the grid with two lines represent model space, whereas coordinates connected with one line represent raster space. 100 110 490
| 0 | |
| | | |
350 -- +---+---+---+ ... +---+
0 - | * | * | * | ... | * |
340 -- +---+---+---+ ... +---+
| * | * | * | ... | * |
+---+---+---+ ... +---+
...
+---+---+---+ ... +---+ -- 60
| * | * | * | ... | * | - 29
+---+---+---+ ... +---+ -- 50
| |
39
6.3. GRIB2 parameters
6.3.1. Request
The following GRIB2 parameters are defined for requesting GRIB2 encoded coverages, for example via WCS GetCoverage requests.
Note: It is always possible for a given coverage instance to determine its current parameter values, i.e., the parameter values used at creation. Thus, a GRIB2 encoded coverage is self-describing.
Requirement 5 |
/req/grib2-coverage/parameters-xml The structure of an XML request requesting a GRIB encoded coverage instance shall be extended as defined in Table 2 and the respective XML Schema being part of this standard. |
Requirement 6 |
/req/grib2-coverage/parameters-kvp In a GET/KVP GetCoverage request, GRIB2-specific parameters shall adhere to the syntax and semantics defined in Table 2. |
Note: This prefix is used as namespace replacement in order to minimize the risk of reusing already defined KVP parameters.
Names |
Definition |
Data type and values |
Multiplicity and use |
|
Compression type according to GRIB2 code table 5.0 “Data representation template number” |
Integer between 0 and 65535 |
Zero or one (optional) |
6.3.2. Response
Requirement 7 |
/req/grib2-coverage/compression The response to a successful request for a GRIB2 encoded coverage containing a |
Note: A server or service not implementing the requested feature shall respond with an exception.
6.3.3. Exceptions
Requirement 8 |
/req/grib2-coverage/exceptions When a server or service encounters an error described in column "meaning of exception code" in Table 3, the service shall return the corresponding exception report message with the contents of the locator parameter value as specified in the right column of Table 3 (Exception codes for GRIB2 parameters). |
exceptionCode value |
HTTP code |
Meaning of code |
locator value |
|
404 |
Server does not support the requested compression |
Value of compression parameter |
|
404 |
Invalid compression requested |
Value of compression parameter |
7. Media Types for data encodings
Requirement 9 |
/req/grib2-coverage/mime-type-identifier GRIB2 encoding of a coverage shall be indicated by the following MIME type identifier: |
Note: this MIME type is new and will be registered with IANA.
Annex A: Conformance Class Abstract Test Suite (Normative)
The OGC URI identifier of this conformance class is: http://www.opengis.net/spec/CIS_grib2-coverages/1.0/conf/grib2-coverage
A.1. Prerequisites
Make sure that at least one GRIB2 encoded coverage instance is available. Repeat the tests for each GRIB2 encoded coverage instance available.
A.2. Follow GRIB2 specification
Test identifier |
/conf/grib2-coverage/grib2-specification |
---|---|
Requirement |
http://www.opengis.net/spec/wcs/grib2/1.0/req/grib2-coverage/grib2-specification |
Dependency |
http://www.wmo.int/pages/prog/www/WMOCodes/WMO306_vI2/VolumeI.2.html |
Test purpose |
A GRIB2 encoded coverage shall follow the GRIB2 specification [GRIB2]. |
Test method |
Validate the coverage instance under test against the GRIB2 specification. Test passes if coverage instance is valid according to the GRIB2 specification. |
Test type |
A.3. Correct coverage type
Test identifier |
/conf/grib2-coverage/type |
---|---|
Requirement |
/req/grib2-coverage/type |
Dependency |
|
Test purpose |
A GRIB2 encoded coverage shall be of type |
Test method |
If the coverage instance under test is encoded in a multipart message check that its first part consists of a GML document of type |
Test type |
A.4. Correct URI
Test identifier |
/conf/grib2-coverage/uri |
---|---|
Requirement |
|
Dependency |
|
Test purpose |
If the usage of URIs is possible, GRIB2 encoding of a coverage shall be indicated by the following URI: http://www.opengis.net/spec/CIS_grib2-coverages/1.0/req/grib2-coverage |
Test method |
If the coverage instance under test is encoded in a multipart message, check that the |
Test type |
A.5. Correct MIME type
Test identifier |
/conf/grib2-coverage/mime-type-identifier |
---|---|
Requirement |
/req/grib2-coverage/mime-type-identifier |
Dependency |
|
Test purpose |
GRIB2 encoding of a coverage shall be indicated by the following MIME type identifier: |
Test method |
If the coverage instance under test is encoded in a multipart message, check that the |
Test type |
A.6. Correct CRS
Test identifier |
/conf/grib2_coverages/crs |
---|---|
Requirement |
/req/grib2-coverage/crs |
Dependency |
|
Test purpose |
The coordinate reference system identified by the value of the |
Test method |
If the coverage instance under test is encoded in a multipart message, check that the |
Test type |
A.7. Correct raster space
Test identifier |
/conf/grib2-coverages/pixel-is-area |
---|---|
Requirement |
/req/grib2-coverage/pixel-is-area |
Dependency |
|
Test purpose |
The domain of a GRIB2 encoded coverage shall respect the coverage’s raster space as defined in the GRIB2 specification [GRIB2], i.e. the grid point position described in code table 3.8 of the GRIB2’s grid definition section. |
Test method |
If the coverage instance under test is encoded in a multipart message, check that the values used in the |
Test type |
A.8. Parameters XML
Test identifier |
/conf/grib2-coverage/parameters-xml |
---|---|
Requirement |
/req/grib2-coverage/parameters-xml |
Dependency |
|
Test purpose |
The structure of an XML request requesting a GRIB2 encoded coverage instance shall be extended as defined in Table 2 and the respective XML Schema being part of this standard. |
Test method |
Validate the GRIB2 parameters present in the request if an XML request was used to obtain the coverage instance under test. |
Test type |
A.9. Parameters KVP
Test identifier |
/conf/grib2-coverage/parameters-kvp |
---|---|
Requirement |
/req/grib2-coverage/parameters-kvp |
Dependency |
|
Test purpose |
The structure of a KVP request requesting a GRIB2 encoded coverage instance shall be extended as defined in Table 2 where the parameter names shall be prefixed with |
Test method |
Validate the GRIB2 parameters present in the request if a KVP request was used to obtain the coverage instance under test. |
Test type |
A.10. Compression
Test identifier |
/conf/grib2-coverage/compression |
---|---|
Requirement |
/req/grib2-coverage/compression |
Dependency |
|
Test purpose |
The response to a successful request for a GRIB2 encoded coverage containing a |
Test method |
Check the GRIB2 parameters present in the request used to obtain the coverage instance under test for the presence of the |
Test type |
A.11. Exceptions
Test identifier |
/conf/grib2-coverage/exceptions |
---|---|
Requirement |
/req/grib2-coverage/exceptions |
Dependency |
|
Test purpose |
When a server or service encounters an error described in column "meaning of exception code" in Table 3, it shall return the corresponding exception report message with the contents of the locator parameter value as specified in the right column of Table 3. |
Test method |
Validate possible exception responses obtained instead of coverage instances when requesting GRIB2 encoded coverages using unsupported and invalid |
Test type |
Annex B: Revision History
Date | Release | Editor | Primary clauses modified | Description |
---|---|---|---|---|
2015-10-15 |
0.0.1 |
Daniel Lee |
All |
First draft based on discussions in DWG MetOcean |
2015-10-28 |
0.0.2 |
Peter Baumann |
Abstract, Overview, Domain |
Minor corrections |
2015-10-29 |
0.0.3 |
Daniel Lee |
Overview, identification, range |
Draft incorporating suggestions gathered in telephone conference with DWG MetOcean |
2016-01-20 |
0.1.0 |
Daniel Lee |
Submitters, submitting organizations |
Include new authors of document, reformat for submission to SWG |
2016-02-16 |
0.1.1 |
Daniel Lee |
All |
Change references to GMLCOV to proposed CIS |
2016-11-11 |
0.1.2 |
Carl Reed |
Several |
Formal corrections |
2016-12-16 |
1.0.0 |
Daniel Lee |
All |
Implement suggestions from OAB review |