← 返回命令列表

Linux command

gdalinfo 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Show raster information

gdalinfo [file.tif]

Show statistics

gdalinfo -stats [file.tif]

Show in JSON

gdalinfo -json [file.tif]

Check specific dataset

gdalinfo [file.vrt]

Show metadata

gdalinfo -mm [file.tif]

说明

gdalinfo displays information about raster datasets. It shows format, dimensions, coordinate system, bands, and metadata for geospatial raster files. The tool reads header information and optionally computes statistics. It supports hundreds of raster formats through GDAL drivers. gdalinfo is the first step in understanding and validating geospatial raster data.

参数

-json
Output as JSON.
-stats
Compute and display statistics.
-mm
Compute min/max values.
-hist
Compute histogram.
-nogcp
Suppress GCP output.
-nomd
Suppress metadata output.
--help
Display help information.

FAQ

What is the gdalinfo command used for?

gdalinfo displays information about raster datasets. It shows format, dimensions, coordinate system, bands, and metadata for geospatial raster files. The tool reads header information and optionally computes statistics. It supports hundreds of raster formats through GDAL drivers. gdalinfo is the first step in understanding and validating geospatial raster data.

How do I run a basic gdalinfo example?

Run `gdalinfo [file.tif]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -json do in gdalinfo?

Output as JSON.