gmeta                 package:GRASS                 R Documentation

_R_e_a_d_s _G_R_A_S_S _m_e_t_a_d_a_t_a _f_r_o_m _t_h_e _c_u_r_r_e_n_t _L_O_C_A_T_I_O_N

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

     GRASS LOCATION metadata are read into a list in R, and processed
     to provide other functions with parameters and structures they
     require.

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

     gmeta(interp=FALSE)
     east(object)
     north(object)
     east.default(object)
     north.default(object)
     east.grassmeta(object)
     north.grassmeta(object)
     obsno(G)
     reverse(G)
     make.maas.location()

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

  interp: if interp is TRUE, the interface uses text transfer through
          'system()'

       G: a grassmeta object returned by 'gmeta'

  object: a grassmeta object returned by 'gmeta'

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

     The function retrieves metadata from the GRASS LOCATION from which
     R was started, and stores it in a list. The metadata is taken from
     the current, active region, and the implied resolution for raster
     layers. Next, this is used to create a number of auxilliary
     objects used by other interface routines. Other auxilliary objects
     may be constructed using the access functions 'east.grassmeta',
     'north.grassmeta', 'obsno', and 'reverse'. The function returns a
     list with class 'grassmeta':

_V_a_l_u_e:

LOCATION: GRASS LOCATION name

  MAPSET: GRASS MAPSET within the LOCATION

    proj: GRASS projection description

       n: Northern edge: numeric

       s: Southern edge: numeric

       w: Western edge: numeric

       e: Eastern edge: numeric

   nsres: North-South resolution in measurement units, typically metres
          or decimal degrees

   ewres: East-West resolution in measurement units, typically metres
          or decimal degrees

    Nrow: Number of rows of raster cells

    Ncol: Number of columns of raster cells

  Ncells: Number of raster cells

    xlim: East-West range

    ylim: North-South range

    xseq: Sequence of raster cell East-West midpoint coordinates

    yseq: Sequence of raster cell North-Soutb midpoint coordinates

   ryseq: Reversed sequence of raster cell North-Soutb midpoint
          coordinates


     In addition, a number of internal GRASS environment variables are
     exposed for reading and manipulation - these are at present
     visible but should be used only with caution, and signal the
     future deprecation of the gmeta() mechanism for handling metadata.

_N_o_t_e:

     The functions in this package are intended to work with the GRASS
     geographical information system. The examples for wrapper
     functions will will work whether or not R is running in GRASS, and
     whether or not the current location is that of the data set used
     for the examples. Examples of interface functions will however
     (from version 0.2-2) only work outside GRASS, to avoid possible
     overwriting of GRASS database locations and/or files.

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

     Roger S. Bivand, e-mail: Roger.Bivand@nhh.no.

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

     <URL: http://grass.itc.it/statsgrass/index.html>, Bivand, R. S.,
     (2000) Using the R statistical data analysis language on GRASS 5.0
     GIS data base files. Computers and Geosciences, 26, pp. 1043-1052.

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

     'summary.grassmeta'

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

     if(!get("maas.loc", env = .GRASS.meta)) make.maas.location()
     G <- gmeta()
     summary(G)

