GDALINFO(1)
gdalinfo π π¦
okay bestie, welcome to the GDAL corner of the manual β this is gdalinfo(1) and she is the gossip queen of raster datasets. she spills every last detail about your file and honestly? iconic behaviour, no cap.
β¨ NAME β¨
gdalinfo β Lists various information about a GDAL supported raster dataset π
πΈ SYNOPSIS πΈ
Usage: gdalinfo [--help] [--long-usage] [--help-general]
[-json] [-mm]
[[-stats]|[-approx_stats]]
[-hist]
[-nogcp] [-nomd] [-norat] [-noct] [-nofl] [-nonodata] [-nomask]
[-checksum] [-listmdd] [-proj4]
[-wkt_format <WKT1|WKT1_ESRI|WKT2|WKT2_2015|WKT2_2018|WKT2_2019>]
[-sd <n>] [-oo <NAME>=<VALUE>]... [-if <format>]...
[-mdd <domain>|all]
<dataset_name>
π DESCRIPTION π
okay so the gdalinfo program lists various information about a GDAL supported raster dataset. that's it, that's the whole job, and she does it flawlessly. slay. β¨
The following command line parameters can appear in any order β yes bestie, any order, she's flexible like that π
TIP: π«Ά Equivalent in new "gdal" command line interface: See gdal raster info.
--helpβ Show this help message and exit. the classic "help me help you" move π--help-generalβ Gives a brief usage message for the generic GDAL commandline options and exit. that's the general tea, not the dataset-specific tea π-jsonβ Display the output in json format. Since GDAL 3.6, this includes key-value pairs useful for building a STAC item , including statistics and histograms if-statsor-histflags are passed, respectively. json girlies rise up π₯-mmβ Force computation of the actual min/max values for each band in the dataset. no shortcuts, we're getting the real numbers fr fr-statsβ Read and display image statistics. Force computation if no statistics are stored in an image.-approx_statsβ Read and display image statistics. Force computation if no statistics are stored in an image. However, they may be computed based on overviews or a subset of all tiles. Useful if you are in a hurry and don't need precise stats. lowkey the "I have somewhere to be" option πβοΈ-histβ Report histogram information for all bands. give me the distribution bestie, the shape of the data π-nogcpβ Suppress ground control points list printing. It may be useful for datasets with huge amount of GCPs, such as L1B AVHRR or HDF4 MODIS which contain thousands of them. thousands?? not me waiting on that output π-nomdβ Suppress metadata printing. Some datasets may contain a lot of metadata strings.-noratβ Suppress printing of raster attribute table.-noctβ Suppress printing of color table. π¨π«-nonodataβ Added in version 3.10. Suppress nodata printing. Implies-nomask. π Can be useful for example when querying a remove GRIB2 dataset that has an index.idxside-car file, together with-nomd-nomaskβ Added in version 3.10. Suppress band mask printing. Is implied if-nonodatais specified. (yes the implication goes both ways, they're a package deal π«Ά)-checksumβ Force computation of the checksum for each band in the dataset. data integrity check, she's got receipts π§Ύ-listmddβ List all metadata domains available for the dataset. window shopping for metadata domains, obsessed ποΈ-mdd<domain>|allβ adds metadata using:domainβ Report metadata for the specified domain.allβ Report metadata for all domains.
-noflβ Only display the first file of the file list.-wkt_formatWKT1|WKT1_ESRI|WKT2|WKT2_2015|WKT2_2018|WKT2_2019β WKT format used to display the SRS. Currently the supported values are:WKT1WKT1_ESRIWKT2(latest WKT version, currentlyWKT2_2019)WKT2_2015WKT2_2018(deprecated)WKT2_2019- Added in version 3.0.0. π
-sd<n>β If the input dataset contains several subdatasets read and display a subdataset with specifiednnumber (starting from 1). This is an alternative of giving the full subdataset name. no need for the whole government name, just the number bestie π’-proj4β Report a PROJ.4 string corresponding to the file's coordinate system.-oo<NAME>=<VALUE>β Dataset open option (format specific).-if<format>β Format/driver name to be attempted to open the input file(s). It is generally not necessary to specify it, but it can be used to skip automatic driver detection, when it 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.- Added in version 3.2.
bestie please clock this: it does not force those drivers to open the dataset. she's making suggestions, not demands π
okay and now the good part β the gdalinfo will report all of the following (if known):
- The format driver used to access the file. π΅οΈβοΈ
- Raster size (in pixels and lines).
- The coordinate system for the file (in OGC WKT).
- The geotransform associated with the file (rotational coefficients are currently not reported).
- Corner coordinates in georeferenced, and if possible lat/long based on the full geotransform (but not GCPs).
- Ground control points.
- File wide (including subdatasets) metadata.
- Band data types.
- Band color interpretations.
- Band block size.
- Band descriptions.
- Band min/max values (internally known and possibly computed).
- Band checksum (if computation asked).
- Band NODATA value.
- Band overview resolutions available.
- Band unit type (i.e.. "meters" or "feet" for elevation bands).
- Band pseudo-color tables.
like?? she does it ALL. main character energy fr fr π
π RETURN STATUS CODE π
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).
so 0 = good vibes only, nonzero = something's wrong. and yes, warnings still count as a win bestie, we don't punish a girlie for a lil warning π«Άβ¨
π C API π
This utility is also callable from C with GDALInfo().
π¦ EXAMPLES π¦
Example 1: Default output format
$ gdalinfo utmsmall.tif
Driver: GTiff/GeoTIFF
Files: utmsmall.tif
Size is 100, 100
Coordinate System is:
PROJCRS["NAD27 / UTM zone 11N",
BASEGEOGCRS["NAD27",
DATUM["North American Datum 1927",
ELLIPSOID["Clarke 1866",6378206.4,294.978698213898,
LENGTHUNIT["metre",1]]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
ID["EPSG",4267]],
CONVERSION["Transverse Mercator",
METHOD["Transverse Mercator",
ID["EPSG",9807]],
PARAMETER["Latitude of natural origin",0,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8801]],
PARAMETER["Longitude of natural origin",-117,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8802]],
PARAMETER["Scale factor at natural origin",0.9996,
SCALEUNIT["unity",1],
ID["EPSG",8805]],
PARAMETER["False easting",500000,
LENGTHUNIT["metre",1],
ID["EPSG",8806]],
PARAMETER["False northing",0,
LENGTHUNIT["metre",1],
ID["EPSG",8807]]],
CS[Cartesian,2],
AXIS["easting",east,
ORDER[1],
LENGTHUNIT["metre",1]],
AXIS["northing",north,
ORDER[2],
LENGTHUNIT["metre",1]],
ID["EPSG",26711]]
Data axis to CRS axis mapping: 1,2
Origin = (440720.000000000000000,3751320.000000000000000)
Pixel Size = (60.000000000000000,-60.000000000000000)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 440720.000, 3751320.000) (117d38'28.21"W, 33d54' 8.47"N)
Lower Left ( 440720.000, 3745320.000) (117d38'26.75"W, 33d50'53.66"N)
Upper Right ( 446720.000, 3751320.000) (117d34'34.59"W, 33d54' 9.62"N)
Lower Right ( 446720.000, 3745320.000) (117d34'33.28"W, 33d50'54.82"N)
Center ( 443720.000, 3748320.000) (117d36'30.71"W, 33d52'31.66"N)
Band 1 Block=100x81 Type=Byte, ColorInterp=Gray
look at her go π so much info, so little time.
Example 2: JSON output
For corner coordinates formatted as decimal degree instead of the above degree, minute, second, inspect the wgs84Extent member of gdalinfo -json:
Example of JSON output with gdalinfo -json utmsmall.tif:
β¦and it just. keeps. going. bestie, the JSON does not stop, she's committed to the bit π«Ά here's the rest of her masterpiece, verbatim, every bracket and every \n and every 6378206.4 right where it belongs:
{
"description":"utmsmall.tif",
"driverShortName":"GTiff",
"driverLongName":"GeoTIFF",
"files":[
"utmsmall.tif"
],
"size":[
100,
100
],
"coordinateSystem":{
"wkt":"PROJCRS[\"NAD27 / UTM zone 11N\",\n BASEGEOGCRS[\"NAD27\",\n DATUM[\"North American Datum 1927\",\n ELLIPSOID[\"Clarke 1866\",6378206.4,294.978698213898,\n LENGTHUNIT[\"metre\",1]]],\n PRIMEM[\"Greenwich\",0,\n ANGLEUNIT[\"degree\",0.0174532925199433]],\n ID[\"EPSG\",4267]],\n CONVERSION[\"Transverse Mercator\",\n METHOD[\"Transverse Mercator\",\n ID[\"EPSG\",9807]],\n PARAMETER[\"Latitude of natural origin\",0,\n ANGLEUNIT[\"degree\",0.0174532925199433],\n ID[\"EPSG\",8801]],\n PARAMETER[\"Longitude of natural origin\",-117,\n ANGLEUNIT[\"degree\",0.0174532925199433],\n ID[\"EPSG\",8802]],\n PARAMETER[\"Scale factor at natural origin\",0.9996,\n SCALEUNIT[\"unity\",1],\n ID[\"EPSG\",8805]],\n PARAMETER[\"False easting\",500000,\n LENGTHUNIT[\"metre\",1],\n ID[\"EPSG\",8806]],\n PARAMETER[\"False northing\",0,\n LENGTHUNIT[\"metre\",1],\n ID[\"EPSG\",8807]]],\n CS[Cartesian,2],\n AXIS[\"easting\",east,\n ORDER[1],\n LENGTHUNIT[\"metre\",1]],\n AXIS[\"northing\",north,\n ORDER[2],\n LENGTHUNIT[\"metre\",1]],\n ID[\"EPSG\",26711]]",
"dataAxisToSRSAxisMapping":[
1,
2
]
},
"geoTransform":[
440720.0,
60.0,
0.0,
3751320.0,
0.0,
-60.0
],
"metadata":{
"":{
"AREA_OR_POINT":"Area"
},
"IMAGE_STRUCTURE":{
"INTERLEAVE":"BAND"
}
},
"cornerCoordinates":{
"upperLeft":[
440720.0,
3751320.0
],
"lowerLeft":[
440720.0,
3745320.0
],
"lowerRight":[
446720.0,
3745320.0
],
"upperRight":[
446720.0,
3751320.0
],
"center":[
443720.0,
3748320.0
]
},
"wgs84Extent":{
"type":"Polygon",
"coordinates":[
[
[
-117.6420428,
33.9023684
],
[
-117.6416377,
33.848257
],
[
-117.5767844,
33.8485775
],
[
-117.5771485,
33.9026895
],
[
-117.6420428,
33.9023684
]
]
]
},
"bands":[
{
"band":1,
"block":[
100,
81
],
"type":"Byte",
"colorInterpretation":"Gray",
"metadata":{
}
}
],
"stac":{
"proj:shape":[
100,
100
],
"proj:wkt2":"PROJCRS[\"NAD27 / UTM zone 11N\",\n BASEGEOGCRS[\"NAD27\",\n DATUM[\"North American Datum 1927\",\n ELLIPSOID[\"Clarke 1866\",6378206.4,294.978698213898,\n LENGTHUNIT[\"metre\",1]]],\n PRIMEM[\"Greenwich\",0,\n ANGLEUNIT[\"degree\",0.0174532925199433]],\n ID[\"EPSG\",4267]],\n CONVERSION[\"Transverse Mercator\",\n METHOD[\"Transverse Mercator\",\n ID[\"EPSG\",9807]],\n PARAMETER[\"Latitude of natural origin\",0,\n ANGLEUNIT[\"degree\",0.0174532925199433],\n ID[\"EPSG\",8801]],\n PARAMETER[\"Longitude of natural origin\",-117,\n ANGLEUNIT[\"degree\",0.0174532925199433],\n ID[\"EPSG\",8802]],\n PARAMETER[\"Scale factor at natural origin\",0.9996,\n SCALEUNIT[\"unity\",1],\n ID[\"EPSG\",8805]],\n PARAMETER[\"False easting\",500000,\n LENGTHUNIT[\"metre\",1],\n ID[\"EPSG\",8806]],\n PARAMETER[\"False northing\",0,\n LENGTHUNIT[\"metre\",1],\n ID[\"EPSG\",8807]]],\n CS[Cartesian,2],\n AXIS[\"easting\",east,\n ORDER[1],\n LENGTHUNIT[\"metre\",1]],\n AXIS[\"northing\",north,\n ORDER[2],\n LENGTHUNIT[\"metre\",1]],\n ID[\"EPSG\",26711]]",
"proj:epsg":26711,
"proj:projjson":{
"$schema":"https://proj.org/schemas/v0.7/projjson.schema.json",
"type":"ProjectedCRS",
"name":"NAD27 / UTM zone 11N",
"base_crs":{
"name":"NAD27",
"datum":{
"type":"GeodeticReferenceFrame",
"name":"North American Datum 1927",
"ellipsoid":{
"name":"Clarke 1866",
"semi_major_axis":6378206.4,
"inverse_flattening":294.978698213898
}
},
"coordinate_system":{
"subtype":"ellipsoidal",
"axis":[
{
"name":"Geodetic latitude",
"abbreviation":"Lat",
"direction":"north",
"unit":"degree"
},
{
"name":"Geodetic longitude",
"abbreviation":"Lon",
"direction":"east",
"unit":"degree"
}
]
},
"id":{
"authority":"EPSG",
"code":4267
}
},
"conversion":{
"name":"Transverse Mercator",
"method":{
"name":"Transverse Mercator",
"id":{
"authority":"EPSG",
"code":9807
}
},
"parameters":[
{
"name":"Latitude of natural origin",
"value":0,
"unit":"degree",
"id":{
"authority":"EPSG",
"code":8801
}
},
{
"name":"Longitude of natural origin",
"value":-117,
"unit":"degree",
"id":{
"authority":"EPSG",
"code":8802
}
},
{
"name":"Scale factor at natural origin",
"value":0.9996,
"unit":"unity",
"id":{
"authority":"EPSG",
"code":8805
}
},
{
"name":"False easting",
"value":500000,
"unit":"metre",
"id":{
"authority":"EPSG",
"code":8806
}
},
{
"name":"False northing",
"value":0,
"unit":"metre",
"id":{
"authority":"EPSG",
"code":8807
}
}
]
},
"coordinate_system":{
"subtype":"Cartesian",
"axis":[
{
"name":"Easting",
"abbreviation":"",
"direction":"east",
"unit":"metre"
},
{
"name":"Northing",
"abbreviation":"",
"direction":"north",
"unit":"metre"
}
]
},
"id":{
"authority":"EPSG",
"code":26711
}
},
"proj:transform":[
60.0,
0.0,
440720.0,
0.0,
-60.0,
3751320.0
],
"raster:bands":[
{
"data_type":"uint8"
}
],
"eo:bands":[
{
"name":"b1",
"description":"Gray"
}
]
}
}
π AUTHOR π
The absolute icon who made this whole thing happen:
- Frank Warmerdam β
<warmerdam@pobox.com>π«Ά
Give her the flowers, fr fr. This legend wrote the thing, and now we all get to sit here reading JSON about a 100Γ100 TIFF like it's poetry.
π COPYRIGHT π
1998-2026
That's a twenty-eight-year run of holding it down, bestie. No notes. π
<div align="center">β¨ π okay that's the whole GDALINFO(1) page, start to finish, you ate it π β¨</div>
So yeah β that footer down at the bottom was your source-and-version-and-date moment: this is the GDALINFO(1) manual page, dated Aug 18, 2026, and you just read every last scrap of it. Go point gdalinfo at something weird and unhinged and see what she yells at you ππ
π¦ 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