Learn R Programming

gdalraster (version 1.12.0)

inspectDataset: Obtain information about a GDAL raster or vector dataset

Description

inspectDataset() returns information about the format and content of a dataset. The function first calls identifyDriver(), and then opens the dataset as raster and/or vector to obtain information about its content. The return value is a list with named elements.

Usage

inspectDataset(filename, ...)

Value

A list with the following named elements:

  • $format: character string, the format short name

  • $supports_raster: logical, TRUE if the format supports raster data

  • $contains_raster: logical, TRUE if this is a raster dataset or the source contains raster subdatasets

  • $supports_subdatasets: logical, TRUE if the format supports raster subdatasets

  • $contains_subdatasets: logical, TRUE if the source contains subdatasets

  • $subdataset_names: character vector containing the subdataset names, or empty vector if subdatasets are not supported or not present

  • $supports_vector: logical, TRUE if the format supports vector data

  • $contains_vector: logical, TRUE if the source contains one or more vector layers

  • $layer_names: character vector containing the vector layer names, or empty vector if the format does not support vector or the source does not contain any vector layers

Arguments

filename

Character string containing the name of the file to access. This may not refer to a physical file, but instead contain information for the driver on how to access a dataset (e.g., connection string, URL, etc.)

...

Additional arguments passed to identifyDriver().

See Also

gdal_formats(), identifyDriver()

Examples

Run this code
src <- system.file("extdata/ynp_fires_1984_2022.gpkg", package="gdalraster")

inspectDataset(src)

Run the code above in your browser using DataLab