1GDALINFO(1) GDAL GDALINFO(1)
2
3
4
6 gdalinfo - Lists various information about a GDAL supported raster
7 dataset
8
10 gdalinfo [--help-general] [-json] [-mm] [-stats | -approx_stats] [-hist] [-nogcp] [-nomd]
11 [-norat] [-noct] [-nofl] [-checksum] [-proj4]
12 [-listmdd] [-mdd domain|`all`]* [-wkt_format WKT1|WKT2|...]
13 [-sd subdataset] [-oo NAME=VALUE]* [-if format]* datasetname
14
16 gdalinfo program lists various information about a GDAL supported
17 raster dataset.
18
19 The following command line parameters can appear in any order
20
21 -json Display the output in json format. Since GDAL 3.6, this includes
22 key-value pairs useful for building a STAC item , including sta‐
23 tistics and histograms if -stats or -hist flags are passed, re‐
24 spectively.
25
26 -mm Force computation of the actual min/max values for each band in
27 the dataset.
28
29 -stats Read and display image statistics. Force computation if no sta‐
30 tistics are stored in an image.
31
32 -approx_stats
33 Read and display image statistics. Force computation if no sta‐
34 tistics are stored in an image. However, they may be computed
35 based on overviews or a subset of all tiles. Useful if you are
36 in a hurry and don't want precise stats.
37
38 -hist Report histogram information for all bands.
39
40 -nogcp Suppress ground control points list printing. It may be useful
41 for datasets with huge amount of GCPs, such as L1B AVHRR or HDF4
42 MODIS which contain thousands of them.
43
44 -nomd Suppress metadata printing. Some datasets may contain a lot of
45 metadata strings.
46
47 -norat Suppress printing of raster attribute table.
48
49 -noct Suppress printing of color table.
50
51 -checksum
52 Force computation of the checksum for each band in the dataset.
53
54 -listmdd
55 List all metadata domains available for the dataset.
56
57 -mdd <domain>|all
58 adds metadata using:
59
60 domain Report metadata for the specified domain.
61
62 all Report metadata for all domains.
63
64 -nofl Only display the first file of the file list.
65
66 -wkt_format WKT1|WKT2|WKT2_2015|WKT2_2018
67 WKT format used to display the SRS. Currently the supported
68 values are:
69
70 WKT1
71
72 WKT2 (latest WKT version, currently WKT2_2018)
73
74 WKT2_2015
75
76 WKT2_2018
77
78 New in version 3.0.0.
79
80
81 -sd <n>
82 If the input dataset contains several subdatasets read and dis‐
83 play a subdataset with specified n number (starting from 1).
84 This is an alternative of giving the full subdataset name.
85
86 -proj4 Report a PROJ.4 string corresponding to the file's coordinate
87 system.
88
89 -oo <NAME=VALUE>
90 Dataset open option (format specific).
91
92 -if <format>
93 Format/driver name to be attempted to open the input file(s). It
94 is generally not necessary to specify it, but it can be used to
95 skip automatic driver detection, when it fails to select the ap‐
96 propriate driver. This option can be repeated several times to
97 specify several candidate drivers.
98
99 New in version 3.2.
100
101
102 The gdalinfo will report all of the following (if known):
103
104 • The format driver used to access the file.
105
106 • Raster size (in pixels and lines).
107
108 • The coordinate system for the file (in OGC WKT).
109
110 • The geotransform associated with the file (rotational coefficients
111 are currently not reported).
112
113 • Corner coordinates in georeferenced, and if possible lat/long based
114 on the full geotransform (but not GCPs).
115
116 • Ground control points.
117
118 • File wide (including subdatasets) metadata.
119
120 • Band data types.
121
122 • Band color interpretations.
123
124 • Band block size.
125
126 • Band descriptions.
127
128 • Band min/max values (internally known and possibly computed).
129
130 • Band checksum (if computation asked).
131
132 • Band NODATA value.
133
134 • Band overview resolutions available.
135
136 • Band unit type (i.e.. "meters" or "feet" for elevation bands).
137
138 • Band pseudo-color tables.
139
141 This utility is also callable from C with GDALInfo().
142
143 New in version 2.1.
144
145
147 gdalinfo ~/openev/utm.tif
148 Driver: GTiff/GeoTIFF
149 Size is 512, 512
150 Coordinate System is:
151 PROJCS["NAD27 / UTM zone 11N",
152 GEOGCS["NAD27",
153 DATUM["North_American_Datum_1927",
154 SPHEROID["Clarke 1866",6378206.4,294.978698213901]],
155 PRIMEM["Greenwich",0],
156 UNIT["degree",0.0174532925199433]],
157 PROJECTION["Transverse_Mercator"],
158 PARAMETER["latitude_of_origin",0],
159 PARAMETER["central_meridian",-117],
160 PARAMETER["scale_factor",0.9996],
161 PARAMETER["false_easting",500000],
162 PARAMETER["false_northing",0],
163 UNIT["metre",1]]
164 Origin = (440720.000000,3751320.000000)
165 Pixel Size = (60.000000,-60.000000)
166 Corner Coordinates:
167 Upper Left ( 440720.000, 3751320.000) (117d38'28.21"W, 33d54'8.47"N)
168 Lower Left ( 440720.000, 3720600.000) (117d38'20.79"W, 33d37'31.04"N)
169 Upper Right ( 471440.000, 3751320.000) (117d18'32.07"W, 33d54'13.08"N)
170 Lower Right ( 471440.000, 3720600.000) (117d18'28.50"W, 33d37'35.61"N)
171 Center ( 456080.000, 3735960.000) (117d28'27.39"W, 33d45'52.46"N)
172 Band 1 Block=512x16 Type=Byte, ColorInterp=Gray
173
174 Example of JSON output with gdalinfo -json byte.tif
175
176 {
177 "description":"byte.tif",
178 "driverShortName":"GTiff",
179 "driverLongName":"GeoTIFF",
180 "files":[
181 "byte.tif"
182 ],
183 "size":[
184 20,
185 20
186 ],
187 "coordinateSystem":{
188 "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[\"UTM zone 11N\",\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[\"(E)\",east,\n ORDER[1],\n LENGTHUNIT[\"metre\",1]],\n AXIS[\"(N)\",north,\n ORDER[2],\n LENGTHUNIT[\"metre\",1]],\n USAGE[\n SCOPE[\"Engineering survey, topographic mapping.\"],\n AREA[\"North America - between 120°W and 114°W - onshore. Canada - Alberta; British Columbia; Northwest Territories; Nunavut. Mexico. United States (USA) - California; Idaho; Nevada; Oregon; Washington.\"],\n BBOX[26.93,-120,78.13,-114]],\n ID[\"EPSG\",26711]]",
189 "dataAxisToSRSAxisMapping":[
190 1,
191 2
192 ]
193 },
194 "geoTransform":[
195 440720.0,
196 60.0,
197 0.0,
198 3751320.0,
199 0.0,
200 -60.0
201 ],
202 "metadata":{
203 "":{
204 "AREA_OR_POINT":"Area"
205 },
206 "IMAGE_STRUCTURE":{
207 "INTERLEAVE":"BAND"
208 }
209 },
210 "cornerCoordinates":{
211 "upperLeft":[
212 440720.0,
213 3751320.0
214 ],
215 "lowerLeft":[
216 440720.0,
217 3750120.0
218 ],
219 "lowerRight":[
220 441920.0,
221 3750120.0
222 ],
223 "upperRight":[
224 441920.0,
225 3751320.0
226 ],
227 "center":[
228 441320.0,
229 3750720.0
230 ]
231 },
232 "wgs84Extent":{
233 "type":"Polygon",
234 "coordinates":[
235 [
236 [
237 -117.6420428,
238 33.9023684
239 ],
240 [
241 -117.6419617,
242 33.8915461
243 ],
244 [
245 -117.6289846,
246 33.8916131
247 ],
248 [
249 -117.629064,
250 33.9024353
251 ],
252 [
253 -117.6420428,
254 33.9023684
255 ]
256 ]
257 ]
258 },
259 "bands":[
260 {
261 "band":1,
262 "block":[
263 20,
264 20
265 ],
266 "type":"Byte",
267 "colorInterpretation":"Gray",
268 "metadata":{
269 }
270 }
271 ],
272 "stac":{
273 "proj:shape":[
274 20,
275 20
276 ],
277 "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[\"UTM zone 11N\",\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[\"(E)\",east,\n ORDER[1],\n LENGTHUNIT[\"metre\",1]],\n AXIS[\"(N)\",north,\n ORDER[2],\n LENGTHUNIT[\"metre\",1]],\n USAGE[\n SCOPE[\"Engineering survey, topographic mapping.\"],\n AREA[\"North America - between 120°W and 114°W - onshore. Canada - Alberta; British Columbia; Northwest Territories; Nunavut. Mexico. United States (USA) - California; Idaho; Nevada; Oregon; Washington.\"],\n BBOX[26.93,-120,78.13,-114]],\n ID[\"EPSG\",26711]]",
278 "proj:epsg":26711,
279 "proj:projjson":{
280 "$schema":"https://proj.org/schemas/v0.6/projjson.schema.json",
281 "type":"ProjectedCRS",
282 "name":"NAD27 / UTM zone 11N",
283 "base_crs":{
284 "name":"NAD27",
285 "datum":{
286 "type":"GeodeticReferenceFrame",
287 "name":"North American Datum 1927",
288 "ellipsoid":{
289 "name":"Clarke 1866",
290 "semi_major_axis":6378206.4,
291 "semi_minor_axis":6356583.8
292 }
293 },
294 "coordinate_system":{
295 "subtype":"ellipsoidal",
296 "axis":[
297 {
298 "name":"Geodetic latitude",
299 "abbreviation":"Lat",
300 "direction":"north",
301 "unit":"degree"
302 },
303 {
304 "name":"Geodetic longitude",
305 "abbreviation":"Lon",
306 "direction":"east",
307 "unit":"degree"
308 }
309 ]
310 },
311 "id":{
312 "authority":"EPSG",
313 "code":4267
314 }
315 },
316 "conversion":{
317 "name":"UTM zone 11N",
318 "method":{
319 "name":"Transverse Mercator",
320 "id":{
321 "authority":"EPSG",
322 "code":9807
323 }
324 },
325 "parameters":[
326 {
327 "name":"Latitude of natural origin",
328 "value":0,
329 "unit":"degree",
330 "id":{
331 "authority":"EPSG",
332 "code":8801
333 }
334 },
335 {
336 "name":"Longitude of natural origin",
337 "value":-117,
338 "unit":"degree",
339 "id":{
340 "authority":"EPSG",
341 "code":8802
342 }
343 },
344 {
345 "name":"Scale factor at natural origin",
346 "value":0.9996,
347 "unit":"unity",
348 "id":{
349 "authority":"EPSG",
350 "code":8805
351 }
352 },
353 {
354 "name":"False easting",
355 "value":500000,
356 "unit":"metre",
357 "id":{
358 "authority":"EPSG",
359 "code":8806
360 }
361 },
362 {
363 "name":"False northing",
364 "value":0,
365 "unit":"metre",
366 "id":{
367 "authority":"EPSG",
368 "code":8807
369 }
370 }
371 ]
372 },
373 "coordinate_system":{
374 "subtype":"Cartesian",
375 "axis":[
376 {
377 "name":"Easting",
378 "abbreviation":"E",
379 "direction":"east",
380 "unit":"metre"
381 },
382 {
383 "name":"Northing",
384 "abbreviation":"N",
385 "direction":"north",
386 "unit":"metre"
387 }
388 ]
389 },
390 "scope":"Engineering survey, topographic mapping.",
391 "area":"North America - between 120°W and 114°W - onshore. Canada - Alberta; British Columbia; Northwest Territories; Nunavut. Mexico. United States (USA) - California; Idaho; Nevada; Oregon; Washington.",
392 "bbox":{
393 "south_latitude":26.93,
394 "west_longitude":-120,
395 "north_latitude":78.13,
396 "east_longitude":-114
397 },
398 "id":{
399 "authority":"EPSG",
400 "code":26711
401 }
402 },
403 "proj:transform":[
404 440720.0,
405 60.0,
406 0.0,
407 3751320.0,
408 0.0,
409 -60.0
410 ],
411 "raster:bands":[
412 {
413 "data_type":"uint8"
414 }
415 ],
416 "eo:bands":[
417 {
418 "name":"b1",
419 "description":"Gray"
420 }
421 ]
422 }
423 }
424
426 Frank Warmerdam <warmerdam@pobox.com>
427
429 1998-2023
430
431
432
433
434 Oct 30, 2023 GDALINFO(1)