Forrest logo
back to the gdalinfo tool

gdalinfo:tldr:c1ec0

gdalinfo: List information about a specific raster dataset in JSON format.
$ gdalinfo -json ${path-to-input-tif}
try on your machine

The command "gdalinfo -json ${path-to-input-tif}" is used in the GDAL (Geospatial Data Abstraction Library) command-line tools to extract information about a geospatial raster file in JSON format.

Here's a breakdown of the command:

  • "gdalinfo": This is the command that invokes the gdalinfo tool, which is used to retrieve information about a raster file.
  • "-json": The "-json" option specifies the output format as JSON. By default, gdalinfo provides output in a human-readable text format, but with "-json," it will produce the information as JSON.
  • "${path-to-input-tif}": This is a placeholder for the path to the input TIFF file. You need to replace "${path-to-input-tif}" with the actual file path of the TIFF file you want to retrieve information about.

When you execute this command with the appropriate parameters, it will provide detailed information about the input TIFF file, including characteristics such as data type, dimensions, coordinate system, georeferencing information, raster bands, and metadata. The information is presented in JSON format, which is a structured data format commonly used for data interchange.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the gdalinfo tool