This function provides an interface mirroring that of the GDAL
command-line app gdalinfo
. For a description of the
utility and the arguments that it takes, see the documentation at
https://gdal.org/programs/gdalinfo.html.
Usage
gdalinfo(
datasetname,
...,
json,
mm,
stats,
approx_stats,
hist,
nogcp,
nomd,
norat,
noct,
nofl,
checksum,
proj4,
listmdd,
mdd,
wkt_format,
sd,
oo,
IF,
dryrun = FALSE,
config_options = character(0),
quiet = FALSE
)
Arguments
- datasetname
Path to a GDAL-supported readable datasource.
- ...
Here, a placeholder argument that forces users to supply exact names of all subsequent formal arguments.
- json, mm, stats, approx_stats, hist, nogcp, nomd, norat, noct
See the GDAL project's gdalinfo documentation for details.
- nofl, checksum, proj4, listmdd, mdd, wkt_format, sd, oo, IF
See the GDAL project's gdalinfo documentation for details.
- dryrun
Logical (default
FALSE
). IfTRUE
, instead of executing the requested call to GDAL, the function will print the command-line call that would produce the equivalent output.- config_options
A named character vector with GDAL config options, of the form
c(option1=value1, option2=value2)
. (See here for a complete list of supported config options.)- quiet
Logical (default
FALSE
). IfTRUE
, suppress printing of output to the console.
Value
Silently returns a character vector containing the information returned by the gdalinfo utility.
Examples
ff <- system.file("extdata/maunga.tif", package = "gdalUtilities")
gdalinfo(ff)
#> Driver: GTiff/GeoTIFF
#> Files: /home/runner/work/_temp/Library/gdalUtilities/extdata/maunga.tif
#> Size is 61, 87
#> Coordinate System is:
#> PROJCRS["NZGD49 / New Zealand Map Grid",
#> BASEGEOGCRS["NZGD49",
#> DATUM["New Zealand Geodetic Datum 1949",
#> ELLIPSOID["International 1924",6378388,297,
#> LENGTHUNIT["metre",1]]],
#> PRIMEM["Greenwich",0,
#> ANGLEUNIT["degree",0.0174532925199433]],
#> ID["EPSG",4272]],
#> CONVERSION["New Zealand Map Grid",
#> METHOD["New Zealand Map Grid",
#> ID["EPSG",9811]],
#> PARAMETER["Latitude of natural origin",-41,
#> ANGLEUNIT["degree",0.0174532925199433],
#> ID["EPSG",8801]],
#> PARAMETER["Longitude of natural origin",173,
#> ANGLEUNIT["degree",0.0174532925199433],
#> ID["EPSG",8802]],
#> PARAMETER["False easting",2510000,
#> LENGTHUNIT["metre",1],
#> ID["EPSG",8806]],
#> PARAMETER["False northing",6023150,
#> LENGTHUNIT["metre",1],
#> ID["EPSG",8807]]],
#> CS[Cartesian,2],
#> AXIS["(E)",east,
#> ORDER[1],
#> LENGTHUNIT["metre",1]],
#> AXIS["(N)",north,
#> ORDER[2],
#> LENGTHUNIT["metre",1]],
#> USAGE[
#> SCOPE["Engineering survey, topographic mapping."],
#> AREA["New Zealand - North Island, South Island, Stewart Island - onshore."],
#> BBOX[-47.33,166.37,-34.1,178.63]],
#> ID["EPSG",27200]]
#> Data axis to CRS axis mapping: 1,2
#> Origin = (2667400.000000000000000,6479570.000000000000000)
#> Pixel Size = (10.000000000000000,-10.000000000000000)
#> Metadata:
#> AREA_OR_POINT=Area
#> Image Structure Metadata:
#> COMPRESSION=LZW
#> INTERLEAVE=BAND
#> Corner Coordinates:
#> Upper Left ( 2667400.000, 6479570.000) (174d45'39.47"E, 36d52'25.92"S)
#> Lower Left ( 2667400.000, 6478700.000) (174d45'40.19"E, 36d52'54.14"S)
#> Upper Right ( 2668010.000, 6479570.000) (174d46' 4.09"E, 36d52'25.52"S)
#> Lower Right ( 2668010.000, 6478700.000) (174d46' 4.81"E, 36d52'53.73"S)
#> Center ( 2667705.000, 6479135.000) (174d45'52.14"E, 36d52'39.83"S)
#> Band 1 Block=61x16 Type=Float64, ColorInterp=Gray
#> Min=94.000 Max=195.000
#> Minimum=94.000, Maximum=195.000, Mean=nan, StdDev=nan
#> NoData Value=-1.69999999999999994e+308
#> Metadata:
#> STATISTICS_MAXIMUM=195
#> STATISTICS_MEAN=1.#SNAN
#> STATISTICS_MINIMUM=94
#> STATISTICS_STDDEV=1.#SNAN