User's Guide

GRIDFORM

Generates a Geometric Mapping Grid from other mapping grid formats

Function:

Reads geometric mapping grids in other formats and converts them into the LAS geometric mapping grid format.

Parameters:

INFILE
Input file. The input grid file in a foreign format. The contents of this file are transferred to the LAS geometric mapping grid given by OUTGRID.

OUTGRID
Output grid file. Output geometric mapping grid file containing mapping grid information as read from INFILE.

FILEFORM
File format. GRIDFORM accepts three different types of foreign grids:


  = LINSAM:  ASCII file with line, sample coordinate 
             pairs.
  = SAMLIN:  ASCII file with sample, line coordinate 
             pairs.
  = OLDSTD:  ASCII file in pre-5.0 UNIX ASCII format.

Example:

  1. LAS> gridform infile=grid outgrid=grid.dat fileform=linsam

    The input mapping grid file GRID is read from disk and reformatted into a LAS geometric mapping grid file GRID.DAT. The format of the input grid is described by the LINSAM flag. See the User's Notes for a description of the grid formats available.

Description/Algorithm:

GRIDFORM reads three different formats of "foreign" grids, reformats them, and writes them to a LAS geometric mapping grid file. The available formats are described in the User's Notes.

Nonfatal Error Messages:

    None.

Fatal Error Messages:

  1. [gridform-fatal] Fatal error encountered

    The error message that is displayed immediately preceding this message is the specific error encountered. Processing is terminated.

  2. [gridform-open] Error opening input grid file

    An error occurred when trying to open the input (foreign) grid file. Verify that the file exists and that the file is an ASCII file.

  3. [gridform-read] Error reading grid file

    An error occurred when tring to read the input (foreign) grid file. Verify that the format of the file is correct for the FILEFORM specified.

  4. [gridform-dim] Illegal number of rows or columns in grid

    The number of row and/or columns in the input (foreign) grid file either exceeds 127 or is less than 2. Verify the format of the grid; and if correct, modify the grid dimensions to be within these limits.

  5. [gridform-alloc] Error allocating memory

    An error occurred allocating memory. Rerun the function, and if the error reoccurs, contact the system manager.

User Notes:

  1. The output grid file may be displayed by the program DSPGRID.

  2. The geometric mapping grid created by this module contains only basic information. EDITGRID may be used to fill in grid fields which were left undefined or not valid.

  3. Foreign grid formats. With each format an example grid is given. The same geometric mapping is given for all three examples. The example grid has five rows by three columns of grid intersections, making four rows of grid cells by two columns of grid cells or 8 grid cells. The size of the output image is 512 lines by 512 samples. The size information is contained only in the OLDSTD grid format. The second and third lines of the mapping grid contain the output grid row intersections and the output grid column intersections. The remaining data are input grid line and sample coordinates.

    Regardless of the format, the mapping grid dimensions (number of rows and columns) must be two or greater, but no larger than 127. All grid entries should be separated by spaces, not commas.

    The LINSAM mapping grid file contains the following entries:

        #ROWS, #COLS                (integers) 
        OUTPUT GRID ROWS            (#ROWS integers) 
        OUTPUT GRID COLUMNS         (#COLS integers) 
        INPUT LINE, SAMPLE PAIRS    (2 * #ROWS * #COLS floating values) 
    
        Example:
    
          5 3
          1 130 259 388 517
          1 258 515
          162.98 -92.52  34.48 130.05 -94.02 352.62
          274.70 -28.02 146.20 194.55  17.70 417.12
          386.42  36.48 257.92 259.05 129.42 481.62
          498.13 100.98 369.63 323.55 241.13 546.12
          609.85 165.48 481.35 388.05 352.85 610.62
    
    
    The SAMLIN mapping grid file contains the following entries:

    
        #COLS, #ROWS                (integers) 
        OUTPUT GRID COLUMNS         (#COLS integers) 
        OUTPUT GRID ROWS            (#ROWS integers) 
        INPUT SAMPLE, LINE PAIRS    (2 * #ROWS * #COLS floating values) 
    
        Example:
    
          3 5
          1 258 515
          1 130 259 388 517
          -92.52 162.98 130.05  34.48 352.62 -94.02
          -28.02 274.70 194.55 146.20 417.12  17.70
           36.48 386.42 259.05 257.92 481.62 129.42
          100.98 498.13 323.55 369.63 546.12 241.13
          165.48 609.85 388.05 481.35 610.62 352.85
    
    
    
    The OLDSTD mapping grid file is an ASCII text file created by a text editor, by various pre-5.0 UNIX functions, or by NEWLAS routines. The format is as follows:

        #ROWS, #COLS, #OUTPUT LINES, #OUTPUT SAMPLES  (integers) 
        OUTPUT GRID ROWS            (#ROWS integers) 
        OUTPUT GRID COLUMNS         (#COLS integers) 
        INPUT GRID ROW COORDINATES  (#ROWS * #COLS floating values) 
        INPUT GRID COLUMN COORDS    (#ROWS * #COLS floating values)
    
        Example:
    
          5 3 512 512
          1 130 259 388 517
          1 258 515
          162.98  34.48 -94.02 274.70 146.20 
           17.70 386.42 257.92 129.42 498.13 
          369.63 241.13 609.85 481.35 352.85 
          -92.52 130.05 352.62 -28.02 194.55 
          417.12  36.48 259.05 481.62 100.98 
          323.55 546.12 165.48 388.05 610.62