GDAL-MDIM-INFO(1)

πŸ’– GDAL-MDIM-INFO(1) πŸ’–

okay bestie, this is the page for gdal-mdim-info β€” it lives in the GDAL manual, and it's genuinely one of the most useful little tools for peeking at multidimensional datasets. ✨ Added in version 3.11. πŸŽ€


✨ SYNOPSIS ✨

Usage: gdal mdim info [OPTIONS] <INPUT>

Return information on a multidimensional dataset.

Positional arguments:
  -i, --dataset, --input <INPUT>       Input multidimensional raster dataset [required]

Common Options:
  -h, --help                           Display help message and exit
  --json-usage                         Display usage as JSON document and exit
  --config <KEY>=<VALUE>               Configuration option [may be repeated]

Options:
  --summary                            Report only group and array hierarchy, without detailed information on attributes or dimensions.
                                       Mutually exclusive with --detailed
  --detailed                           Most verbose output. Report attribute data types and array values.
                                       Mutually exclusive with --summary
  --array <ARRAY>                      Name of the array, used to restrict the output to the specified array.
  --limit <LIMIT>                      Number of values in each dimension that is used to limit the display of array values.
  --array-option <KEY>=<VALUE>         Option passed to GDALGroup::GetMDArrayNames() to filter reported arrays. [may be repeated]
  --stats                              Read and display image statistics.

Advanced Options:
  --oo, --open-option <KEY>=<VALUE>    Open options [may be repeated]
  --if, --input-format <INPUT-FORMAT>  Input formats [may be repeated]

🌸 DESCRIPTION 🌸

gdal mdim info lists all kinds of info about a GDAL-supported multidimensional dataset, and it hands it back to you on the standard output stream when you're in the command line, or in the output parameter when you're using the API. 🫢

Here's everything it reports (when known), as JSON:

  • The format driver used to access the file. πŸ‘€
  • Hierarchy of groups
  • Group attributes
  • Arrays:
    • Name
    • Dimension name, sizes, indexing variable
    • Data type
    • Attributes
    • SRS
    • Nodata value
    • Units
    • Statistics (if requested)

The following options are available, and yes, we're going through all of them because I love you:


🌈 Standard options 🌈

  • --summary β€” Report only the group and array hierarchy, no detailed info on attributes or dimensions. Mutually exclusive with --detailed. Added in version 3.13. ✨
  • --detailed β€” The most verbose output, bestie. It reports attribute data types and array values. Mutually exclusive with --summary. πŸ’…
  • --array <array_name> β€” Name of the array, used to restrict the output to just the array you named.
NOTE: Bash completion for --array is possible if the dataset name is specified before. 🐚✨
  • --limit <number> β€” Number of values in each dimension that's used to limit the display of array values. By default, unlimited. Only taken into account if used with -detailed. πŸ“
  • --array-option <NAME>=<VALUE> β€” Option passed to GDALGroup::GetMDArrayNames() to filter the reported arrays. Such an option is format specific β€” go consult the driver documentation, bestie. This option may be used several times. πŸ”
NOTE: Bash completion for --array-option is possible if the dataset name is specified before. 🐚✨
  • --stats β€” Read and display array statistics. Forces computation if no statistics are stored in an array. πŸ”₯

πŸ¦‹ Advanced options πŸ¦‹

  • --oo, --open-option <NAME>=<VALUE> β€” Dataset open option (format specific). May be repeated. πŸŽ€
  • --if, --input-format <format> β€” Format/driver name to be attempted to open the input file(s). It's generally not necessary to specify it, but it can be used to skip automatic driver detection when that fails to select the appropriate driver. This option can be repeated several times to specify several candidate drivers. Note that it does not force those drivers to open the dataset β€” in particular, some drivers have requirements on file extensions. May be repeated. πŸ‘‘

πŸ’€ RETURN STATUS CODE πŸ’€

The program returns status code 0 when it's a success, and non-zero when there's an error. (Non-blocking errors emitted as warnings still count as a successful execution, so don't panic. πŸ™ˆ)


🧚 EXAMPLES 🧚

⭐ Example 1: Getting information on the file netcdf-4d.nc as JSON output ⭐

$ gdal mdim info netcdf-4d.nc

{
  "type": "group",
  "name": "/",
  "attributes": {
    "Conventions": "CF-1.5"
  },
  "dimensions": [
    {
      "name": "levelist",
      "full_name": "/levelist",
      "size": 2,
      "type": "VERTICAL",
      "indexing_variable": "/levelist"
    },
    {
      "name": "longitude",
      "full_name": "/longitude",
      "size": 10,
      "type": "HORIZONTAL_X",
      "direction": "EAST",
      "indexing_variable": "/longitude"
    },
    {
      "name": "latitude",
      "full_name": "/latitude",
      "size": 10,
      "type": "HORIZONTAL_Y",
      "direction": "NORTH",
      "indexing_variable": "/latitude"
    },
    {
      "name": "time",
      "full_name": "/time",
        "size": 4,
      "type": "TEMPORAL",
      "indexing_variable": "/time"
      }
  ],
  "arrays": {
    "levelist": {
      "datatype": "Int32",
      "dimensions": [
          "/levelist"
        ],
      "attributes": {
        "long_name": "pressure_level"
      },
      "unit": "millibars"
    },
    "longitude": {
      "datatype": "Float32",
      "dimensions": [
        "/longitude"
      ],
      "attributes": {
        "standard_name": "longitude",
        "long_name": "longitude",
        "axis": "X"
      },
      "unit": "degrees_east"
    },
    "latitude": {
      "datatype": "Float32",
      "dimensions": [
        "/latitude"
      ],
      "attributes": {
        "standard_name": "latitude",
        "long_name": "latitude",
        "axis": "Y"
      },
      "unit": "degrees_north"
    },
    "time": {
      "datatype": "Float64",
      "dimensions": [
        "/time"
      ],
      "attributes": {
        "standard_name": "time",
        "calendar": "standard"
      },
      "unit": "hours since 1900-01-01 00:00:00"
    },
    "t": {
      "datatype": "Int32",
      "dimensions": [
        "/time",
        "/levelist",
        "/latitude",
        "/longitude"
      ],
      "nodata_value": -32767
    }
  },
  "structural_info": {
    "NC_FORMAT": "CLASSIC"
  }
}

πŸ‘‘ AUTHOR πŸ‘‘

Even Rouault <even.rouault@spatialys.com> β€” absolute icon, no cap. 🫢


1998-2026


and that's the whole page, bestie!! 🌈 this one's from the GDAL manual, and the footer says it all: 1998-2026, dated Aug 18, 2026. go forth and mdim info everything, you're gonna ate. πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from