Learn R Programming

gdalBindings (version 0.1.17)

GDALDataset: R6 Class GDALDataset wrapping

Description

Wrapping class for GDALDataset C++ API exporting GetRasterBand, GetRasterXSize, GetRasterYSize

Arguments

Methods


Method new()

Create a new raster file based on specified data. It will output a *.tif file.

Usage

GDALDataset$new(ds)

Arguments

ds

GDALDatasetR pointer. Should not be used

datatype

GDALDataType. The GDALDataType to use for the raster, use (GDALDataType$) to find the options. Default GDALDataType$GDT_Float64

Returns

An object from GDALDataset R6 class.


Method GetRasterBand()

Function to retrieve the GDALRasterBand R6 Object.

Usage

GDALDataset$GetRasterBand(x)

Arguments

x

Integer. The band index, starting from 1 to number of bands.

Returns

An object of GDALRasterBand R6 class.


Method GetRasterXSize()

Get the width for the raster

Usage

GDALDataset$GetRasterXSize()

Returns

An integer indicating the raster width


Method GetRasterYSize()

Get the height for the raster

Usage

GDALDataset$GetRasterYSize()

Returns

An integer indicating the raster height


Method Close()

Closes the GDALDataset

Usage

GDALDataset$Close()

Returns

An integer indicating the raster width


Method clone()

The objects of this class are cloneable with this method.

Usage

GDALDataset$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.