Loading

GDAL——命令使用专题——gdalinfo命令

GDAL——命令使用专题——gdalinfo命令

 前言

  GDAL(Geospatial Data Abstraction Library)是一个在X/MIT许可协议下的开源栅格空间数据转换库。它利用抽象数据模型来表达所支持的各种文件格式。它还有一系列命令行工具来进行数据转换和处理。

  主要针对:ogrinfo命令gdalinfo命令gdalsrsinfo命令gdallocationinfo命令gdal_translate命令gdaltransform命令 等。这一节讨论gdalinfo命令。

  gdalinfo命令主要是查询、操作栅格数据信息。

  上一篇针对ogrinfo命令做了针对性讲解,见《GDAL——命令使用专题——ogrinfo命令》。

  软件环境:在安装Mapserver时集成安装。详见《MapServer Configuring with IIS》。

  

gdalinfo --formats

  数据格式支持

应用数据类型 数据类型 操作权限 说明
 BAG -raster- (ro)  Bathymetry Attributed Grid
 FITS -raster- (rw+)  Flexible Image Transport System
 GeoRaster -raster- (rw+s)  Oracle Spatial GeoRaster
 GMT -raster- (rw)  GMT NetCDF Grid Format
 HDF4 -raster- (ros)  Hierarchical Data Format Release 4
 HDF4Image -raster- (rw+)  HDF4 Dataset
 HDF5 -raster- (ros)  Hierarchical Data Format Release 5
 HDF5Image -raster- (ro)  HDF5 Dataset
 KEA -raster- (rw+)  KEA Image Format (.kea)
 MG4Lidar -raster- (ro)  MrSID Generation 4 / Lidar (.sid)
 MrSID -raster- (rov)  Multi-resolution Seamless Image Database (MrSID)
 netCDF -raster,vector- (rw+s)  Network Common Data Format
 VRT -raster- (rw+v)  Virtual Raster
 DERIVED -raster- (ro)  Derived datasets using VRT pixel functions
 GTiff -raster- (rw+vs)  GeoTIFF
 NITF -raster- (rw+vs)  National Imagery Transmission Format
 RPFTOC -raster- (rovs)  Raster Product Format TOC format
 ECRGTOC -raster- (rovs)  ECRG TOC format
 HFA -raster- (rw+v)  Erdas Imagine Images (.img)
 SAR_CEOS -raster- (rov)  CEOS SAR Image
 CEOS -raster- (rov)  CEOS Image
 JAXAPALSAR -raster- (rov)  JAXA PALSAR Product Reader (Level 1.1/1.5)
 GFF -raster- (rov)  Ground-based SAR Applications Testbed File Format (.gff)
 ELAS -raster- (rw+v)  ELAS
 AIG -raster- (rov)  Arc/Info Binary Grid
 AAIGrid -raster- (rwv)  Arc/Info ASCII Grid
 GRASSASCIIGrid -raster- (rov)  GRASS ASCII Grid
 SDTS -raster- (rov)  SDTS Raster
 DTED -raster- (rwv)  DTED Elevation Raster
 PNG -raster- (rwv)  Portable Network Graphics
 JPEG -raster- (rwv)  JPEG JFIF
 MEM -raster- (rw+)  In Memory Raster
 JDEM -raster- (rov)  Japanese DEM (.mem)
 GIF -raster- (rwv)  Graphics Interchange Format (.gif)
 BIGGIF -raster- (rov)  Graphics Interchange Format (.gif)
 ESAT -raster- (rov)  Envisat Image Format
 BSB -raster- (rov)  Maptech BSB Nautical Charts
 XPM -raster- (rwv)  X11 PixMap Format
 BMP -raster- (rw+v)  MS Windows Device Independent Bitmap
 DIMAP -raster- (rov)  SPOT DIMAP
 AirSAR -raster- (rov)  AirSAR Polarimetric Image
 RS2 -raster- (rovs)  RadarSat 2 XML Product
 SAFE -raster- (rov)  Sentinel-1 SAR SAFE Product
 PCIDSK -raster,vector- (rw+v)  PCIDSK Database File
 PCRaster -raster- (rw+)  PCRaster Raster File
 ILWIS -raster- (rw+v)  ILWIS Raster Map
 SGI -raster- (rw+v)  SGI Image File Format 1.0
 SRTMHGT -raster- (rwv)  SRTMHGT File Format
 Leveller -raster- (rw+v)  Leveller heightfield
 Terragen -raster- (rw+v)  Terragen heightfield
 ISIS3 -raster- (rw+v)  USGS Astrogeology ISIS cube (Version 3)
 ISIS2 -raster- (rw+v)  USGS Astrogeology ISIS cube (Version 2)
 PDS -raster- (rov)  NASA Planetary Data System
 PDS4 -raster- (rw+vs)  NASA Planetary Data System 4
 VICAR -raster- (rov)  MIPL VICAR file
 TIL -raster- (rov)  EarthWatch .TIL
 ERS -raster- (rw+v)  ERMapper .ers Labelled
 JP2OpenJPEG -raster,vector- (rwv)  JPEG-2000 driver based on OpenJPEG library
 L1B -raster- (rovs)  NOAA Polar Orbiter Level 1b Data Set
 FIT -raster- (rwv)  FIT Image
 GRIB -raster- (rwv)  GRIdded Binary (.grb, .grb2)
 RMF -raster- (rw+v)  Raster Matrix Format
 WCS -raster- (rovs)  OGC Web Coverage Service
 WMS -raster- (rwvs)  OGC Web Map Service
 MSGN -raster- (rov)  EUMETSAT Archive native (.nat)
 RST -raster- (rw+v)  Idrisi Raster A.1
 INGR -raster- (rw+v)  Intergraph Raster
 GSAG -raster- (rwv)  Golden Software ASCII Grid (.grd)
 GSBG -raster- (rw+v)  Golden Software Binary Grid (.grd)
 GS7BG -raster- (rw+v)  Golden Software 7 Binary Grid (.grd)
 COSAR -raster- (rov)  COSAR Annotated Binary Matrix (TerraSAR-X)
 TSX -raster- (rov)  TerraSAR-X Product
 COASP -raster- (ro)  DRDC COASP SAR Processor Raster
 R -raster- (rwv)  R Object Data Store
 MAP -raster- (rov)  OziExplorer .MAP
 KMLSUPEROVERLAY -raster- (rwv)  Kml Super Overlay
 PDF -raster,vector- (rw+vs)  Geospatial PDF
 Rasterlite -raster- (rwvs)  Rasterlite
 MBTiles -raster,vector- (rw+v)  MBTiles
 PLMOSAIC -raster- (ro)  Planet Labs Mosaics API
 CALS -raster- (rwv)  CALS (Type 1)
 WMTS -raster- (rwv)  OGC Web Map Tile Service
 SENTINEL2 -raster- (rovs)  Sentinel 2
 MRF -raster- (rw+v)  Meta Raster Format
 PNM -raster- (rw+v)  Portable Pixmap Format (netpbm)
 DOQ1 -raster- (rov)  USGS DOQ (Old Style)
 DOQ2 -raster- (rov)  USGS DOQ (New Style)
 PAux -raster- (rw+v)  PCI .aux Labelled
 MFF -raster- (rw+v)  Vexcel MFF Raster
 MFF2 -raster- (rw+)  Vexcel MFF2 (HKV) Raster
 FujiBAS -raster- (rov)  Fuji BAS Scanner Image
 GSC -raster- (rov)  GSC Geogrid
 FAST -raster- (rov)  EOSAT FAST Format
 BT -raster- (rw+v)  VTP .bt (Binary Terrain) 1.3 Format
 LAN -raster- (rw+v)  Erdas .LAN/.GIS
 CPG -raster- (rov)  Convair PolGASP
 IDA -raster- (rw+v)  Image Data and Analysis
 NDF -raster- (rov)  NLAPS Data Format
 EIR -raster- (rov)  Erdas Imagine Raw
 DIPEx -raster- (rov)  DIPEx
 LCP -raster- (rwv)  FARSITE v.4 Landscape File (.lcp)
 GTX -raster- (rw+v)  NOAA Vertical Datum .GTX
 LOSLAS -raster- (rov)  NADCON .los/.las Datum Grid Shift
 NTv2 -raster- (rw+vs)  NTv2 Datum Grid Shift
 CTable2 -raster- (rw+v)  CTable2 Datum Grid Shift
 ACE2 -raster- (rov)  ACE2
 SNODAS -raster- (rov)  Snow Data Assimilation System
 KRO -raster- (rw+v)  KOLOR Raw
 ROI_PAC -raster- (rw+v)  ROI_PAC raster
 RRASTER -raster- (rw+v)  R Raster
 ARG -raster- (rwv)  Azavea Raster Grid format
 RIK -raster- (rov)  Swedish Grid RIK (.rik)
 USGSDEM -raster- (rwv)  USGS Optional ASCII DEM (and CDED)
 GXF -raster- (rov)  GeoSoft Grid Exchange Format
 NWT_GRD -raster- (rw+v)  Northwood Numeric Grid Format .grd/.tab
 NWT_GRC -raster- (rov)  Northwood Classified Grid Format .grc/.tab
 ADRG -raster- (rw+vs)  ARC Digitized Raster Graphics
 SRP -raster- (rovs)  Standard Raster Product (ASRP/USRP)
 BLX -raster- (rwv)  Magellan topo (.blx)
 PostGISRaster -raster- (rws)  PostGIS Raster driver
 SAGA -raster- (rw+v)  SAGA GIS Binary Grid (.sdat, .sg-grd-z)
 XYZ -raster- (rwv)  ASCII Gridded XYZ
 HF2 -raster- (rwv)  HF2/HFZ heightfield raster
 OZI -raster- (rov)  OziExplorer Image File
 CTG -raster- (rov)  USGS LULC Composite Theme Grid
 E00GRID -raster- (rov)  Arc/Info Export E00 GRID
 ZMap -raster- (rwv)  ZMap Plus Grid
 NGSGEOID -raster- (rov)  NOAA NGS Geoid Height Grids
 IRIS -raster- (rov)  IRIS data (.PPI, .CAPPi etc)
 PRF -raster- (rov)  Racurs PHOTOMOD PRF
 RDA -raster- (ro)  DigitalGlobe Raster Data Access driver
 DB2ODBC -raster,vector- (rw+)  IBM DB2 Spatial Database
 GPKG -raster,vector- (rw+vs)  GeoPackage
 CAD -raster,vector- (rovs)  AutoCAD Driver
 PLSCENES -raster,vector- (ro)  Planet Labs Scenes API
 GenBin -raster- (rov)  Generic Binary (.hdr Labelled)
 ENVI -raster- (rw+v)  ENVI .hdr Labelled
 EHdr -raster- (rw+v)  ESRI .hdr Labelled
 ISCE -raster- (rw+v)  ISCE raster
 HTTP -raster,vector- (ro)  HTTP Fetching Wrapper
   

   说明:

    • raster:栅格数据
    • vector:矢量数据
    • ro:read only
    • rw:read and write 、upports CreateCopy
    • rw+:read, write and update (i.e. supports Create)read, write and update (i.e. supports Create)
    • s:数据子集(appended for formats supporting subdatasets)
    • v:虚拟读写(appended for formats supporting virtual IO (/vsimem, /vsigzip, /vsizip, etc))
    • gdalinfo --format "BAG":查询BAG格式数据详情

