SpatialGDAL-class           package:rgdal           R Documentation

_C_l_a_s_s "_S_p_a_t_i_a_l_G_D_A_L"

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

     Class for spatial attributes that have spatial locations on a
     (full) regular grid on file, not (yet) actually read.

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

     ## S3 method for class 'SpatialGDAL':
     open(con, ..., silent = FALSE)
     ## S3 method for class 'SpatialGDAL':
     close(con, ...)
     copy.SpatialGDAL(dataset, fname, driver = getDriver(dataset@grod), strict = FALSE, options = NULL, silent = FALSE)

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

     con: file name of grid map for opening, SpatialGDAL object for
          closing 

     ...: other arguments (currently ignored)

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

 dataset: object of class SpatialGDAL

   fname: file name of grid map 

  driver: GDAL driver name 

  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

 options: driver-specific options to be passed to the GDAL driver

_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 'open.
     SpatialGDAL(name), ', where 'name' is the name of the GDAL file.

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


     '_p_o_i_n_t_s': see SpatialPoints; points slot which is not actually
          filled with all coordinates (only with min/max) 

     '_g_r_i_d': see GridTopology-class; grid parameters 

     '_g_r_i_d._i_n_d_e_x': see SpatialPixels-class; this slot is of zero length
          for this class, as the grid is full 

     '_b_b_o_x': Object of class '"matrix"'; bounding box 

     '_p_r_o_j_4_s_t_r_i_n_g': Object of class '"CRS"'; projection 

     '_d_a_t_a': Object of class data.frame, containing attribute data 

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

     Class "Spatial", directly.

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


     [ 'signature(x = "SpatialGDAL", i, j, ...)':  selects rows (i),
          columns (j), and bands (third argument); returns an object of
           class SpatialGridDataFrame. Only the selection is actually
          read. 

     [[ 'signature(i)': reads band i and returns the values as a
          numeric vector

_N_o_t_e:

     Non-fatal CPL errors may be displayed for some drivers, currently
     for the AIG ArcInfo 9.3 binary raster driver using GDAL >= 1.6.2;
     the data has been read correctly, but the contents of the info
     directory did not meet the specifications used to reverse engineer
     the driver used in GDAL (see <URL:
     http://trac.osgeo.org/gdal/ticket/3031>)

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

     Edzer J. Pebesma, e.pebesma@geo.uu.nl

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

     'SpatialGridDataFrame-class', which is actually sub-classed.

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

     x <- open.SpatialGDAL(system.file("external/test.ag", package="sp")[1])
     image(x[])
     image(as(x, "SpatialGridDataFrame"))
     summary(as(x, "SpatialGridDataFrame"))
     spplot(as(x, "SpatialGridDataFrame"))
     # select first 50 rows:
     summary(x[1:50])
     # select first 50 columns:
     summary(x[,1:50])
     # select band 1:
     summary(x[,,1])
     # select first 50 rows, first 50 columns, band 1:
     summary(x[1:50,1:50,1])
     # get values of first band:
     summary(x[[1]])
     close(x)

