GDAL-DATASET-IDENTIFY(1) GDAL GDAL-DATASET-IDENTIFY(1)

gdal-dataset-identify - Identify driver opening dataset(s)

Added in version 3.12.

gdal dataset identify reports the name of drivers that can open one or several dataset(s).

Usage: gdal dataset identify [OPTIONS] <FILENAME>
Identify driver opening dataset(s).
Positional arguments:
  --input, --filename <FILENAME>                       File or directory name [may be repeated] [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]
  -q, --quiet                                          Quiet mode (no progress bar or warning message) [not available in pipelines]
Options:
  -o, --output <OUTPUT>                                Output vector dataset (created by algorithm)
  -f, --of, --format, --output-format <OUTPUT-FORMAT>  Output format
  --co, --creation-option <KEY>=<VALUE>                Creation option [may be repeated]
  --lco, --layer-creation-option <KEY>=<VALUE>         Layer creation option [may be repeated]
  -l, --output-layer <OUTPUT-LAYER>                    Output layer name
  --overwrite                                          Whether overwriting existing output dataset is allowed
  -r, --recursive                                      Recursively scan files/folders for datasets
  --force-recursive                                    Recursively scan folders for datasets, forcing recursion in folders recognized as valid formats
  --detailed                                           Most detailed output. Reports the presence of georeferencing, if a GeoTIFF file is cloud optimized, etc.
  --report-failures                                    Report failures if file type is unidentified

Any file name or directory name. Required. May be repeated
Added in version 3.13.

Output vector dataset that will have at a minimum fields filename and driver, and if --detailed is specified, also layout (whose value can be for example COG), file_list (side-car files), has_crs, has_geotransform and has_overview.

When this argument is not specified, the result report is emitted to the standard output stream, either as JSON or text (depending on --output-format), for command line execution, or in the output-string argument when used from the API.

Note that this is not a positional argument, so the -o or --output switch must be explicitly used before specifying the name.

Which output format to use. Default is JSON, or text when invoked from command line.

Since GDAL 3.13, other GDAL vector formats with creation capabilities can be used, in which case --output must be specified.

Recursively scan files/folders for datasets.
Recursively scan folders for datasets, forcing recursion in folders recognized as valid formats.
Added in version 3.13.

Increases the level of details in the output. Reports the presence of georeferencing, if a GeoTIFF file is cloud optimized, etc.

Report failures if file type is unidentified.

The program returns status code 0 in case of success, and non-zero in case of error (non-blocking errors emitted as warnings are considered as a successful execution).

$ gdal dataset identify NE1_50M_SR_W.tif
NE1_50M_SR_W.tif: GTiff

$ gdal dataset identify --of=JSON NE1_50M_SR_W.tif
[
   {
     "name": "NE1_50M_SR_W.tif",
     "driver": "GTiff"
   }
]

$ gdal dataset identify -r 50m_raster/
NE1_50M_SR_W/ne1_50m.jpg: JPEG
NE1_50M_SR_W/ne1_50m.png: PNG
NE1_50M_SR_W/ne1_50m_20pct.tif: GTiff
NE1_50M_SR_W/ne1_50m_band1.tif: GTiff
NE1_50M_SR_W/ne1_50m_print.png: PNG
NE1_50M_SR_W/NE1_50M_SR_W.aux: HFA
NE1_50M_SR_W/NE1_50M_SR_W.tif: GTiff
NE1_50M_SR_W/ne1_50m_sub.tif: GTiff
NE1_50M_SR_W/ne1_50m_sub2.tif: GTiff

$ gdal dataset identify --output out.csv --detailed -r 50m_raster/

The following returns driver, and image layout details: GTiff, layout=COG, has CRS, has geotransform, has overview(s)

$ gdal dataset identify /vsicurl/https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/36/Q/WD/2020/7/S2A_36QWD_20200701_0_L2A/TCI.tif --detailed

Even Rouault <even.rouault@spatialys.com>

1998-2026

August 18, 2026