GDALReadOnlyDataset-methods      package:rgdal      R Documentation

_s_u_b_s_e_t _m_e_t_h_o_d_s _f_o_r "_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:

     subsets GDAL objects, returning a SpatialGridDataFrame object

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

     The '[' method subsets a GDAL data set, returning a
     SpatialGridDataFrame object. Reading is done on the GDAL side, and
     only the subset requested is ever read into memory.

     Further named arguments to '[' are to either getRasterTable or
     getRasterData:

     _a_s._i_s see getRasterData

     _i_n_t_e_r_l_e_a_v_e see getRasterData

     _o_u_t_p_u_t._d_i_m see getRasterData

     the other arguments, 'offset' and 'region.dim' are derived from
     row/column selection values.

     An GDALReadOnlyDataset object can be coerced directly to a
     SpatialGridDataFrame

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


     "[" 'signature(.Object = "GDALReadOnlyDataset")': requires package
          sp; selects rows and columns, and returns an object of class
          SpatialGridDataFrame if the grid is not rotated, or else of
          class SpatialPointsDataFrame. Any arguments passed to
          getRasterData (or in case of rotation getRasterTable) may be
          passed as named arguments; the first three unnamed arguments
          are row,col,band 

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

     Edzer J. Pebesma

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

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

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

     library(grid)
     logo <- system.file("pictures/logo.jpg", package="rgdal")[1]
     x <- new("GDALReadOnlyDataset", logo)
     dim(x)
     x.sp = x[20:50, 20:50]
     class(x.sp)
     summary(x.sp)
     spplot(x.sp)
     GDAL.close(x)

     logo <- system.file("pictures/Rlogo.jpg", package="rgdal")[1]
     x.gdal <- new("GDALReadOnlyDataset", logo)
     x = x.gdal[,,3]
     dim(x)
     summary(x)
     spplot(x)
     spplot(x.gdal[])
     GDAL.close(x.gdal)

     logo <- system.file("pictures/Rlogo.jpg", package="rgdal")[1]
     x.gdal <- new("GDALReadOnlyDataset", logo)
     x.as <- as(x.gdal, "SpatialGridDataFrame")
     GDAL.close(x.gdal)
     summary(x.as)

