1\name{GDALDataset-class} 2\docType{class} 3\alias{GDALDataset-class} 4\alias{putRasterData} 5\alias{saveDataset} 6\alias{copyDataset} 7\alias{deleteDataset} 8\alias{saveDatasetAs} 9\alias{initialize,GDALDataset-method} 10\title{Class "GDALDataset"} 11\description{\code{GDALDataset} extends \code{\link{GDALReadOnlyDataset-class}} with data update commands. 12} 13\section{Objects from the Class}{ 14Objects can be created by calls of the form \code{new("GDALDataset", filename, handle)}, where name: a string giving the name of a GDAL driver, handle: used internally; not for public consumption (default = NULL). 15} 16\section{Slots}{ 17 \describe{ 18 \item{\code{handle}:}{Object of class \code{"externalptr", from class "GDALReadOnlyDataset"}, used internally; not for public consumption} 19 } 20} 21\section{Extends}{ 22Class \code{"GDALReadOnlyDataset"}, directly. 23Class \code{"GDALMajorObject"}, by class "GDALReadOnlyDataset". 24} 25\section{Methods}{ 26 \describe{ 27 \item{initialize}{\code{signature(.Object = "GDALDataset")}: ... } 28 } 29} 30\usage{ 31putRasterData(dataset, rasterData, band = 1, offset = c(0, 0)) 32saveDataset(dataset, filename, options=NULL, returnNewObj=FALSE) 33copyDataset(dataset, driver, strict = FALSE, options = NULL, fname=NULL) 34deleteDataset(dataset) 35saveDatasetAs(dataset, filename, driver = NULL, options=NULL) 36} 37\arguments{ 38 \item{dataset}{An object inheriting from class 'GDALDataset'} 39 \item{rasterData}{A data array with \code{length(dim(rasterData)) = 2}} 40 \item{band}{The band number (1-based) to read from} 41 \item{offset}{Number of rows and columns from the origin (usually the 42 upper left corner) to begin reading from} 43 \item{filename}{name of file to contain raster data object; will be normalized with \code{\link{normalizePath}}} 44 \item{returnNewObj}{until and including 0.5-27, \code{saveDataset} returned an invisible copy of the new file handle, which was then only finalized when the garbage collector ran. The old behaviour can be retained by setting to FALSE, the default behaviour is to close the hande and not return it.} 45 \item{driver}{GDAL driver name to use for saving raster data object} 46 \item{strict}{TRUE if the copy must be strictly equivalent, or more normally FALSE indicating that the copy may adapt as needed for the output format} 47 \item{options}{Driver specific options (currently passed to GDAL)} 48 \item{fname}{default NULL, used internally to pass through a file name with a required extension (RST driver has this problem)} 49} 50\details{ 51 \describe{ 52 53 \item{\code{putRasterData}:}{writes data contained in 54 \code{rasterData} to the dataset, begining at \code{offset} rows 55 and columns from the origin (usually the upper left corner). Data 56 type conversion is automatic.} 57 \item{\code{saveDataset}:}{saves a raster data object in a file using the driver of the object} 58 \item{\code{saveDatasetAs}:}{saves a raster data object in a file using the specified driver} 59 \item{\code{copyDataset}:}{make a copy of raster data object in a file using the specified driver} 60 \item{\code{deleteDataset}:}{delete the file from which the raster data object was read (should only delete files opened as GDALDataset objects} 61 } 62} 63 64\author{Timothy H. Keitt, modified by Roger Bivand} 65 66\seealso{\code{\link{GDALDriver-class}}, 67 \code{\link{GDALReadOnlyDataset-class}}, \code{\link{GDALTransientDataset-class}}} 68 69\keyword{classes} 70