GRID                                                              GRID


     The GRID command is summarized as follows:

          GRID is a neighborhood analysis command which performs
          point-to-grid interpolation and generates real-valued
          continuous cell maps.  Numeric values (z) associated
          with point locations are interpolated to create a cell
          map in which each cell contains an interpolated (z)
          value.   The resultant continous cell map can be used
          as input for other MOSS or MAPS cell commands such as
          ASPECT, CONTOUR and SLOPE.  This command is usually
          used to convert point samples, such as drill hole data,
          to a cell map and then to a contour map using CONTOUR.
          The results of GRID are dependent upon the distribution
          and density of data on the original map.   One gridding
          algorithm handles fault data during the gridding
          interpolation proccess, although MOSS contouring
          algorithms do not recognize the special values produced
          by GRID.  TESTGRID should be run to determine an appropriate
          cell size.  If the distribution of the points is poor,
          a large roving window should be used.

     The GRID command is specified as follows:
     (* denotes parameters which can only be entered in a prompted mode)

       GRID (active ID) (new map name) (gridding option) (fault map ID)*
            (masking map)*(scaler value)*(new map description)*
            ([A]cres or [M]eters)*(cell width)*(cell height)*
            (cell ratio)*(cell size)*(window size)*(re-enter)*


     The individual parameters of the GRID command are described below:

          (active ID) is the ID number of a point map referenced in
          the active map table.  The value of each point must be
          numeric.

          (new map name) is the name for the map resulting from the use
          of GRID.

          (gridding option) is the type of gridding algorithm that the
          user wishes to apply to the (x,y,z) data.  There are currently
          four algorithms available.  The first is the QUADRANT
          algorithm which determines the closest point to each cell in
          each of four quadrants about that cell and then takes the
          average of the four point samples to calculate the value for
          that cell.  The second, the 8-POINT algorithm, is more
          complex and searches for the eight closest points to each
          cell (regardless of where they are spatially located) and
          computes a weighted average based on distance from the cell.
          The 8-point algorithm produces a smoother map than the
          Quadrant algorithm.  The third algorithm is KRIGING, which
          is a moving-average method.  It estimates the value of a
          spatially distributed variable from adjacent values while
          considering the interdependence shown in a variogram. (See
          VARIOGRAM command.)  The user can type "HELP KRIG" for further
          information.   The fourth algorithm is the QUINTIC SPLINE
          algorithm, which covers the area to be gridded with a mesh
          of triangles, using the original data points as vertices.
          It then uses the nearest 2 to 10 data points to estimate
          slope and gradient in order to calculate the cell value.
          The user can type "HELP SPLINE" for further information.

          (fault map ID) is the ID of a vector line map (type 2)
          referenced in the active map table.  GRID will prompt the user
          for a fault map ID only if the 8-POINT gridding option is
          chosen.  The resultant grid is dependent upon the cell size
          and the roving window size.  It is recommended that the cell
          size be 1/2 the length of the shortest fault.

          (masking map) is the name of a existing cell map which does
          not have to be in the active map table.  Sometimes it is
          necessary to modify the generated grid to reflect actual
          conditions on the ground.  An example of this would be in
          gridding bathymetric point data along coastal areas:  grid
          cells located in the uplands should not have negative values.
          The grid can be modified using a masking map.  The masking
          map must have the same numbers of rows and columns as the
          gridded map, and contain a mask of values.  Any cell that
          is non-zero will be used to override the results of the
          gridding process.

          (scaler value) is the value all input values are multiplied by
          in order to scale them higher or lower.  The default if 1.0.

          (new map description) is a description of the new cell map
          that is being created.

          ([A]cres or [M]eters) are units on a cell side.  If [M]eters
          are chosen, the user is then asked for the cell width and
          cell height in meters.  If [A]cres are chosen, the user is
          asked for the cell ratio (Y/X) and cell size in acres.

          (cell width) is the width of the cell in meters.

          (cell height) is the height of the cell in meters.

          (cell ratio) is the ratio of the number of meters in Y to the
          number of meters in X on an individual cell.  The QUADRANT
          algorithm allows for any ratio while the 8-POINT algorithm
          requires a ratio of 1.0.

          (cell size) is the cell size in acres.

          (window size) is a value between 3 and 120 that defines the
          size of the roving window matrix.  The size of the window
          affects how many points are considered when assigning a
          value to the cell at the center of the roving window.
          If three points can not be found, the cell is assigned a
          value of 0.

          (re-enter) allows the user to re-enter the parameters
          before the program is executed.

     The following is an example of the use of the GRID command:

           ENTER COMMAND
          ? GRID
           ENTER ACTIVE MAP ID TO GRID
          ? 1
           WHAT DO YOU WISH TO CALL THE NEW MAP?
            __________
          ? FLTMAP
           ENTER ONE OF THE FOLLOWING GRIDDING OPTIONS
              1. Exit from GRID
              2. For a 4-Point/Quadrant Weighted Average
              3. For a 8-Point Weighted Average
              4. For Simple or Universal Kriging
              5. For Quintic Spline Interpolation
          ? 3
           ENTER FAULT MAP ID (CR = NONE)
          ? 2
           ENTER MASKING FILE NAME (CR = NONE)
          ? <CR>
           ENTER SCALER VALUE FOR Z DATA (CR = 1.0)
          ? <CR>
           ENTER  DESCRIPTION
           [                                                           ]
            ____________________________________________________________
          ? SUBSURFACE VALUES WITH FAULTS
            ENTER [A]CRES OR [M]ETERS ON A SIDE
          ? A
           ENTER CELL SIZE RATIO (DEFAULT = 1.0)
          ? 1
           ENTER CELL SIZE IN ACRES
          ? 15


           SUBSURFACE VALUES WITH FAULTS

            ACRES/CELL:     15.000   NO OF ROWS:    42
            CELL HEIGHT:   246.380   NO OF COLS:    52
            CELL WIDTH:    246.380   UNITS:
            RATIO Y/X:       1.000

            BOUNDING RECTANGLE:
             MIN X:         2217.415
             MAX X:        14782.770
             MIN Y:         2217.415
             MAX Y:        12318.970

            DO YOU WISH TO RE-ENTER PARAMETERS [CR=N]?
          ? <CR>
           ENTER MOVING WINDOW SIZE BETWEEN 3 AND 120
          ? 21
           EXECUTING...PLEASE WAIT


     The limitations of the GRID command are as follows:

          -- GRID is extremely limited by the distribution of the
             original point data.

          -- The window must be set.  If faults are considered, the
             window must be set for both the point map and the fault
             map.

          -- The Map Bounding Rectangle (MBR) of the resultant map
             may be slightly different than the original window.

          -- Map must be a point map (type 1) with numeric values as the
             subject or numeric values as the selected attribute from a
             multiple attribute file; a numeric point map (type 5);
             a 3-D vector map (types 11, 12, or 13).

          -- Fault line map must be a vector map (Type 2).

          -- Quintic Spline and Kriging cannot be used if there are
             two points in the same location.  The variogram can be
             used to identify such points.
