GDALReadOnlyDataset-class       package:rgdal       R Documentation

_C_l_a_s_s "_G_D_A_L_R_e_a_d_O_n_l_y_D_a_t_a_s_e_t"

_D_e_s_c_r_i_p_t_i_o_n:

     'GDALReadOnlyDataset' is the base class for a GDAL Dataset
     classes. Only read operations are supported. Both 'GDALDataset'
     and 'GDALTransientDataset' inherit these read operations while
     providing additional write operations (see 'GDALDataset-class').
     'GDALReadOnlyDataset-class' inherits from 'GDALMajorObject-class'.

_U_s_a_g_e:

     GDAL.close(dataset)
     GDAL.open(filename, read.only = TRUE, silent=FALSE)
     getDriver(dataset)
     getColorTable(dataset, band = 1)
     getGeoTransFunc(dataset)

_A_r_g_u_m_e_n_t_s:

 dataset: An object inheriting from class 'GDALReadOnlyDataset'

filename: A string giving the file to read from

    band: The band number (1-based) to read from

read.only: A logical flag indicating whether to open the file as a
          'GDALReadOnlyDataset' or as a writable 'GDALDataset'

  silent: logical; if TRUE, comment and non-fatal CPL driver errors
          suppressed 

_D_e_t_a_i_l_s:

     'GDAL.open' and 'GDAL.close' are shorter versions of
     'new("GDALReadOnlyDataset", ...)' and 'closeDataset()'. Because
     'GDAL.close' through 'closeDataset()' uses the finalization
     mechanism to destroy the handles to the dataset and its driver,
     messages such as:

     "Closing GDAL dataset handle 0x8ff7900...  destroyed ... done."

     may appear when 'GDAL.close' is run, or at some later stage. 
     'getDriver' returns an object inheriting from class 'GDALDriver'.
     'getColorTable' returns the dataset colour table (currently does
     not support RGB imaging). 'getGeoTransFunc' returns a warping
     function.

_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s:

     Objects can be created by calls of the form
     'new("GDALReadOnlyDataset", filename, handle)'. ~~ describe
     objects here ~~

_S_l_o_t_s:


     '_h_a_n_d_l_e': Object of class '"externalptr", from class
          "GDALMajorObject"' ~~ 

_E_x_t_e_n_d_s:

     Class '"GDALMajorObject"', directly.

_M_e_t_h_o_d_s:


     _c_l_o_s_e_D_a_t_a_s_e_t 'signature(dataset = "GDALReadOnlyDataset")': ... 

     _d_i_m 'signature(x = "GDALReadOnlyDataset")': ... 

     _i_n_i_t_i_a_l_i_z_e 'signature(.Object = "GDALReadOnlyDataset")': ... 

_A_u_t_h_o_r(_s):

     Timothy H. Keitt, modified by Roger Bivand

_R_e_f_e_r_e_n_c_e_s:

     <URL: http://www.keittlab.org/>, <URL: http://www.gdal.org/>

_S_e_e _A_l_s_o:

     See also 'GDALDriver-class', 'GDALDataset-class',
     'GDALTransientDataset-class'.

_E_x_a_m_p_l_e_s:

     logo <- system.file("pictures/logo.jpg", package="rgdal")[1]
     x <- new("GDALReadOnlyDataset", logo)
     dim(x)
     plot(density(getRasterTable(x)$band1))
     #displayDataset(x)
     #displayDataset(x, col=function(x){rev(cm.colors(x))})
     #im <- displayDataset(x, col=function(x){rev(cm.colors(x))}, reset.par=FALSE)
     #contour(1:attr(im, "size")[2], 1:attr(im, "size")[1],
     # t(attr(im, "index"))[,attr(im, "size")[1]:1], nlevels = 1,
     # levels = 100, col = 'black', add = TRUE)
     GDAL.close(x)
     logo <- system.file("pictures/Rlogo.jpg", package="rgdal")[1]
     x <- new("GDALReadOnlyDataset", logo)
     dim(x)
     #displayDataset(x)
     GDAL.close(x)