--gdalinfo --help-general

  通用命令

Generic GDAL utility command options:
  --version: report version of GDAL in use.
  --license: report GDAL license info.
  --formats: report all configured format drivers.
  --format [format]: details of one format.
  --optfile filename: expand an option file into the argument list.
  --config key value: set system configuration option.
  --debug [on/off/value]: set debug level.
  --pause: wait for user input, time to attach debugger
  --locale [locale]: install locale for debugging (i.e. en_US.UTF-8)
  --help-general: report detailed help on general options.

 

  详细使用方法见:《GDAL——命令使用专题——ogrinfo命令》中相关命令。

用法语

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

   关于使用的数据文件,请通过连接:http://download.osgeo.org/mapserver/docs/mapserver-tutorial.zip 下载。

命令详解

  -json:将读取数据转json格式输出。

#在cmd中输入:gdalinfo -json mod09a12003161_ugl_ll_8bit.tif 转换为json格式输出

{
  "description":"mod09a12003161_ugl_ll_8bit.tif",
  "driverShortName":"GTiff",
  "driverLongName":"GeoTIFF",
  "files":["mod09a12003161_ugl_ll_8bit.tif"],
  "size":[3480,1740],
  "coordinateSystem":{
    "wkt":"GEOGCS["WGS 84",
        DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
        AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4326"]]" }, "geoTransform":[ -97.3743368400096188, 0.0047330569605305,0.0,49.4159185957790754,0.0,-0.0047330569605305], "metadata":{ "":{ "AREA_OR_POINT":"Area", "TIFFTAG_RESOLUTIONUNIT":"1 (unitless)", "TIFFTAG_SOFTWARE":"ERDAS IMAGINE", "TIFFTAG_XRESOLUTION":"1", "TIFFTAG_YRESOLUTION":"1" }, "IMAGE_STRUCTURE":{ "INTERLEAVE":"PIXEL" } }, "cornerCoordinates":{ "upperLeft":[-97.3743368,49.4159186], "lowerLeft":[-97.3743368,41.1803995], "lowerRight":[-80.9032986,41.1803995], "upperRight":[-80.9032986,49.4159186], "center":[-89.1388177,45.298159] }, "wgs84Extent":{ "type":"Polygon", "coordinates":[ [ [-97.3743368,49.4159186], [-97.3743368,41.1803995], [-80.9032986,41.1803995], [-80.9032986,49.4159186], [-97.3743368,49.4159186] ] ] }, "bands":[ { "band":1, "block":[3480,8], "type":"Byte", "colorInterpretation":"Red", "metadata":{} }, { "band":2, "block":[3480,8], "type":"Byte", "colorInterpretation":"Green", "metadata":{} }, { "band":3, "block":[3480,8], "type":"Byte", "colorInterpretation":"Blue", "metadata":{} } ] }

 

  -mm:计算数据集中每个波段的实际最小/最大值。

