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)

