GDAL-DATASET-IDENTIFY(1)
π gdal-dataset-identify(1) β the GDAL manual, but make it cute
okay so bestie, sit down, hydrate, because we're about to talk about the coolest little glow-up in the GDAL family: gdal-dataset-identify. It lives in the GDAL manual, it's a command-line tool, and honestly? It's giving "who dis" energy in the best possible way. π¦
β¨ NAME β¨
gdal-dataset-identify β Identify driver opening dataset(s)
Added in version 3.12. π
So like, gdal dataset identify reports the name of drivers that can open one or several dataset(s). That's it. That's the whole job. And it ate. π
πΈ SYNOPSIS πΈ
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
Look at that list. Every single one. We're not skipping a single flag, bestie, that would be rude. π₯
π OPTIONS π
The one you literally cannot skip
--filename <FILENAME>β Any file name or directory name. Required. May be repeated. (In the synopsis it also shows up as--input, --filename <FILENAME>, described as "File or directory name [may be repeated] [required]".) Yes, she's demanding, but she's worth it. π
Output & vibes
-o,--output <OUTPUT>β Added in version 3.13. β¨
This is the output vector dataset, and at a minimum it will have the fields filename and driver. And if you also passed --detailed? Then it also gets layout (whose value can be, for example, COG), file_list (side-car files), has_crs, has_geotransform and has_overview. She's thorough. She's organized. She's your main character. π§
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.
β οΈ And now the important part, no cap: this is not a positional argument. So the-oor--outputswitch must be explicitly used before specifying the name. Do not just yeet the filename on there and hope. π
-f,--of,--format,--output-format json|text|<OTHER-VECTOR-FORMAT>β Which output format to use. Default isJSON, ortextwhen 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. So like, they're allowed in the group chat now, but they must bring their --output plus-one. π
Scanning & recursion
-r,--recursiveβ Recursively scan files/folders for datasets. She goes deep. π³οΈβ¨--force-recursiveβ Recursively scan folders for datasets, forcing recursion in folders recognized as valid formats. Like, even when a folder looks like a valid format all on its own, she's still gonna peek inside. Nosy in the best way. π
Extra detail mode
--detailedβ 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. This is the "tell me everything, I want the tea" flag. β
Failure reporting
--report-failuresβ Report failures if file type is unidentified. So when she doesn't know what something is, she says so out loud instead of staying quiet. Honesty! we love her. π
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 that show up in the synopsis options list
--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.
π«Ά RETURN STATUS CODE π«Ά
Okay so the vibe check on exit codes:
The program returns status code 0 in case of success, and non-zero in case of error. And lowkey the sweetest detail: non-blocking errors emitted as warnings are considered as a successful execution. So she's not gonna fail you for a little oopsie. She's generous like that. πΈ
π₯ EXAMPLES π₯
Example 1: Identifying a single file
$ gdal dataset identify NE1_50M_SR_W.tif
NE1_50M_SR_W.tif: GTiff
One file in, one driver out. Clean. Simple. Iconic. β¨
Example 2: Identifying a single file with JSON output
$ gdal dataset identify --of=JSON NE1_50M_SR_W.tif
[
{
"name": "NE1_50M_SR_W.tif",
"driver": "GTiff"
}
]
Look at the structure. Look at the name and driver keys. We love a well-behaved JSON array. ππ
Example 3: Recursive mode will scan subfolders and report the data format
$ 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
She went through every subfolder and named every format. JPEG, PNG, GTiff, HFA β the whole friend group showed up to the party. π
Example 4: Recursively scans subfolders and reports detailed information into a CSV file
$ gdal dataset identify --output out.csv --detailed -r 50m_raster/
--output + --detailed + -r and boom, you got yourself a CSV. Iconic triple threat. π
Example 5: Check if a GeoTIFF file is cloud optimized using --detailed
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
Yes bestie, you can point her at a /vsicurl/ URL and she will tell you if that GeoTIFF is cloud optimized. That's the whole flex. COG check via vibe check. π¦π₯
π AUTHOR π
Even Rouault <even.rouault@spatialys.com>
(hi king π thank you for your service)
π COPYRIGHT π
1998-2026
and that's the whole page bestie! this manual page came to you from the GDAL manual, and it was dated Aug 18, 2026 β so like, freshly stamped, still warm. go identify some datasets, you got this. mwah πβ¨
π¦ where this page comes from
- alpine 3.24: gdal-doc 3.13.3-r0 Β· MIT
- arch rolling: gdal 3.13.3-6 Β· MIT
- ubuntu stonking: gdal-bin 3.13.3+dfsg-1ubuntu4 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms