Load matrix from GRD, ASCII format

Print Top page

The task is intended for loading a matrix of heights or a matrix of qualities from format GRD.

The task is performed by the module GrdToMtw.dll that is called using menu item the File - Import rasters or matrix from ... - Matrix (GRD).

Download of matrix can be performed without the use of the application by calling the external function mapGrdToMatrix described in the file Grdapi.h.

 

To get the matrix in dialog the Load matrix from GRD, ASCII format it is necessary:

1. To choose an input file with extension grd.

2. To specify the output file name with extension mtw or mtq.

3. To set parameters of a matrix projection by the button >>.

4. At building a matrix of quality mtq there is a possibility to set a palette of displaying a matrix by means of button: Set palette for matrix of quality.

 

Matrix of heights in format GRD is a text file of a following kind:

DSAA - a file label

 

i, j          i - the number of columns of the matrix

             j - the number of lines

 

Ymin Ymax - dimensions of the matrix

Xmin Xmax in a rectangular coordinate system (meters) or

 

Lmin Lmax - dimensions of the matrix

Bmin Bmax in geodetic coordinate system (degrees).

 

The dimensions of the matrix in rectangular system should be set so that the sizes of the party of an elementary site of the matrix in meters on the ground for Х and Y were identical, i.e. that the ratio was satisfied:

(Ymax - Ymin) / (i - 1) = (Xmax - Xmin) / (j - 1)

If this ratio is not satisfied,then  from two calculated values the maximum is taken and dimensions of the output matrix are corrected by it.

 

Hmin Hmax - values of minimum and maximum height

 

Values of heights at the nodal points of the matrix, written line by line, starting from the lower left corner of the matrix.

 

H11 H12 H13... H1n  

H21 H22 H23... H2n    

Hm1 Hm2 Hm3... Hmn

 

For example:

DSAA

237 151

1770.000 4130.000

4190.000 5690.000

35.079 110.054

30.500 37.637 38.589 etc.

 

The description of GRD-files format - http://helpsite.narod.ru/gis/winsurfhelp/13.htm

 

GRD format is the standard exchange format of system PHOTOMOD of RACURS firm that allows to make an exchange of matrix data between systems PHOTOMOD and Panorama 11.