Load matrix from a text file |
The task is intended for loading a matrix of qualities or a matrix of heights from a text file(extension TXT or XYZ). The input text file is selected by pressing the button “…” in group Input data. The name of a resulting matrix is formed automatically by name of input text file and can be changed by means of the button “…” in Matrix name group. There is an opportunity of stream loading of several matrixes according to the text files located in the specified catalog. The input catalog is selected by pressing the button “ From catalog” in group Input data. The resulting catalog for loaded matrixes by default is the initial catalog. The resulting catalog can be set by means of the button “To catalog” in Matrix name group. Process of loading consists of two steps. At the first step - after selecting an input text file or the source catalog the program checks correctness of input data, defines dimensions of matrixes in plan and a diapason of loaded values, and also defines an element size of created matrixes. The element size of the created matrixes, defined in the first step, is shown in a window Element size (meters) and can be changed by the user. The diapason of loaded values, defined at the first step, is shown in windows Minimum, Maximum and also can be changed by the user. At the second step the creation of resulting matrixes is carried out actually. At stream loading the all resulting matrixes are created with the identical size of an element, and at the enabled mode Set diapason for all matrixes in group Input data - with identical values of a minimum and a maximum. The task is carried out by CreatMtq.dll module which is called by means of items of the menu File \ Import matrix from … \ Matrixes of qualities (TXT) or Tools \ Run applications. The input text file should contain coordinates of points X, Y, H, where X, Y are the planned coordinates of a point in rectangular system, H - value of the characteristic of quality or height of a relief in the given point. One line of a text file should contain X, Y, H coordinates of one point. Strings of a text file can contain numbers of points, for loading such files before a choice of an input file or the input catalog it is necessary to set mode N of point in group Input data. Coordinates can have the fractional part, separated from the whole part by a symbol '. ' or a symbol ', '. Coordinates should be separated from each other by a divider. Divider can be one of following symbols: - blank - ';' - ':' - '/' - '\' - '|' - '_' The line of a text file can contain a field of the comment, beginning by symbols "//". The initial fragment of the chosen text file is displayed in a dialog window in Input data group. Planned coordinates of points (X, Y), containing in a text file, are used for automatic definition of dimensions of a created matrix and the element size (the side size of an elementary platform). After automatic definition the size of an element is displayed in a window Element size (meters) and can be changed by the user. Values of coordinates X and Y can be shifted onto the increments, specified in windows Shift by X, Shift by Y (for example, for addition of zone's number). A mode Interchange coordinates X Y changes the order of reading of coordinates X and Y from a textual file. For selection of loaded records the diapason of values of coordinate Z in windows Minimum, Maximum can be set. In a created matrix the elements corresponding to coordinates of points (X, Y) are filled. At placing into an element of several points the value of an element depends on the chosen mode Value of an element at superposition and can be equal to minimal, average or maximal value of H coordinate. If a loaded matrix is the matrix of qualities (file with mtq extension), for setting a palette it is necessary to press the button ">> " in Palette group. For a choice of a palette from earlier created matrix of qualities it is necessary to press the button "…" in Palette group. If the setting and a choice of a palette from a file are not carried out, the matrix of qualities with a palette is created by default. For setting a palette of a created matrix of qualities with arbitrary diapasons of values for coordinate Z it is necessary For recording into a created matrix of passport data from a vector map it is necessary to choose a file of a map, having pressed the button: Passport's data from map.
|