This function provides an interface mirroring that of the GDAL
command-line app gdalmdiminfo
. For a description of the
utility and the arguments that it takes, see the documentation at
https://gdal.org/programs/gdalmdiminfo.html.
Usage
gdalmdiminfo(
datasetname,
...,
oo,
arrayoption,
detailed,
nopretty,
array,
limit,
stats,
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.
- oo, arrayoption, detailed, nopretty, array, limit, stats, IF
the GDAL project's gdalmdiminfo 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 in JSON format returned by the gdalmdiminfo utility.
Examples
# \donttest{
ff <- system.file("nc/cropped.nc", package = "sf")
gdalmdiminfo(ff)
#> {
#> "type": "group",
#> "driver": "netCDF",
#> "name": "/",
#> "attributes": {
#> "Conventions": "CF-1.0",
#> "title": "Daily-OI-V2, final, Data (Ship, Buoy, AVHRR, GSFC-ice)",
#> "History": "Tue Feb 13 20:40:49 2018: ncks -d lat,30,40 -d lon,25,50 avhrr-only-v2.19810901.nc -O cropped_example.nc\nVersion 2.0",
#> "creation_date": "2011-05-04",
#> "Source": "NOAA/National Climatic Data Center",
#> "Contact": "Dick Reynolds, email: Richard.W.Reynolds@noaa.gov & Chunying Liu, email: Chunying.liu@noaa.gov",
#> "NCO": "4.6.8"
#> },
#> "dimensions": [
#> {
#> "name": "time",
#> "full_name": "/time",
#> "size": 1,
#> "type": "TEMPORAL",
#> "indexing_variable": "/time"
#> },
#> {
#> "name": "zlev",
#> "full_name": "/zlev",
#> "size": 1,
#> "type": "VERTICAL",
#> "indexing_variable": "/zlev"
#> },
#> {
#> "name": "lat",
#> "full_name": "/lat",
#> "size": 11,
#> "type": "HORIZONTAL_Y",
#> "direction": "NORTH",
#> "indexing_variable": "/lat"
#> },
#> {
#> "name": "lon",
#> "full_name": "/lon",
#> "size": 26,
#> "type": "HORIZONTAL_X",
#> "direction": "EAST",
#> "indexing_variable": "/lon"
#> }
#> ],
#> "arrays": {
#> "anom": {
#> "datatype": "Int16",
#> "dimensions": [
#> "/time",
#> "/zlev",
#> "/lat",
#> "/lon"
#> ],
#> "dimension_size": [
#> 1,
#> 1,
#> 11,
#> 26
#> ],
#> "attributes": {
#> "long_name": "Daily sea surface temperature anomalies",
#> "valid_min": -1200,
#> "valid_max": 1200
#> },
#> "unit": "degrees C",
#> "nodata_value": -999,
#> "offset": 0,
#> "scale": 0.00999999977648258209
#> },
#> "err": {
#> "datatype": "Int16",
#> "dimensions": [
#> "/time",
#> "/zlev",
#> "/lat",
#> "/lon"
#> ],
#> "dimension_size": [
#> 1,
#> 1,
#> 11,
#> 26
#> ],
#> "attributes": {
#> "long_name": "Estimated error standard deviation of analysed_sst",
#> "valid_min": 0,
#> "valid_max": 1000
#> },
#> "unit": "degrees C",
#> "nodata_value": -999,
#> "offset": 0,
#> "scale": 0.00999999977648258209
#> },
#> "ice": {
#> "datatype": "Int16",
#> "dimensions": [
#> "/time",
#> "/zlev",
#> "/lat",
#> "/lon"
#> ],
#> "dimension_size": [
#> 1,
#> 1,
#> 11,
#> 26
#> ],
#> "attributes": {
#> "long_name": "Sea ice concentration",
#> "valid_min": 0,
#> "valid_max": 100
#> },
#> "unit": "percentage",
#> "nodata_value": -999,
#> "offset": 0,
#> "scale": 0.00999999977648258209
#> },
#> "lat": {
#> "datatype": "Float32",
#> "dimensions": [
#> "/lat"
#> ],
#> "dimension_size": [
#> 11
#> ],
#> "attributes": {
#> "long_name": "Latitude",
#> "grids": "Uniform grid from -89.875 to 89.875 by 0.25"
#> },
#> "unit": "degrees_north"
#> },
#> "lon": {
#> "datatype": "Float32",
#> "dimensions": [
#> "/lon"
#> ],
#> "dimension_size": [
#> 26
#> ],
#> "attributes": {
#> "long_name": "Longitude",
#> "grids": "Uniform grid from 0.125 to 359.875 by 0.25"
#> },
#> "unit": "degrees_east"
#> },
#> "sst": {
#> "datatype": "Int16",
#> "dimensions": [
#> "/time",
#> "/zlev",
#> "/lat",
#> "/lon"
#> ],
#> "dimension_size": [
#> 1,
#> 1,
#> 11,
#> 26
#> ],
#> "attributes": {
#> "long_name": "Daily sea surface temperature",
#> "valid_min": -300,
#> "valid_max": 4500
#> },
#> "unit": "degrees C",
#> "nodata_value": -999,
#> "offset": 0,
#> "scale": 0.00999999977648258209
#> },
#> "time": {
#> "datatype": "Float32",
#> "dimensions": [
#> "/time"
#> ],
#> "dimension_size": [
#> 1
#> ],
#> "attributes": {
#> "long_name": "Center time of the day"
#> },
#> "unit": "days since 1978-01-01 00:00:00"
#> },
#> "zlev": {
#> "datatype": "Float32",
#> "dimensions": [
#> "/zlev"
#> ],
#> "dimension_size": [
#> 1
#> ],
#> "attributes": {
#> "long_name": "Sea surface height",
#> "actual_range": "0, 0"
#> },
#> "unit": "meters"
#> }
#> },
#> "structural_info": {
#> "NC_FORMAT": "CLASSIC"
#> }
#> }
# }