gdalinfo: Interface to GDAL's gdalinfo utility

Description Usage Arguments Value Author(s) Examples

View source: R/gdalinfo.R

Description

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
gdalinfo(
  datasetname,
  ...,
  json,
  mm,
  stats,
  approx_stats,
  hist,
  nogcp,
  nomd,
  norat,
  noct,
  nofl,
  checksum,
  proj4,
  listmdd,
  mdd,
  wkt_format,
  sd,
  oo,
  IF,
  config,
  dryrun = 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, config

See the GDAL project's gdalinfo documentation for details.

dryrun

Logical (default FALSE). If TRUE, instead of executing the requested call to GDAL, the function will print the command-line call that would produce the equivalent output.

Value

Silently returns path to datasetname.

Author(s)

Joshua O'Brien

Examples

1
2
ff <- system.file("extdata/maunga.tif", package = "gdalUtilities")
gdalinfo(ff)

Example output

Loading required package: raster
Loading required package: sp
Driver: GTiff/GeoTIFF
Files: /usr/lib/R/site-library/gdalUtilities/extdata/maunga.tif
Size is 61, 87
Coordinate System is:
BOUNDCRS[
    SOURCECRS[
        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["unknown"],
                AREA["New Zealand - onshore"],
                BBOX[-47.33,166.37,-34.1,178.63]],
            ID["EPSG",27200]]],
    TARGETCRS[
        GEOGCRS["WGS 84",
            DATUM["World Geodetic System 1984",
                ELLIPSOID["WGS 84",6378137,298.257223563,
                    LENGTHUNIT["metre",1]]],
            PRIMEM["Greenwich",0,
                ANGLEUNIT["degree",0.0174532925199433]],
            CS[ellipsoidal,2],
                AXIS["geodetic latitude (Lat)",north,
                    ORDER[1],
                    ANGLEUNIT["degree",0.0174532925199433]],
                AXIS["geodetic longitude (Lon)",east,
                    ORDER[2],
                    ANGLEUNIT["degree",0.0174532925199433]],
            USAGE[
                SCOPE["unknown"],
                AREA["World"],
                BBOX[-90,-180,90,180]],
            ID["EPSG",4326]]],
    ABRIDGEDTRANSFORMATION["Transformation to WGS84",
        METHOD["Position Vector transformation (geog2D domain)",
            ID["EPSG",9606]],
        PARAMETER["X-axis translation",59.47,
            ID["EPSG",8605]],
        PARAMETER["Y-axis translation",-5.04,
            ID["EPSG",8606]],
        PARAMETER["Z-axis translation",187.44,
            ID["EPSG",8607]],
        PARAMETER["X-axis rotation",0.47,
            ID["EPSG",8608]],
        PARAMETER["Y-axis rotation",-0.1,
            ID["EPSG",8609]],
        PARAMETER["Z-axis rotation",1.024,
            ID["EPSG",8610]],
        PARAMETER["Scale difference",0.9999954007,
            ID["EPSG",8611]]]]
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.51"E, 36d52'25.92"S)
Lower Left  ( 2667400.000, 6478700.000) (174d45'40.23"E, 36d52'54.13"S)
Upper Right ( 2668010.000, 6479570.000) (174d46' 4.13"E, 36d52'25.51"S)
Lower Right ( 2668010.000, 6478700.000) (174d46' 4.85"E, 36d52'53.73"S)
Center      ( 2667705.000, 6479135.000) (174d45'52.18"E, 36d52'39.82"S)
Band 1 Block=61x16 Type=Float64, ColorInterp=Gray
  Min=94.000 Max=195.000 
  Minimum=94.000, Maximum=195.000, Mean=1.000, StdDev=1.000
  NoData Value=-1.69999999999999994e+308
  Metadata:
    STATISTICS_MAXIMUM=195
    STATISTICS_MEAN=1.#SNAN
    STATISTICS_MINIMUM=94
    STATISTICS_STDDEV=1.#SNAN

gdalUtilities documentation built on April 6, 2021, 1:05 a.m.