GDALINFO(1)

πŸ“¦
version 3.4.3 Β· 2 versions
, in epel 9

✨ GDALINFO πŸ’…

okay so bestie, welcome to gdalinfo from the GDAL manual, literally the glow-up your raster datasets have been waiting for πŸ’– this is the tool that spills all the tea about your raster files. no cap.

🌈 SYNOPSIS 🌈

gdalinfo [--help-general] [-json] [-mm] [-stats | -approx_stats] [-hist] [-nogcp] [-nomd]
         [-norat] [-noct] [-nofl] [-checksum] [-proj4]
         [-listmdd] [-mdd domain|`all`]* [-wkt_format WKT1|WKT2|...]
         [-sd subdataset] [-oo NAME=VALUE]* [-if format]* datasetname

πŸ¦‹ DESCRIPTION πŸ¦‹

gdalinfo is that main character energy program that lists a bunch of info about a GDAL supported raster dataset ✨

The following command line parameters can appear in any order β€” slay, flexible queen πŸ’…

πŸ‘‘ OPTIONS πŸ‘‘

  • -json β€” bestie, display the output in json format. yes, it's giving structured data realness πŸ”₯
  • -mm β€” force computation of the actual min/max values for each band in the dataset. no shortcuts, we're getting the real numbers πŸ’―
  • -stats β€” read and display image statistics. force computation if no statistics are stored in an image. it'll dig them up for you, periodt πŸŽ€
  • -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 want precise stats. lowkey the "I'm running late" version of -stats 😭
  • -hist β€” report histogram information for all bands. we love a distribution moment πŸ¦‹
  • -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. not me drowning in GCPs πŸ’€
  • -nomd β€” suppress metadata printing. some datasets may contain a lot of metadata strings. silence the chatter if you need to 🫢
  • -norat β€” suppress printing of raster attribute table. no table, just vibes ✨
  • -noct β€” suppress printing of color table. bye-bye color table 🌈
  • -checksum β€” force computation of the checksum for each band in the dataset. let's verify that data, bestie πŸ”₯
  • -listmdd β€” list all metadata domains available for the dataset. the whole metadata menu, iconic πŸ’…
  • -mdd <domain>|all β€” adds metadata using:
    • domain β€” report metadata for the specified domain 🎯
    • all β€” report metadata for all domains. literally everything πŸ’–
  • -nofl β€” only display the first file of the file list. just the first one, keep it cute 🌸
  • -wkt_format WKT1|WKT2|WKT2_2015|WKT2_2018 β€” WKT format used to display the SRS. currently the supported values are:
    • WKT1
    • WKT2 (latest WKT version, currently WKT2_2018)
    • WKT2_2015
    • WKT2_2018

new in version 3.0.0 ✨

  • -sd <n> β€” if the input dataset contains several subdatasets read and display a subdataset with specified n number (starting from 1). this is an alternative of giving the full subdataset name. pick your fave subdataset, iykyk πŸ’…
  • -proj4 β€” report a PROJ.4 string corresponding to the file's coordinate system. vintage coordinate energy 🫢
  • -oo <NAME=VALUE> β€” dataset open option (format specific). the secret handshake for opening files ✨
  • -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.

new in version 3.2 πŸŽ€


🧚 what gdalinfo reports (when it knows it) 🧚

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). note that, bestie β€” rotational coefficients are 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 🌈

πŸ’» C API πŸ’»

This utility is also callable from C with GDALInfo(). iconic crossover fr fr πŸ’–

new in version 2.1 ✨

🌸 EXAMPLE 🌸

gdalinfo ~/openev/utm.tif
Driver: GTiff/GeoTIFF
Size is 512, 512
Coordinate System is:
PROJCS["NAD27 / UTM zone 11N",
    GEOGCS["NAD27",
        DATUM["North_American_Datum_1927",
            SPHEROID["Clarke 1866",6378206.4,294.978698213901]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-117],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1]]
Origin = (440720.000000,3751320.000000)
Pixel Size = (60.000000,-60.000000)
Corner Coordinates:
Upper Left  (  440720.000, 3751320.000) (117d38'28.21"W, 33d54'8.47"N)
Lower Left  (  440720.000, 3720600.000) (117d38'20.79"W, 33d37'31.04"N)
Upper Right (  471440.000, 3751320.000) (117d18'32.07"W, 33d54'13.08"N)
Lower Right (  471440.000, 3720600.000) (117d18'28.50"W, 33d37'35.61"N)
Center      (  456080.000, 3735960.000) (117d28'27.39"W, 33d45'52.46"N)
Band 1 Block=512x16 Type=Byte, ColorInterp=Gray

🫢 AUTHOR 🫢

Frank Warmerdam <warmerdam@pobox.com> β€” legend behavior, respectfully πŸ’œ

1998-2026 β€” iconic run, no notes πŸ‘‘


and that's the whole tea, bestie πŸ“ from the GDAL fam, version vibes and date Jan 08, 2026 β€” go forth and inspect those rasters, you gorgeous nerd πŸ’–βœ¨

πŸ“¦ where this page comes from