#在cmd中输入:gdalinfo -mm mod09a12003161_ugl_ll_8bit.tif

Driver: GTiff/GeoTIFF
Files: mod09a12003161_ugl_ll_8bit.tif
Size is 3480, 1740
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (-97.374336840009619,49.415918595779075)
Pixel Size = (0.004733056960530,-0.004733056960530)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_RESOLUTIONUNIT=1 (unitless)
  TIFFTAG_SOFTWARE=ERDAS IMAGINE
  TIFFTAG_XRESOLUTION=1
  TIFFTAG_YRESOLUTION=1
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  ( -97.3743368,  49.4159186) ( 97d22'27.61"W, 49d24'57.31"N)
Lower Left  ( -97.3743368,  41.1803995) ( 97d22'27.61"W, 41d10'49.44"N)
Upper Right ( -80.9032986,  49.4159186) ( 80d54'11.88"W, 49d24'57.31"N)
Lower Right ( -80.9032986,  41.1803995) ( 80d54'11.88"W, 41d10'49.44"N)
Center      ( -89.1388177,  45.2981590) ( 89d 8'19.74"W, 45d17'53.37"N)
Band 1 Block=3480x8 Type=Byte, ColorInterp=Red
    Computed Min/Max=71.000,255.000
Band 2 Block=3480x8 Type=Byte, ColorInterp=Green
    Computed Min/Max=74.000,255.000
Band 3 Block=3480x8 Type=Byte, ColorInterp=Blue
    Computed Min/Max=65.000,255.000

 

  -stats:读取和显示图像统计信息。如果图像中没有存储统计信息,则强制计算。

#在cmd中输入:gdalinfo -stats mod09a12003161_ugl_ll_8bit.tif

Driver: GTiff/GeoTIFF
Files: mod09a12003161_ugl_ll_8bit.tif
Size is 3480, 1740
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (-97.374336840009619,49.415918595779075)
Pixel Size = (0.004733056960530,-0.004733056960530)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_RESOLUTIONUNIT=1 (unitless)
  TIFFTAG_SOFTWARE=ERDAS IMAGINE
  TIFFTAG_XRESOLUTION=1
  TIFFTAG_YRESOLUTION=1
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  ( -97.3743368,  49.4159186) ( 97d22'27.61"W, 49d24'57.31"N)
Lower Left  ( -97.3743368,  41.1803995) ( 97d22'27.61"W, 41d10'49.44"N)
Upper Right ( -80.9032986,  49.4159186) ( 80d54'11.88"W, 49d24'57.31"N)
Lower Right ( -80.9032986,  41.1803995) ( 80d54'11.88"W, 41d10'49.44"N)
Center      ( -89.1388177,  45.2981590) ( 89d 8'19.74"W, 45d17'53.37"N)
Band 1 Block=3480x8 Type=Byte, ColorInterp=Red
  Minimum=71.000, Maximum=255.000, Mean=127.351, StdDev=63.617
  Metadata:
    STATISTICS_MAXIMUM=255
    STATISTICS_MEAN=127.35112762584
    STATISTICS_MINIMUM=71
    STATISTICS_STDDEV=63.617218753897
Band 2 Block=3480x8 Type=Byte, ColorInterp=Green
  Minimum=74.000, Maximum=255.000, Mean=125.841, StdDev=58.532
  Metadata:
    STATISTICS_MAXIMUM=255
    STATISTICS_MEAN=125.84129227771
    STATISTICS_MINIMUM=74
    STATISTICS_STDDEV=58.531957864514
Band 3 Block=3480x8 Type=Byte, ColorInterp=Blue
  Minimum=65.000, Maximum=255.000, Mean=126.632, StdDev=62.041
  Metadata:
    STATISTICS_MAXIMUM=255
    STATISTICS_MEAN=126.63214262122
    STATISTICS_MINIMUM=65
    STATISTICS_STDDEV=62.041498751993

 

  -approx_stats:读取和显示图像统计信息。如果图像中没有存储统计信息,则强制计算。如果不需要精确数据,可以基于概览或所有tile的子集来计算。

#在cmd中输入:gdalinfo -approx_stats mod09a12003161_ugl_ll_8bit.tif

Driver: GTiff/GeoTIFF
Files: mod09a12003161_ugl_ll_8bit.tif
       mod09a12003161_ugl_ll_8bit.tif.aux.xml  #生成了一个概要信息xml文件
Size is 3480, 1740
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (-97.374336840009619,49.415918595779075)
Pixel Size = (0.004733056960530,-0.004733056960530)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_RESOLUTIONUNIT=1 (unitless)
  TIFFTAG_SOFTWARE=ERDAS IMAGINE
  TIFFTAG_XRESOLUTION=1
  TIFFTAG_YRESOLUTION=1
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  ( -97.3743368,  49.4159186) ( 97d22'27.61"W, 49d24'57.31"N)
Lower Left  ( -97.3743368,  41.1803995) ( 97d22'27.61"W, 41d10'49.44"N)
Upper Right ( -80.9032986,  49.4159186) ( 80d54'11.88"W, 49d24'57.31"N)
Lower Right ( -80.9032986,  41.1803995) ( 80d54'11.88"W, 41d10'49.44"N)
Center      ( -89.1388177,  45.2981590) ( 89d 8'19.74"W, 45d17'53.37"N)
Band 1 Block=3480x8 Type=Byte, ColorInterp=Red
  Min=71.000 Max=255.000
  Minimum=71.000, Maximum=255.000, Mean=127.351, StdDev=63.617
  Metadata:
    STATISTICS_MAXIMUM=255
    STATISTICS_MEAN=127.35112762584
    STATISTICS_MINIMUM=71
    STATISTICS_STDDEV=63.617218753897
Band 2 Block=3480x8 Type=Byte, ColorInterp=Green
  Min=74.000 Max=255.000
  Minimum=74.000, Maximum=255.000, Mean=125.841, StdDev=58.532
  Metadata:
    STATISTICS_MAXIMUM=255
    STATISTICS_MEAN=125.84129227771
    STATISTICS_MINIMUM=74
    STATISTICS_STDDEV=58.531957864514
Band 3 Block=3480x8 Type=Byte, ColorInterp=Blue
  Min=65.000 Max=255.000
  Minimum=65.000, Maximum=255.000, Mean=126.632, StdDev=62.041
  Metadata:
    STATISTICS_MAXIMUM=255
    STATISTICS_MEAN=126.63214262122
    STATISTICS_MINIMUM=65
    STATISTICS_STDDEV=62.041498751993

 

<!--创建出来的xml文件-->
<
PAMDataset> <PAMRasterBand band="1"> <Metadata> <MDI key="STATISTICS_MAXIMUM">255</MDI> <MDI key="STATISTICS_MEAN">127.35112762584</MDI> <MDI key="STATISTICS_MINIMUM">71</MDI> <MDI key="STATISTICS_STDDEV">63.617218753897</MDI> </Metadata> </PAMRasterBand> <PAMRasterBand band="2"> <Metadata> <MDI key="STATISTICS_MAXIMUM">255</MDI> <MDI key="STATISTICS_MEAN">125.84129227771</MDI> <MDI key="STATISTICS_MINIMUM">74</MDI> <MDI key="STATISTICS_STDDEV">58.531957864514</MDI> </Metadata> </PAMRasterBand> <PAMRasterBand band="3"> <Metadata> <MDI key="STATISTICS_MAXIMUM">255</MDI> <MDI key="STATISTICS_MEAN">126.63214262122</MDI> <MDI key="STATISTICS_MINIMUM">65</MDI> <MDI key="STATISTICS_STDDEV">62.041498751993</MDI> </Metadata> </PAMRasterBand> </PAMDataset>

 

  -hist:生成所有波段的直方图报告信息。

#在cmd中输入:gdalinfo -hist mod09a12003161_ugl_ll_8bit.tif

Driver: GTiff/GeoTIFF
Files: mod09a12003161_ugl_ll_8bit.tif
       mod09a12003161_ugl_ll_8bit.tif.aux.xml    #生成的xml文件
Size is 3480, 1740
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (-97.374336840009619,49.415918595779075)
Pixel Size = (0.004733056960530,-0.004733056960530)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_RESOLUTIONUNIT=1 (unitless)
  TIFFTAG_SOFTWARE=ERDAS IMAGINE
  TIFFTAG_XRESOLUTION=1
  TIFFTAG_YRESOLUTION=1
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  ( -97.3743368,  49.4159186) ( 97d22'27.61"W, 49d24'57.31"N)
Lower Left  ( -97.3743368,  41.1803995) ( 97d22'27.61"W, 41d10'49.44"N)
Upper Right ( -80.9032986,  49.4159186) ( 80d54'11.88"W, 49d24'57.31"N)
Lower Right ( -80.9032986,  41.1803995) ( 80d54'11.88"W, 41d10'49.44"N)
Center      ( -89.1388177,  45.2981590) ( 89d 8'19.74"W, 45d17'53.37"N)
Band 1 Block=3480x8 Type=Byte, ColorInterp=Red
  Min=71.000 Max=255.000
  Minimum=71.000, Maximum=255.000, Mean=127.351, StdDev=63.617
0...10...20...30...40...50...60...70...80...90...100 - done.
  256 buckets from -0.5 to 255.5:
  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2546809 205 0 10784 204005 321359 0 102781 34713 27323 0 18828 9576 6359 4766 0 4060 3468 2995 0 2697 2412 2476 0 3114 2025 2058 0 2448 3201 3154 0 1957 1709 1871 2087 0 2106 1966 1813 0 1971 1932 2124 0 2173 2199 2388 0 2522 2304 2592 2937 0 3290 3408 3815 0 4217 5105 5287 0 5923 6654 7672 0 8282 9382 10260 11578 0 12169 13372 14105 0 15054 15635 16055 0 16717 17515 17835 0 18238 19126 19656 19940 0 20362 21236 21884 0 22606 22894 23705 0 25630 25871 26671 0 28642 30235 30879 31852 0 34182 34545 35538 0 37209 39698 39864 0 41392 43008 46048 0 45677 46483 47973 50442 0 49155 50472 50804 0 53178 51920 52343 0 52185 54229 52207 0 51254 51175 52009 50066 0 48282 46765 47638 0 43989 42850 40753 0 39912 36596 34640 0 32558 31528 29814 0 27604 25756 25088 22551 0 21542 20521 19187 0 17587 16581 15660 0 14844 12888 12344 0 11299 10378 9739 8855 0 8445 7287 6625 0 6141 5656 5171 44046
  Metadata:
    STATISTICS_MAXIMUM=255
    STATISTICS_MEAN=127.35112762584
    STATISTICS_MINIMUM=71
    STATISTICS_STDDEV=63.617218753897
Band 2 Block=3480x8 Type=Byte, ColorInterp=Green
  Min=74.000 Max=255.000
  Minimum=74.000, Maximum=255.000, Mean=125.841, StdDev=58.532
0...10...20...30...40...50...60...70...80...90...100 - done.
  256 buckets from -0.5 to 255.5:
  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2548311 0 0 0 0 8256 0 0 0 0 0 39077 0 0 0 0 0 134637 0 0 0 0 330770 0 0 0 0 0 156551 0 0 0 0 0 44353 0 0 0 0 0 29599 0 0 0 0 46427 0 0 0 0 0 80183 0 0 0 0 0 129762 0 0 0 0 175866 0 0 0 0 0 206347 0 0 0 0 0 196923 0 0 0 0 177856 0 0 0 0 0 150421 0 0 0 0 0 138376 0 0 0 0 0 120013 0 0 0 0 109888 0 0 0 0 0 103964 0 0 0 0 0 92611 0 0 0 0 89297 0 0 0 0 0 82351 0 0 0 0 0 80633 0 0 0 0 0 75891 0 0 0 0 75721 0 0 0 0 0 70638 0 0 0 0 0 69561 0 0 0 0 62096 0 0 0 0 0 57576 0 0 0 0 0 49361 0 0 0 0 44828 0 0 0 0 277056
  Metadata:
    STATISTICS_MAXIMUM=255
    STATISTICS_MEAN=125.84129227771
    STATISTICS_MINIMUM=74
    STATISTICS_STDDEV=58.531957864514
Band 3 Block=3480x8 Type=Byte, ColorInterp=Blue
  Min=65.000 Max=255.000
  Minimum=65.000, Maximum=255.000, Mean=126.632, StdDev=62.041
0...10...20...30...40...50...60...70...80...90...100 - done.
  256 buckets from -0.5 to 255.5:
  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2546770 0 0 0 0 0 9 0 0 0 0 31 0 0 0 0 0 1118 0 0 0 0 17499 0 0 0 0 60662 0 0 0 0 0 157738 0 0 0 0 193171 0 0 0 0 167132 0 0 0 0 0 68977 0 0 0 0 44071 0 0 0 0 0 22446 0 0 0 0 24043 0 0 0 0 33477 0 0 0 0 0 51788 0 0 0 0 78813 0 0 0 0 99862 0 0 0 0 0 124114 0 0 0 0 161637 0 0 0 0 192497 0 0 0 0 0 220448 0 0 0 0 222291 0 0 0 0 0 216215 0 0 0 0 204474 0 0 0 0 176557 0 0 0 0 0 162568 0 0 0 0 137747 0 0 0 0 115134 0 0 0 0 0 98043 0 0 0 0 80529 0 0 0 0 0 66793 0 0 0 0 53615 0 0 0 0 44621 0 0 0 0 0 38139 0 0 0 0 30184 0 0 0 0 25721 0 116266
  Metadata:
    STATISTICS_MAXIMUM=255
    STATISTICS_MEAN=126.63214262122
    STATISTICS_MINIMUM=65
    STATISTICS_STDDEV=62.041498751993

 

<PAMDataset>
  <PAMRasterBand band="1">
    <Histograms>
      <HistItem>
        <HistMin>-0.5</HistMin>
        <HistMax>255.5</HistMax>
        <BucketCount>256</BucketCount>
        <IncludeOutOfRange>1</IncludeOutOfRange>
        <Approximate>0</Approximate>
        <HistCounts>0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|2546809|205|0|10784|204005|321359|0|102781|34713|27323|0|18828|9576|6359|4766|0|4060|3468|2995|0|2697|2412|2476|0|3114|2025|2058|0|2448|3201|3154|0|1957|1709|1871|2087|0|2106|1966|1813|0|1971|1932|2124|0|2173|2199|2388|0|2522|2304|2592|2937|0|3290|3408|3815|0|4217|5105|5287|0|5923|6654|7672|0|8282|9382|10260|11578|0|12169|13372|14105|0|15054|15635|16055|0|16717|17515|17835|0|18238|19126|19656|19940|0|20362|21236|21884|0|22606|22894|23705|0|25630|25871|26671|0|28642|30235|30879|31852|0|34182|34545|35538|0|37209|39698|39864|0|41392|43008|46048|0|45677|46483|47973|50442|0|49155|50472|50804|0|53178|51920|52343|0|52185|54229|52207|0|51254|51175|52009|50066|0|48282|46765|47638|0|43989|42850|40753|0|39912|36596|34640|0|32558|31528|29814|0|27604|25756|25088|22551|0|21542|20521|19187|0|17587|16581|15660|0|14844|12888|12344|0|11299|10378|9739|8855|0|8445|7287|6625|0|6141|5656|5171|44046</HistCounts>
      </HistItem>
    </Histograms>
    <Metadata>
      <MDI key="STATISTICS_MAXIMUM">255</MDI>
      <MDI key="STATISTICS_MEAN">127.35112762584</MDI>
      <MDI key="STATISTICS_MINIMUM">71</MDI>
      <MDI key="STATISTICS_STDDEV">63.617218753897</MDI>
    </Metadata>
  </PAMRasterBand>
  <PAMRasterBand band="2">
    <Histograms>
      <HistItem>
        <HistMin>-0.5</HistMin>
        <HistMax>255.5</HistMax>
        <BucketCount>256</BucketCount>
        <IncludeOutOfRange>1</IncludeOutOfRange>
        <Approximate>0</Approximate>
        <HistCounts>0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|2548311|0|0|0|0|8256|0|0|0|0|0|39077|0|0|0|0|0|134637|0|0|0|0|330770|0|0|0|0|0|156551|0|0|0|0|0|44353|0|0|0|0|0|29599|0|0|0|0|46427|0|0|0|0|0|80183|0|0|0|0|0|129762|0|0|0|0|175866|0|0|0|0|0|206347|0|0|0|0|0|196923|0|0|0|0|177856|0|0|0|0|0|150421|0|0|0|0|0|138376|0|0|0|0|0|120013|0|0|0|0|109888|0|0|0|0|0|103964|0|0|0|0|0|92611|0|0|0|0|89297|0|0|0|0|0|82351|0|0|0|0|0|80633|0|0|0|0|0|75891|0|0|0|0|75721|0|0|0|0|0|70638|0|0|0|0|0|69561|0|0|0|0|62096|0|0|0|0|0|57576|0|0|0|0|0|49361|0|0|0|0|44828|0|0|0|0|277056</HistCounts>
      </HistItem>
    </Histograms>
    <Metadata>
      <MDI key="STATISTICS_MAXIMUM">255</MDI>
      <MDI key="STATISTICS_MEAN">125.84129227771</MDI>
      <MDI key="STATISTICS_MINIMUM">74</MDI>
      <MDI key="STATISTICS_STDDEV">58.531957864514</MDI>
    </Metadata>
  </PAMRasterBand>
  <PAMRasterBand band="3">
    <Histograms>
      <HistItem>
        <HistMin>-0.5</HistMin>
        <HistMax>255.5</HistMax>
        <BucketCount>256</BucketCount>
        <IncludeOutOfRange>1</IncludeOutOfRange>
        <Approximate>0</Approximate>
        <HistCounts>0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|2546770|0|0|0|0|0|9|0|0|0|0|31|0|0|0|0|0|1118|0|0|0|0|17499|0|0|0|0|60662|0|0|0|0|0|157738|0|0|0|0|193171|0|0|0|0|167132|0|0|0|0|0|68977|0|0|0|0|44071|0|0|0|0|0|22446|0|0|0|0|24043|0|0|0|0|33477|0|0|0|0|0|51788|0|0|0|0|78813|0|0|0|0|99862|0|0|0|0|0|124114|0|0|0|0|161637|0|0|0|0|192497|0|0|0|0|0|220448|0|0|0|0|222291|0|0|0|0|0|216215|0|0|0|0|204474|0|0|0|0|176557|0|0|0|0|0|162568|0|0|0|0|137747|0|0|0|0|115134|0|0|0|0|0|98043|0|0|0|0|80529|0|0|0|0|0|66793|0|0|0|0|53615|0|0|0|0|44621|0|0|0|0|0|38139|0|0|0|0|30184|0|0|0|0|25721|0|116266</HistCounts>
      </HistItem>
    </Histograms>
    <Metadata>
      <MDI key="STATISTICS_MAXIMUM">255</MDI>
      <MDI key="STATISTICS_MEAN">126.63214262122</MDI>
      <MDI key="STATISTICS_MINIMUM">65</MDI>
      <MDI key="STATISTICS_STDDEV">62.041498751993</MDI>
    </Metadata>
  </PAMRasterBand>
</PAMDataset>

 

  -nogcp:no ground control points,禁止地面控制点列表打印。它对包含大量GCPs的数据集很有用,比如L1B AVHRR或HDF4 MODIS,它们包含数千个GCPs。

  -nomd:不打印元数据。no matedata

#在cmd中输入:gdalinfo -nomd mod09a12003161_ugl_ll_8bit.tif

Driver: GTiff/GeoTIFF
Files: mod09a12003161_ugl_ll_8bit.tif
       mod09a12003161_ugl_ll_8bit.tif.aux.xml
Size is 3480, 1740
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (-97.374336840009619,49.415918595779075)
Pixel Size = (0.004733056960530,-0.004733056960530)
Corner Coordinates:
Upper Left  ( -97.3743368,  49.4159186) ( 97d22'27.61"W, 49d24'57.31"N)
Lower Left  ( -97.3743368,  41.1803995) ( 97d22'27.61"W, 41d10'49.44"N)
Upper Right ( -80.9032986,  49.4159186) ( 80d54'11.88"W, 49d24'57.31"N)
Lower Right ( -80.9032986,  41.1803995) ( 80d54'11.88"W, 41d10'49.44"N)
Center      ( -89.1388177,  45.2981590) ( 89d 8'19.74"W, 45d17'53.37"N)
Band 1 Block=3480x8 Type=Byte, ColorInterp=Red
  Min=71.000 Max=255.000
  Minimum=71.000, Maximum=255.000, Mean=127.351, StdDev=63.617
Band 2 Block=3480x8 Type=Byte, ColorInterp=Green
  Min=74.000 Max=255.000
  Minimum=74.000, Maximum=255.000, Mean=125.841, StdDev=58.532
Band 3 Block=3480x8 Type=Byte, ColorInterp=Blue
  Min=65.000 Max=255.000
  Minimum=65.000, Maximum=255.000, Mean=126.632, StdDev=62.041

 

  -norat:不打印光栅属性表。

  -noct:不打印颜色表。强制计算数据集中每个波段的校验和。

  -checksum:强制计算数据集中每个波段的校验和。

  -listmdd:列出数据集所在域中的所有metadata

  -mdd domain:列出指定域中的metadata

  -nofl:只显示数据集中的第一条数据对象的信息

  -sd subdataset:如果输入数据集包含多个子数据集,则读取并显示指定编号(从1开始)的子数据集。 gdalinfo -sb 1 datasetname

  -proj4:通过数据信息,转换出prog4的坐标文件信息。

#在cmd中输入:gdalinfo -proj4 mod13a12000257evi.tif

Driver: GTiff/GeoTIFF
Files: mod13a12000257evi.tif
Size is 3606, 1807
Coordinate System is:
GEOGCS["Clarke_1866",
    DATUM["Clarke_1866",
        SPHEROID["Clarke 1866",6378206.4,294.9786982138982]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433]]
PROJ.4 string is:
'+proj=longlat +ellps=clrk66 +no_defs '
Origin = (-97.710937299999998,49.574459599999997)
Pixel Size = (0.004724303830000,-0.004724303830000)
...

 

  -oo NAME=VALUE:数据集打开操作项

  datasetname:数据名称

 

posted @ 2019-01-24 13:49  eshinex  阅读(6214)  评论(0编辑  收藏  举报