Справка по функциям калькулятора полей QGIS

Материал из GIS-Lab
Версия от 05:02, 3 февраля 2012; Bolotoved (обсуждение | вклад) (Новая страница: «{{Статья|Черновик}} Справка по функциям калькулятора полей QGIS = Список функций = == Оператор...»)
(разн.) ← Предыдущая версия | Текущая версия (разн.) | Следующая версия → (разн.)
Перейти к навигации Перейти к поиску
Эта страница является черновиком статьи.


Справка по функциям калькулятора полей QGIS

Список функций

Операторы

+

-

*

/

%

^

=

>

<

<>

<=

>=

||

LIKE

ILIKE

IS

OR

AND

NOT

Математические

Математические функции, такие как квадратный корень, sin и cos.

sqrt

sin

cos

tan

asin

acos

atan

atan2

exp

ln

log10

log

Преобразования

Функции для преобразования одного типа данных в другой, например для преобразования строковых данных в числовые, числовых в строковые.

toint

toreal

tostring

Строковые

Функции для работы со строковыми данными, например замена или преобразование в верхний регистр.

lower

upper

lenght

replace

regexp_replace

substr

Геометрические

Функции для операций с геометрией объектов, например для расчета длин и площадей.

xat

yat

$area

$length

$perimeter

$x

$y

Записи

$rownum

$id

Поля и значения

Содержит список полей слоя. Конкретные значения поля доступны по правому щелчку мыши.

Выберите значение поля из списка и щелкните по нему правой кнопкой мыши. Появится контекстное меню для загрузки значений из выбранного поля.


Function List

Operators

This group contains operators e.g + - *

+

-

*

/

%

^

=

>

<

<>

<=

>=

||

LIKE

ILIKE

IS

OR

AND

NOT

Math

This group contains math functions e.g square root, sin and cos

sqrt

sin

cos

tan

asin

acos

atan

atan2

exp

ln

log10

log

Conversions

This group contains functions to convert on data type to another e.g string to integer, integer to string.

toint

toreal

tostring

String

This group contains functions that operate on strings e.g replace, convert to upper case.

lower

lower() function Converts a string to lower case letters. Syntax lower(string) Arguments string -> is string. The String to convert to lower case. Example lower('HELLO World') -> 'hello world'

upper

upper() function Converts a string to upper case letters. Syntax upper(string) Arguments string -> is string. The String to convert to upper case. Example upper('hello WOrld') -> 'HELLO WORLD'

lenght

length() function Returns the length of a string. Syntax length(string) Arguments string -> is string. The String to count the length of. Example length('HELLO') -> 5

replace

replace() function Returns a string with the the supplied string replaced. Syntax replace(string,before,after) Arguments string -> is string. The start string. before -> is string. The string to replace. after -> is string. The string that will replace before

Example replace('QGIS SHOULD ROCK','SHOULD','DOES') -> 'QGIS DOES ROCK'

regexp_replace

substr

substr() function Return a part of a string Syntax substr(string,startpos,length) Arguments string -> is string. The full string. startpos -> is number. The start position to extract from. length -> is number. The length of the string to extract.

Example substr('HELLO WORLD',3,5) -> 'LLO W'


Geometry

This group contains functions that operate on geometry objects e.g length, area.

xat

yat

$area

$length

$perimeter

$x

$y

Record

$rownum

$id

Fields and Values

Contains a list of fields from the layer. Sample values can also be accessed via right-click.

Select the field name from the list then right-click to access context menu with options to load sample values from the selected field.