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;

%

- divide modulo (take the remainder of the division);

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;

SUM(...)

- summation of the values of the repeatable semantics of the object or specified values;

D

- directional angle from the first point;

P

- perimeter (for a polygon) or object length;

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.

If the code of repeatable semantics is specified as an operand for operations MAX, MIN, ARM, SUM, then the operation is performed on all values of this semantics - the maximum or minimum value is selected, the average value or the sum of all values is calculated.

Examples of formulas:

1. Calculation of height of the hatch. We will suppose that the relative depth of lying the technological hatch is made up of the height of the minimum depth of the gasket and the diameter of the pipe. Semantics 213 (Depth of lying) is repeatable (an object can have several records of the semantics of the same code with different values). We shall take the minimum depth value (in the absence of such semantics, take the value in parentheses) and subtract the diameter calculated by the semantics 60 (Radius of the pipe). We shall finally receive:

                         min(#213(2))-#60(0.5)*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.  Calculating the area of the roadbed. The semantics 46 (Coverage width) is multiplied by the P – length of the object:

                          P * #46(4)

4.  Approximate calculation of the wood stock. The area of the forest S is divided by the area occupied by one tree - semantics 61 (Distance between trees) squared, and multiplied by the volume of wood of the tree obtained by semantics 60 (Thickness) and 1 (Relative height):

                        S/(PI*#61(3)*#61(3)/4)*PI*#60(0.5)*#60(0.5)/4*#1(4)  

5.  Formation of the text of the signature in the form of a fragment of the object identifier. For example, an object has an identifier like "25701517290" in semantics 220. You must use the last 6 digits to sign the object. Using the Modulo division operation, you can select the last digits that will be included into the auxiliary semantics (for example, 221, which will be displayed as part of a signature or a vector character from the string "#221"):

                          #220%1000000

 

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 performed for some reason is entered into the map protocol (log) in the LOG folder.

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