Union of matrixes of heights |
The task is intended for forming the summary matrix of heights. Source data are one or several open matrixes of heights. Matrixes of heights should be of the same types (absolute elevations, relative elevations, total elevations). Otherwise building is not carried out. The task is executed by Mtwsum.dll module, which is called through Run Application item of Tools menu. Parameters of a created matrix are set in dialogue Association of matrixes. Originally parameters are established on a map and the most exact open matrix. In dialog it is possible to change scale and resolution (an element size) of created matrix. Except for that for execution of building it is required to specify a filename and to choose the sizes of created matrix In Area group. By default the sizes of a matrix are specified by the sizes of region , and in the further they can be changed by a choice of a corresponding fragment of a map. Into each element of an output matrix the height from a matrix containing height in this point is placed. If for a point there are some matrixes of heights into an output matrix the height from a matrix with the least size of an element (more exact) is placed. Into elements of output matrix the elevations calculated by source matrixes are placed. If in the document one source matrix is opened, then the resulting elevation is calculated by a method of linear interpolation by function
h = mapGetPrecisionHeightTriangle (HMap, x, y), where x, y - coordinates of the centre of a resulting element.
If in the document several source matrixes are opened, then the resulting elevation is calculated as the weighted average value of elevations from document matrixes, and thus weight of elevation is inversely to the element size of the source matrix. The elevations from a matrix with the smaller size of an element (more exact) are considered as elevations of higher priority. Weighted average value will be obtained only in the area of matrixes overlap, outside the overlap area the simple query of elevation on coordinates by function mapGetHeightValue (HMap, x, y) will be carried out.
If mode the Smoothing of elevations is set, then into an output matrix the average elevation is stored. Value of averaged elevation is calculated with use of the initial elevations requested within a square area measuring 4 on 4 elements of the resulting matrix. The Smoothing of elevations mode allows to eliminate sharp elevations differences of the resulting surface, but increases the run-time of the task.
|