Calculations on semantics of selected objects

Print Previous page Top page Next page

ic_8391 The dialog is intended for calculating the values ​​of semantic characteristics of the selected objects by formulas.

A formula is a character string containing numbers, mathematical operations, links to the values ​​of semantics of an object, its area and perimeter, and other properties.

 

Allowed operations:

 

+            

- add;

-    

- subtract;

*  

- multiply;

/

- divide;

ABS(...)

- absolute value;

ARM(... ,..., )

- arithmetic mean, separator - «,» (comma);

LOG(...)

- natural logarithm;

LOG10(...)

- decimal logarithm;

MAX(... ,..., )

- maximum value, separator - «,» (comma);

MIN(... ,..., )

- minimum value, separator - «,» (comma);

SIN(…)

- sin of the angle in degrees;

COS (…)

- cos of the angle in degrees;

TG (…)

- tg of the angle in degrees;

CTG(…)

- ctg of the angle in degrees;

SQRT2(...)

- square root;

SQRT3(...)

- cubic root,

POW2(...)

- squaring;

POW3(...)

- raising to a cube;

D

- directional angle from the first point;

P

- perimeter of the object;

S

- area of ​​the object;

X1

- X coordinate of the first point in meters;

Y1

- Y coordinate of the first point in meters;

B1

- latitude of the first point in degrees;

L1

- longitude of the first point in degrees;

- X coordinate of the center of object in meters;

- Y coordinate of the center of object in meters;

BC

- latitude of the center of object in degrees;

LC

- longitude of the center of object in degrees;

ID

- unique object number;

PI

- number of pi;

#

- indicates that further is the code of semantics, in which the value lies, further a default value can be in parentheses. It is allowed to use numbers from 0 to 9, with a separator «.» (point) and parenthesis «( )».

 

 

Example:  

#1 (0) - to take value of semantics 1, at absence of semantics to take value 0.

For operations: +,-, *,/, max, min, abs - quantity of operands no more than 10.

Examples of formulas:

1. Calculation of the hatch height. The height of the hatch consists of a mark of height of the deepest laying and radius of a pipe. Semantics 213 (Height of a laying) is a repeated one. We shall take the minimal value (at absence of such semantics, we shall take the value in brackets). By semantics 60 (Diameter of a pipe) - we shall calculate radius. We shall finally receive.

                         min(#213(0))+#60(2)/2

2. Calculation of approximated volume of a building. Multiply area S onto the value of semantics 1 (Absolute height) (at absence 3).

                           S*#1(3)

3.  Calculation of the area of a roadbed. We shall multiply semantics 46 (Width of a covering) onto Р - perimeter.

                          P * #46(4)

4.  Approximate calculation of a wood's stock. We shall divide the area of wood P onto the area occupied by one tree - semantics 61 (Distance between trees) in a square and we shall multiply onto volume of wood of the tree, received by semantics 60 (Thickness) and 1 (Relative height).

                        P/(#61(1)* #61(1) ) * PI * #60(0.5) * #60(0.5)/4 * #1(4)  

P is the perimeter. It is necessary to indicate S - area.

The list of formulas for calculation is requested from the ini- file and the classifier. The user can create his own formulas.

The list of allowed operations is for adding operations to a formula.

The operation is inserted into the formula at the cursor position when you double-click on the selected row. The semantics code used in calculations is inserted into the formula at the cursor position when you double-click on the selected line in the list of numeric semantics of the object (upper list).

In parentheses, the user must indicate the value used in the calculations, in the absence of this characteristic in the semantics of the object.

 

The user can write down the created formula into an ini-file. If the formula is incorrect by syntax neither record, nor calculations are not spent. Thus the message "Erroneous task of the formula" with brief decoding a possible error is shown.  

The calculated value, by pressing the Execute button, is entered as numerical or symbolical value of semantics marked in the bottom list into all marked objects.

If "Transactions log" is included, changes in semantics of objects are written down into transactions log.

The list of objects for which calculations were not executed by any reasons are written down into LOG.

On the termination of calculations the message about quantity of successfully or not successfully updated objects is shown.