getPixmapGDAL             package:rgdal             R Documentation

_R_e_a_d _G_D_A_L _d_a_t_a_s_e_t_s _a_s _p_i_x_m_a_p_G_r_e_y _o_r _p_i_x_m_a_p_R_G_B _o_b_j_e_c_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     A wrapper function for 'getRasterData()' to insert the retrieved
     data into pixmap objects; only implemented now for greyscale and
     RGB data.

_U_s_a_g_e:

     getPixmapGDAL(dataset, col=NULL, band = NULL, offset = c(0, 0), region.dim = dim(dataset), output.dim = region.dim, interleave = c(0, 0), stretch.bands = TRUE, as.is = FALSE)

_A_r_g_u_m_e_n_t_s:

 dataset: An object inheriting from class 'GDALReadOnlyDataset'

     col: a vector of colours or a colour function such as rainbow

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

  offset: Number of rows and columns from the origin (usually the upper
          left corner) to begin reading from

region.dim: The number of rows and columns to read from the dataset

output.dim: Number of rows and columns in the output data; if smaller
          than 'region.dim' the data will be subsampled

interleave: Element and row stride while reading data; rarely needed

stretch.bands: if TRUE, stretch 3-band RGB images

   as.is: If false, scale the data to its natural units; if the case of
          thematic data, return the data as factors

_V_a_l_u_e:

     For single band data, returns a '"pixmapGrey"' object, for three
     band data, a '"pixmapRGB"' object.

_A_u_t_h_o_r(_s):

     Roger Bivand

_S_e_e _A_l_s_o:

     'GDALRasterBand-class'

_E_x_a_m_p_l_e_s:

     logo <- system.file("pictures/logo.jpg", package="rgdal")[1]
     x <- new("GDALReadOnlyDataset", logo)
     xGrey <- getPixmapGDAL(x)
     xGrey
     plot(xGrey)
     xCm <- getPixmapGDAL(x, col=cm.colors)
     xCm
     plot(xCm)
     GDAL.close(x)
     Rlogo <- system.file("pictures/Rlogo.jpg", package="rgdal")[1]
     y <- new("GDALReadOnlyDataset", Rlogo)
     yRGB <- getPixmapGDAL(y)
     yRGB
     plot(yRGB)
     GDAL.close(y)

