Discrete Global Grid System Attribute Convention for Zarr

September 7, 2026 · View on GitHub

Description

This convention describes a JSON object that encodes the coordinate and grid parameters of a discrete global grid system (DGGS) under the dggs key in the attributes of zarr groups and arrays.

It is inspired by the CF conventions' healpix grid mapping (first included in version 1.13), but deliberately makes different choices in some cases to be more broadly useful in the zarr ecosystem.

Inheritance Model

The dggs convention object follows a simple group-to-array inheritance model that should be understood first:

Inheritance Rules

  1. Group-level definition (recommended): When the dggs convention is defined at the group level, it applies to all arrays that are direct children of that group. It does not apply to groups or arrays deeper in the hierarchy (e.g., grandchildren).
  2. Array-level override: An array can completely override the group's dggs convention with its own definition.
  3. Partial replacement: Partial inheritance (overriding only some fields while inheriting others) is not allowed.

Configuration

The configuration in the Zarr convention metadata can be used in these parts of the Zarr hierarchy:

  • Group
  • Array
TypeDescriptionRequiredReference
dggsobjectThe grid metadata✓ Yesdggs

Field Details

dggs

Object representing the conrete instance of the discrete global grid system.

  • Type: object
  • Required: ✓ Yes

This field MUST describe the concrete instance of the discrete global grid system. See the DGGS Object section below for details.

DGGS Object

TypeDescriptionRequiredReference
namestringThe lower-cased name of the DGGS.✓ Yesname
refinement_levelintegerThe refinement level as an unsigned integer.✓ Yesrefinement_level
ellipsoidobjectThe ellipsoid used as a reference body.✕ Noellipsoid
spatial_dimensionstringName of the spatial dimension✓ Yesspatial_dimension
coordinatestringName of the coordinate✕ Nocoordinate
compressionstringCompression type of the coordinateConditionalcompression

Additional DGGS-specific parameters are allowed (see DGGS specific parameters).

name

The canonical name of the DGGS, normalized to a lower-cased string.

  • Type: string
  • Required: ✓ Yes

refinement_level

Also called the "depth" or "order", this parameter describes the size of the DGGS cells.

  • Type: integer | null
  • Required: ✓ Yes

It MUST only be null if the associated coordinate is variable-sized.

ellipsoid

The ellipsoid describes the reference system of the DGGS. See the ellipsoid object for more information.

  • Type: object
  • Required: ✕ No

If not given, a sphere with a radius of 6370997 m MUST be assumed.

spatial_dimension

The name of spatial dimension.

  • Type: string
  • Required: ✓ Yes

coordinate

coordinate points to the array containing the cell ids. If not provided, the entire domain must be covered and the refinement_level MUST NOT be null.

  • Type: string
  • Required: ✕ No

compression

compression describes the cell id compression method chosen. It MUST only be provided if the coordinate was provided. If refinement_level is null, compression MUST be "none".

Uncompressing the cell ids MUST result in an array of the same length as the spatial_dimension.

  • Type: string
  • Required: Conditional

The following values are possible:

  • "none": the array referenced by coordinate MUST be 1-dimensional and have the same size as the spatial_dimension.
  • "compacted": the array referenced by coordinate MUST be 1-dimensional.
  • "ranges": the array referenced by coordinate MUST have a shape of (n_ranges, 2) that describes the contiguous ranges covered.

Ellipsoid object

The ellipsoid object is modelled after projjson's definition. It can describe either a sphere or an ellipsoid.

Following projjson and WKT the name is required to help compare the values in the ellipsoid object against other sources, but should not be used to infer the values. For examples, look for the ellipsoid fields in these CRS definitions:

Naming AuthorityURL
European Petroleum Survey Groups (EPSG)http://www.opengis.net/def/crs/EPSG or http://epsg.org
International Astronomical Union (IAU)http://www.opengis.net/def/crs/IAU
Open Geospatial Consortium (OGC)http://www.opengis.net/def/crs/OGC
ESRIhttps://spatialreference.org/ref/esri/

(taken from the proj:code documentation of the proj convention)

Sphere

TypeDescriptionRequired
namestringHuman-readable name of the sphere✓ Yes
radiusnumberThe radius of the sphere✓ Yes

Ellipsoid

TypeDescriptionRequired
namestringHuman-readable name of the ellipsoid✓ Yes
semi_major_axisnumberThe semimajor axis of the ellipsoid✓ Yes
semi_minor_axisnumberThe semiminor axis of the ellipsoidConditional
inverse_flatteningnumberThe inverse flattening of the ellipsoidConditional

semi_minor_axis and inverse_flattening are mutually exclusive.

DGGS specific parameters

Some DGGS have parameters other than refinement_level, which can be added to the dggs object. This section contains standardized extensions for common DGGS.

HEALPix

The HEALPix DGGS ("name": "healpix") has one additional required parameter:

TypeDescriptionRequired
indexing_schemestringHEALPix indexing scheme✓ Yes

The indexing_scheme parameter describes the space-filling curve used to index the cells.

Known values are:

  • the base indexing schemes: nested and ring (the base indexing schemes). "refinement_level" must be an integer between 0 and 29.
  • indexing schemes that encode the refinement level in the cell ids: zuniq, nuniq, and many others ending with uniq). "refinement_level" must be null.

Additional indexing schemes are allowed, with no restrictions on the value of "refinement_level".

Until specifying non-default schemes is possible, compressed coordinates must use the following indexing schemes:

CompressionSchemeLevel
compactedzuniqnull
rangesnested29

Examples

HEALPix

Uncompressed subdomain:

{
  "attributes": {
    "zarr_conventions": [
      {
        "schema_url": "https://raw.githubusercontent.com/zarr-conventions/dggs/refs/tags/v1/schema.json",
        "spec_url": "https://github.com/zarr-conventions/dggs/blob/v1/README.md",
        "uuid": "7b255807-140c-42ca-97f6-7a1cfecdbc38",
        "name": "dggs",
        "description": "Discrete Global Grid Systems convention for zarr"
      }
    ],
    "dggs": {
      "name": "healpix",
      "refinement_level": 10,
      "indexing_scheme": "nested",
      "spatial_dimension": "cells",
      "ellipsoid": {
        "name": "WGS84",
        "semi_major_axis": 6378137.0,
        "inverse_flattening": 298.257223563
      },
      "coordinate": "cell_ids",
      "compression": "none"
    }
  }
}

Full domain, spherical, missing coordinate:

{
  "attributes": {
    "zarr_conventions": [
      {
        "schema_url": "https://raw.githubusercontent.com/zarr-conventions/dggs/refs/tags/v1/schema.json",
        "spec_url": "https://github.com/zarr-conventions/dggs/blob/v1/README.md",
        "uuid": "7b255807-140c-42ca-97f6-7a1cfecdbc38",
        "name": "dggs",
        "description": "Discrete Global Grid Systems convention for zarr"
      }
    ],
    "dggs": {
      "name": "healpix",
      "refinement_level": 16,
      "indexing_scheme": "nested",
      "spatial_dimension": "cells"
    }
  }
}

Acknowledgements

This template is based on the STAC extensions template.