2 #include <QCoreApplication>
11 gFunctionHelpTexts.insert(
"$area", QCoreApplication::translate(
"function_help",
"<h3>$area function</h3>\n"
12 "Returns the area size of the current feature.\n"
17 "<h4>Arguments</h4>\n"
21 "<pre>$area → 42</pre>\n"
24 gFunctionHelpTexts.insert(
"$atlasfeature", QCoreApplication::translate(
"function_help",
"<h3>$atlasfeature function</h3>\n"
25 "In atlas generation, returns the current feature that is iterated over on the coverage layer. This can be used with the 'attribute' function\n"
26 "to return attribute values from the current atlas feature.\n"
29 "<pre>$atlasfeature</pre>\n"
31 "<h4>Arguments</h4>\n"
35 "<pre>attribute( $atlasfeature, 'name' ) → returns value stored in 'name' attribute for the current atlas feature</pre>\n"
38 gFunctionHelpTexts.insert(
"$atlasfeatureid", QCoreApplication::translate(
"function_help",
"<h3>$atlasfeatureid function</h3>\n"
39 "Returns the feature id of the current row while using atlas.\n"
40 "This enables you to use features of atlas in rules \n"
41 "and for example show or hide features based on their id.\n"
44 "<pre>$atlasfeatureid</pre>\n"
46 "<h4>Arguments</h4>\n"
50 "<pre>$atlasfeatureid = $id</pre>\n"
53 gFunctionHelpTexts.insert(
"$atlasgeometry", QCoreApplication::translate(
"function_help",
"<h3>$atlasgeometry function</h3>\n"
54 "Returns the geometry of the current feature iterated in atlas.\n"
55 "Can be used for rule based display of geometry when using atlas.\n"
56 "For example to only show geometries of other layers when their geometry \n"
57 "intersects the iterated geometry of features using atlas.\n"
60 "<pre>$atlasgeometry</pre>\n"
62 "<h4>Arguments</h4>\n"
66 "<pre> intersects( $atlasgeometry, $geometry ) </pre>\n"
69 gFunctionHelpTexts.insert(
"$currentfeature", QCoreApplication::translate(
"function_help",
"<h3>$currentfeature function</h3>\n"
70 "Returns the current feature being evaluated. This can be used with the 'attribute' function\n"
71 "to evaluate attribute values from the current feature.\n"
74 "<pre>$currentfeature</pre>\n"
76 "<h4>Arguments</h4>\n"
80 "<pre>attribute( $currentfeature, 'name' ) → returns value stored in 'name' attribute for the current feature</pre>\n"
83 gFunctionHelpTexts.insert(
"$feature", QCoreApplication::translate(
"function_help",
"<h3>$feature function</h3>\n"
84 "In atlas generation, returns the current feature number that is iterated over on the coverage layer.\n"
87 "<pre>$feature</pre>\n"
89 "<h4>Arguments</h4>\n"
93 "<pre>$feature → 2</pre>\n"
96 gFunctionHelpTexts.insert(
"$geometry", QCoreApplication::translate(
"function_help",
"<h3>$geometry function</h3>\n"
97 "Returns the geometry of the current feature. Can be used for processing with other functions.\n"
100 "<pre>$geometry</pre>\n"
102 "<h4>Arguments</h4>\n"
106 "<pre> geomToWKT( $geometry ) → POINT(6 50)</pre>\n"
109 gFunctionHelpTexts.insert(
"$id", QCoreApplication::translate(
"function_help",
"<h3>$id function</h3>\n"
110 "Returns the feature id of the current row.\n"
115 "<h4>Arguments</h4>\n"
119 "<pre>$id → 42</pre>\n"
122 gFunctionHelpTexts.insert(
"$length", QCoreApplication::translate(
"function_help",
"<h3>$length function</h3>\n"
123 "Returns the length of the current feature.\n"
126 "<pre>$length</pre>\n"
128 "<h4>Arguments</h4>\n"
132 "<pre>$length → 42.4711</pre>\n"
134 gFunctionHelpTexts.insert(
"$map", QCoreApplication::translate(
"function_help",
"<h3>$map function</h3>\n"
135 "Returns the id of the current map item if the map is being drawn in a composition, or \"canvas\" if the map is being\n"
136 "drawn within the main QGIS window.\n"
141 "<h4>Arguments</h4>\n"
145 "<!-- Show example of function.-->\n"
146 "<pre>$map → \"overview_map\" (within a composer item)<br />\n"
147 "$map → \"canvas\" (within the main QGIS main canvas)</pre>\n"
151 gFunctionHelpTexts.insert(
"$now", QCoreApplication::translate(
"function_help",
"<h3>$now function</h3>\n"
152 "Returns the current date and time\n"
157 "<h4>Arguments</h4>\n"
161 "<pre>$now → 2012-07-22T13:24:57</pre>\n"
164 gFunctionHelpTexts.insert(
"$numfeatures", QCoreApplication::translate(
"function_help",
"<h3>$numfeatures function</h3>\n"
165 "In atlas generation, returns the total number of features within the coverage layer.\n"
168 "<pre>$numfeatures</pre>\n"
170 "<h4>Arguments</h4>\n"
174 "<pre>$numfeatures → 42</pre>\n"
177 gFunctionHelpTexts.insert(
"$numpages", QCoreApplication::translate(
"function_help",
"<h3>$numpages function</h3>\n"
178 "Returns the total number of pages in the composition.\n"
181 "<pre>$numpages</pre>\n"
183 "<h4>Arguments</h4>\n"
187 "<pre>$numpages → 42</pre>\n"
190 gFunctionHelpTexts.insert(
"$page", QCoreApplication::translate(
"function_help",
"<h3>$page function</h3>\n"
191 "Returns the current page number within a composition.\n"
196 "<h4>Arguments</h4>\n"
200 "<pre>$page → 2</pre>\n"
203 gFunctionHelpTexts.insert(
"$perimeter", QCoreApplication::translate(
"function_help",
"<h3>$perimeter function</h3>\n"
204 "Returns the perimeter length of the current feature.\n"
207 "<pre>$perimeter</pre>\n"
209 "<h4>Arguments</h4>\n"
213 "<pre>$perimeter → 42</pre>\n"
216 gFunctionHelpTexts.insert(
"$pi", QCoreApplication::translate(
"function_help",
"<h3>$pi constant</h3>\n"
217 "Returns pi as value for calculations\n"
222 "<h4>Arguments</h4>\n"
226 "<pre>$pi → 3.14159265358979</pre>\n"
228 gFunctionHelpTexts.insert(
"$rownum", QCoreApplication::translate(
"function_help",
"<h3>$rownum function</h3>\n"
229 "Returns the number of the current row.\n"
232 "<pre>$rownum</pre>\n"
234 "<h4>Arguments</h4>\n"
238 "<pre>$rownum → 4711</pre>\n"
241 gFunctionHelpTexts.insert(
"$scale", QCoreApplication::translate(
"function_help",
"<h3>$scale function</h3>\n"
242 "Returns the current scale of the map canvas.\n"
244 "Note: This function is only available in some contexts and will be 0 otherwise. \n"
246 "<code>$scale</code><br>\n"
249 "<!-- Show example of function.-->\n"
250 "<code>$scale → 10000</code><br>\n"
254 gFunctionHelpTexts.insert(
"$uuid", QCoreApplication::translate(
"function_help",
"<h3>$uuid function</h3>\n"
255 "Generates a Universally Unique Identifier (UUID) for each row using the Qt\n"
256 "<a href='http://qt-project.org/doc/qt-4.8/quuid.html#createUuid'>QUuid::createUuid</a>\n"
257 "method. Each UUID is 38 characters long.\n"
262 "<h4>Arguments</h4>\n"
266 "<pre>$uuid → {0bd2f60f-f157-4a6d-96af-d4ba4cb366a1}</pre>\n"
268 gFunctionHelpTexts.insert(
"$x", QCoreApplication::translate(
"function_help",
"<h3>$x function</h3>\n"
269 "Returns the x coordinate of the current feature.\n"
274 "<h4>Arguments</h4>\n"
278 "<pre>$x → 42</pre>\n"
281 gFunctionHelpTexts.insert(
"$y", QCoreApplication::translate(
"function_help",
"<h3>$y function</h3>\n"
282 "Returns the y coordinate of the current feature.\n"
287 "<h4>Arguments</h4>\n"
291 "<pre>$y → 42</pre>\n"
294 gFunctionHelpTexts.insert(
"AND", QCoreApplication::translate(
"function_help",
"<h3>AND logical operator</h3>\n"
295 "Returns 1 when condition a and b are true.\n"
298 "<pre> condition a AND condition b </pre>\n"
300 "<h4>Arguments</h4>\n"
304 "<pre> 4 = 2+2 AND 1 = 1 → returns 1 </pre>\n"
305 "<pre> 4 = 2+2 AND 1 = 2 → returns 0 </pre>\n"
308 gFunctionHelpTexts.insert(
"CASE", QCoreApplication::translate(
"function_help",
"<h3>CASE expression</h3>\n"
309 "A conditional expression that can be used to evaluate multiple expressions and\n"
315 " WHEN <i>condition</i> THEN <i>result</i>\n"
317 " [ ELSE <i>result</i> ]\n"
320 "[ ] marks optional components\n"
322 "<h4>Arguments</h4>\n"
323 "<!-- List args for functions here-->\n"
324 "<i> WHEN condition</i> - The condition expression to evaluate. <br>\n"
325 "<i> THEN result</i> - If <i>condition</i> evaluates to True then <i>result</i> is evaluated and returned. <br>\n"
326 "<i> ELSE result</i> - If none of the above conditions evaluated to True then <i>result</i> is evaluated and returned. <br>\n"
329 "<!-- Show example of function.-->\n"
332 " WHEN <i>\"column\" IS NULL</i> THEN <i>'None'</i>\n"
336 gFunctionHelpTexts.insert(
"CASE ELSE", QCoreApplication::translate(
"function_help",
"<h3>CASE expression</h3>\n"
337 "A conditional expression that can be used to evaluate multiple expressions and\n"
343 " WHEN <i>condition</i> THEN <i>result</i>\n"
345 " [ ELSE <i>result</i> ]\n"
348 "[ ] marks optional components\n"
350 "<h4>Arguments</h4>\n"
351 "<!-- List args for functions here-->\n"
352 "<i> WHEN condition</i> - The condition expression to evaluate. <br>\n"
353 "<i> THEN result</i> - If <i>condition</i> evaluates to True then <i>result</i> is evaluated and returned. <br>\n"
354 "<i> ELSE result</i> - If none of the above conditions evaluated to True then <i>result</i> is evaluated and returned. <br>\n"
357 "<!-- Show example of function.-->\n"
360 " WHEN <i>\"column\" IS NULL</i> THEN <i>'None'</i>\n"
361 " ELSE <i>\"column\"</i>\n"
365 gFunctionHelpTexts.insert(
"Color", QCoreApplication::translate(
"function_help",
"\n"
366 "<h3>Color Group</h3>\n"
367 "This group contains functions for manipulating colors\n"
369 gFunctionHelpTexts.insert(
"Conditionals", QCoreApplication::translate(
"function_help",
"<h3>Conditionals Group</h3>\n"
370 "This group contains functions to handle conditional checks in expressions.\n"
372 gFunctionHelpTexts.insert(
"Conditions", QCoreApplication::translate(
"function_help",
"<h3>Conditions Group</h3>\n"
373 "This group contains functions that operate on condition.\n"
375 gFunctionHelpTexts.insert(
"Conversions", QCoreApplication::translate(
"function_help",
"<h3>Conversions Group</h3>\n"
376 "This group contains functions to convert on data type to another e.g string to integer, integer to string.\n"
378 gFunctionHelpTexts.insert(
"Date and Time", QCoreApplication::translate(
"function_help",
"<h3>Date and Time Group</h3>\n"
379 "This group contains functions for handling date and time data.\n"
381 gFunctionHelpTexts.insert(
"Field", QCoreApplication::translate(
"function_help",
"<h3>Field</h3>\n"
382 "Double click to add field name to expression string.\n"
384 "Right-Click on field name to open context menu sample value loading options.\n"
386 "<p><h4>Note:</h4>\n"
387 "Loading field values from WFS layers isn't supported, before the layer is\n"
388 "actually inserted, ie. when building queries.\n"
391 gFunctionHelpTexts.insert(
"Fields and Values", QCoreApplication::translate(
"function_help",
"<h3>Fields and Values</h3>\n"
392 "Contains a list of fields from the layer. Sample values can also be accessed via right-click.\n"
394 "Select the field name from the list then right-click to access context menu with options to load sample values from the selected field.\n"
396 "<p><h4>Note:</h4>\n"
397 "Loading field values from WFS layers isn't supported, before the layer is\n"
398 "actually inserted, ie. when building queries.\n"
401 gFunctionHelpTexts.insert(
"GeometryGroup", QCoreApplication::translate(
"function_help",
"<h3>Geometry Group</h3>\n"
402 "This group contains functions that operate on geometry objects e.g length, area.\n"
404 gFunctionHelpTexts.insert(
"ILIKE", QCoreApplication::translate(
"function_help",
"<h3>ILIKE expression</h3>\n"
405 "Returns 1 if the first parameter matches case-insensitive the supplied pattern. LIKE can be used instead of ILIKE to make the match case-sensitive. Works with numbers also.\n"
408 "<pre>string/number ILIKE pattern</pre>\n"
410 "<h4>Arguments</h4>\n"
414 "<pre> 'A' ILIKE 'A' → returns 1 </pre>\n"
415 "<pre> 'A' ILIKE 'a' → returns 1 </pre>\n"
416 "<pre> 'A' ILIKE 'B' → returns 0 </pre>\n"
418 gFunctionHelpTexts.insert(
"IN", QCoreApplication::translate(
"function_help",
"<h3>IN expression</h3>\n"
419 "Returns 1 if value is found within a list of values\n"
422 "<pre>'a' IN ('a', 'b')</pre>\n"
424 "<h4>Arguments</h4>\n"
428 "<pre> 'A' IN ('A','B\") → returns 1 </pre>\n"
429 "<pre> 'A' IN ('C','B\") → returns 0 </pre>\n"
432 gFunctionHelpTexts.insert(
"IS", QCoreApplication::translate(
"function_help",
"<h3>IS expression</h3>\n"
433 "Returns 1 if a is the same as b.\n"
436 "<pre>a IS b</pre>\n"
438 "<h4>Arguments</h4>\n"
442 "<pre> 'A' IS 'A' → returns 1 </pre>\n"
443 "<pre> 'A' IS 'a' → returns 0 </pre>\n"
444 "<pre> 4 IS 4 → returns 1 </pre>\n"
445 "<pre> 4 IS 2+2 → returns 1 </pre>\n"
446 "<pre> 4 IS 2 → returns 0 </pre>\n"
447 "<pre> $geometry IS NULL → returns 0, if your geometry is not NULL</pre>\n"
450 gFunctionHelpTexts.insert(
"LIKE", QCoreApplication::translate(
"function_help",
"<h3>LIKE expression</h3>\n"
451 "Returns 1 if the first parameter matches the supplied pattern. Works with numbers also.\n"
454 "<pre>string/number LIKE pattern</pre>\n"
456 "<h4>Arguments</h4>\n"
460 "<pre> 'A' LIKE 'A' → returns 1 </pre>\n"
461 "<pre> 'A' LIKE 'a' → returns 0 </pre>\n"
462 "<pre> 'A' LIKE 'B' → returns 0 </pre>\n"
464 gFunctionHelpTexts.insert(
"Math", QCoreApplication::translate(
"function_help",
"<h3>Math Group</h3>\n"
465 "This group contains math functions e.g square root, sin and cos\n"
467 gFunctionHelpTexts.insert(
"NOT", QCoreApplication::translate(
"function_help",
"<h3>NOT</h3>\n"
468 "Returns 1 if a is not the same as b.\n"
471 "<pre> a NOT b </pre>\n"
473 "<h4>Arguments</h4>\n"
477 "<pre> 'a' IS NOT 'b' → returns 1 </pre>\n"
478 "<pre> 'a' IS NOT 'a' → returns 0 </pre>\n"
479 "<pre> 4 IS NOT 2+2 → returns 0 </pre>\n"
482 gFunctionHelpTexts.insert(
"OR", QCoreApplication::translate(
"function_help",
"<h3>OR logical operator</h3>\n"
483 "Returns 1 when condition a or b is true.\n"
486 "<pre> condition a OR condition b </pre>\n"
488 "<h4>Arguments</h4>\n"
492 "<pre> 4 = 2+2 OR 1 = 1 → returns 1 </pre>\n"
493 "<pre> 4 = 2+2 OR 1 = 2 → returns 1 </pre>\n"
494 "<pre> 4 = 2 OR 1 = 2 → returns 0 </pre>\n"
496 gFunctionHelpTexts.insert(
"Operators", QCoreApplication::translate(
"function_help",
"<h3>Operators Group</h3>\n"
497 "This group contains operators e.g + - * \n"
499 gFunctionHelpTexts.insert(
"Record", QCoreApplication::translate(
"function_help",
"<h3>Record Group</h3>\n"
500 "This group contains functions that operate on record identifiers.\n"
502 gFunctionHelpTexts.insert(
"String", QCoreApplication::translate(
"function_help",
"<h3>String Group</h3>\n"
503 "This group contains functions that operate on strings e.g replace, convert to upper case.\n"
505 gFunctionHelpTexts.insert(
"abs", QCoreApplication::translate(
"function_help",
"<h3>abs() function</h3>\n"
506 "Returns the absolute value of a number.<br>\n"
510 "abs(<i>value</i>)<br>\n"
512 "<h4>Arguments</h4>\n"
513 "<code>value</code> - a number.<br>\n"
516 "<code>abs(-2) → 2</code><br>\n"
518 gFunctionHelpTexts.insert(
"acos", QCoreApplication::translate(
"function_help",
"<h3>acos() function</h3>\n"
519 "Returns arcuscosinus of a value in radians.\n"
522 "<p><h4>Syntax</h4>\n"
523 " acos(<i>real</i>)</p>\n"
525 "<p><h4>Arguments</h4>\n"
526 "<i>real</i> → cos of an angle.</p>\n"
528 "<p><h4>Example</h4>\n"
529 " acos(0.5) → 1.0471975511966</p>\n"
531 gFunctionHelpTexts.insert(
"age", QCoreApplication::translate(
"function_help",
"<h3>age() function</h3>\n"
532 "Returns the difference between two dates.\n"
534 "The difference is returned as a <code>Interval</code> \n"
535 "and needs to be used with one of the following functions\n"
536 "in order to extract useful information:\n"
538 "<li><code>year</code>\n"
539 "<li><code>month</code>\n"
540 "<li><code>week</code>\n"
541 "<li><code>day</code>\n"
542 "<li><code>hour</code>\n"
543 "<li><code>minute</code>\n"
544 "<li><code>second</code>\n"
547 "<code>age(string,string)</code><br>\n"
548 "<code>age(datetime,datetime)</code><br>\n"
549 "<code>age(string,datetime)</code><br>\n"
550 "<code>age(datetime,string)</code><br>\n"
552 "<h4>Arguments</h4>\n"
553 "<code>string</code> - is string. A string in date format.\n"
555 "<code>datetime</code> - is date or datetime. A date or datetime type.\n"
558 "<!-- Show example of function.-->\n"
559 "<code>age('2012-05-12','2012-05-2') → Interval</code><br>\n"
560 "use <code>day</code> to extract number of days<br>\n"
561 "<code>day(age('2012-05-12','2012-05-2')) → 10</code><br>\n"
564 gFunctionHelpTexts.insert(
"asin", QCoreApplication::translate(
"function_help",
"<h3>asin() function</h3>\n"
565 "Returns arcussinus of a value in radians.\n"
568 "<p><h4>Syntax</h4>\n"
569 " asin(<i>real</i>)</p>\n"
571 "<p><h4>Arguments</h4>\n"
572 "<i>real</i> → sin of an angle.</p>\n"
574 "<p><h4>Example</h4>\n"
575 " asin(1.0) → 1.5707963267949</p>\n"
577 gFunctionHelpTexts.insert(
"atan", QCoreApplication::translate(
"function_help",
"<h3>atan() function</h3>\n"
578 "Returns arcustanget of a value in radians.\n"
581 "<p><h4>Syntax</h4>\n"
582 " atan(<i>real</i>)</p>\n"
584 "<p><h4>Arguments</h4>\n"
585 "<i>real</i> → tan of an angle.</p>\n"
587 "<p><h4>Example</h4>\n"
588 " atan(0.5) → 0.463647609000806</p>\n"
590 gFunctionHelpTexts.insert(
"atan2", QCoreApplication::translate(
"function_help",
"<h3>atan2() function</h3>\n"
591 "Returns arcustangens of y/x using the signs of the two \n"
592 "arguments to determine the quadrant of the result\n"
596 "<p><h4>Syntax</h4>\n"
597 " atan2(<i>real</i>, <i>real</i>)</p>\n"
599 "<p><h4>Arguments</h4>\n"
600 "<i>real</i> → y coordinate difference<br>\n"
601 "<i>real</i> → x coordinate difference</p>\n"
603 "<p><h4>Example</h4>\n"
604 " atan2(1.0, 1.732) → 0.523611477769969</p>\n"
606 gFunctionHelpTexts.insert(
"attribute", QCoreApplication::translate(
"function_help",
"<h3>attribute function</h3>\n"
607 "Returns the value of a specified attribute from a feature.\n"
610 "<pre>attribute( feature, attribute_name )</pre>\n"
612 "<h4>Arguments</h4>\n"
613 "feature → a feature<br />\n"
614 "attribute_name → name of attribute to be returned\n"
617 "<pre>attribute( $currentfeature, 'name' ) → returns value stored in 'name' attribute for the current feature</pre>\n"
620 gFunctionHelpTexts.insert(
"bbox", QCoreApplication::translate(
"function_help",
"<h3>bbox function</h3>\n"
621 "Returns 1 if the geometries spatially intersect the bounding box defined and 0 if they don't.\n"
624 "<pre>bbox( a, b )</pre>\n"
626 "<h4>Arguments</h4>\n"
627 "a → geometry\n"
628 "b → geometry\n"
631 "<pre>bbox( geomFromWKT( 'POINT(4 5)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) → returns 1</pre>\n"
632 "<pre>bbox( geomFromWKT( 'POINT(6 5)' ) , geomFromWKT( 'POLYGON((3 3 , 4 4 , 5 5, 3 3))' )) → returns 0</pre>\n"
634 gFunctionHelpTexts.insert(
"bounds", QCoreApplication::translate(
"function_help",
"<h3>bounds function</h3>\n"
635 "Returns a geometry which represents the bounding box of an input geometry. Calculations are in the Spatial Reference System of this Geometry. \n"
638 "<pre>bounds(geom)</pre>\n"
640 "<h4>Arguments</h4>\n"
641 "geom → a geometry\n"
644 "<pre> bounds($geometry) → returns bounding box of $geometry</pre>\n"
647 gFunctionHelpTexts.insert(
"bounds_height", QCoreApplication::translate(
"function_help",
"<h3>bounds_height function</h3>\n"
648 "Returns the height of the bounding box of a geometry. Calculations are in the Spatial Reference System of this Geometry. \n"
651 "<pre>bounds_height(geom)</pre>\n"
653 "<h4>Arguments</h4>\n"
654 "geom → a geometry\n"
657 "<pre> bounds_height($geometry) → returns height of bounding box of $geometry</pre>\n"
660 gFunctionHelpTexts.insert(
"bounds_width", QCoreApplication::translate(
"function_help",
"<h3>bounds_width function</h3>\n"
661 "Returns the width of the bounding box of a geometry. Calculations are in the Spatial Reference System of this Geometry. \n"
664 "<pre>bounds_width(geom)</pre>\n"
666 "<h4>Arguments</h4>\n"
667 "geom → a geometry\n"
670 "<pre> bounds_width($geometry) → returns width of bounding box of $geometry</pre>\n"
673 gFunctionHelpTexts.insert(
"buffer", QCoreApplication::translate(
"function_help",
"<h3>buffer function</h3>\n"
674 "Returns a geometry that represents all points whose distance from this geometry is less than or equal to distance. Calculations are in the Spatial Reference System of this Geometry. \n"
677 "<pre>buffer(a, b)</pre>\n"
679 "<h4>Arguments</h4>\n"
680 "a → geometry\n"
681 "b → distance for the buffer\n"
684 "<pre> buffer($geometry, 10.5 ) → returns a polygon</pre>\n"
687 gFunctionHelpTexts.insert(
"ceil", QCoreApplication::translate(
"function_help",
"<h3>ceil() function</h3>\n"
688 "Rounds a number upwards.\n"
691 "<code>ceil(value)</code><br>\n"
693 "<h4>Arguments</h4>\n"
694 "<code>value</code> - a number.\n"
698 "<!-- Show example of function.-->\n"
699 "<code>ceil(4.9) → 5</code><br>\n"
700 "<code>ceil(-4.9) → -4</code><br>\n"
702 gFunctionHelpTexts.insert(
"centroid", QCoreApplication::translate(
"function_help",
"<h3>centroid function</h3>\n"
703 "Returns the geometric center of a geometry.\n"
706 "<pre>centroid(a)</pre>\n"
708 "<h4>Arguments</h4>\n"
709 "b → geometry\n"
712 "<pre> centroid($geometry) → returns a point geometry</pre>\n"
715 gFunctionHelpTexts.insert(
"clamp", QCoreApplication::translate(
"function_help",
"<h3>clamp() function</h3>\n"
716 "Restricts an input value to a specified range.\n"
718 "<p><h4>Syntax</h4>\n"
719 " clamp(<i>minimum</i>,<i>input</i>,<i>maximum</i>)</p>\n"
721 "<p><h4>Arguments</h4>\n"
722 "<!-- List args for functions here-->\n"
723 "<i> minimum</i> → The smallest value <i>input</i> is allowed to take.<br>\n"
724 "<i> input</i> → a value which will be restricted to the range specified by <i>minimum</i> and <i>maximum</i>.<br>\n"
725 "<i> maximum</i> → The largest value <i>input</i> is allowed to take.<br>\n"
728 "<!-- Show example of function.-->\n"
729 " clamp(1,5,10) → 5 (<i>input</i> is between 1 and 10 so is returned unchanged)<br>\n"
730 " clamp(1,0,10) → 1 (<i>input</i> is less than minimum value of 1, so function returns 1)<br>\n"
731 " clamp(1,11,10) → 10 (<i>input</i> is greater than maximum value of 10, so function returns 10)<br>\n"
735 gFunctionHelpTexts.insert(
"coalesce", QCoreApplication::translate(
"function_help",
"<h3>coalesce() function</h3>\n"
736 "Returns the first non-NULL value from the expression list.\n"
738 "This function can take any number of arguments.\n"
740 "<code>coalesce(expression1, expression2 ...)</code><br>\n"
742 "<h4>Arguments</h4>\n"
743 "<code>expression</code> - any valid expression or value, irregardless of type.\n"
747 "<!-- Show example of function.-->\n"
748 "<code>coalesce(NULL, 2) → 2</code><br>\n"
749 "<code>coalesce(NULL, 2, 3) → 2</code><br>\n"
750 "<code>coalesce(7, NULL, 3*2) → 7</code><br><br>\n"
751 "<code>coalesce(\"fieldA\", \"fallbackField\", 'ERROR') → value of fieldA if it is non-NULL\n"
752 " else the value of \"fallbackField\" or the string 'ERROR' if both are NULL</code><br>\n"
755 gFunctionHelpTexts.insert(
"color_cmyk", QCoreApplication::translate(
"function_help",
"\n"
756 "<h3>color_cmyk() function</h3>\n"
757 "Returns a string representation of a color based on its cyan, magenta, yellow and black components\n"
759 "<p><h4>Syntax</h4>\n"
760 " color_cmyk(<i>cyan, magenta, yellow, black</i>)</p>\n"
762 "<p><h4>Arguments</h4>\n"
763 "<!-- List args for functions here-->\n"
764 "<i> cyan</i> → the cyan component of the color, as a percentage integer value from 0 to 100.<br>\n"
765 "<i> magenta</i> → the magenta component of the color, as a percentage integer value from 0 to 100.<br>\n"
766 "<i> yellow</i> → the yellow component of the color, as a percentage integer value from 0 to 100.<br>\n"
767 "<i> black</i> → the black component of the color, as a percentage integer value from 0 to 100.<br>\n"
769 "<p><h4>Example</h4>\n"
770 "<!-- Show example of function.-->\n"
771 " color_cmyk(100,50,0,10) → '0,115,230'</p>\n"
773 gFunctionHelpTexts.insert(
"color_cmyka", QCoreApplication::translate(
"function_help",
"\n"
774 "<h3>color_cmyka() function</h3>\n"
775 "Returns a string representation of a color based on its cyan, magenta, yellow, black and alpha (transparency) components\n"
777 "<p><h4>Syntax</h4>\n"
778 " color_cmyka(<i>cyan, magenta, yellow, black, alpha</i>)</p>\n"
780 "<p><h4>Arguments</h4>\n"
781 "<!-- List args for functions here-->\n"
782 "<i> cyan</i> → the cyan component of the color, as a percentage integer value from 0 to 100.<br>\n"
783 "<i> magenta</i> → the magenta component of the color, as a percentage integer value from 0 to 100.<br>\n"
784 "<i> yellow</i> → the yellow component of the color, as a percentage integer value from 0 to 100.<br>\n"
785 "<i> black</i> → the black component of the color, as a percentage integer value from 0 to 100.<br>\n"
786 "<i> alpha</i> → the alpha component as an integer value from 0 (completely transparent) to 255 (opaque).<br>\n"
788 "<p><h4>Example</h4>\n"
789 "<!-- Show example of function.-->\n"
790 " color_cmyka(100,50,0,10,200) → '0,115,230,200'</p>\n"
792 gFunctionHelpTexts.insert(
"color_hsl", QCoreApplication::translate(
"function_help",
"<h3>color_hsl() function</h3>\n"
793 "Returns a string representation of a color based on its hue, saturation, and lightness attributes\n"
795 "<p><h4>Syntax</h4>\n"
796 " color_hsl(<i>hue, saturation, lightness</i>)</p>\n"
798 "<p><h4>Arguments</h4>\n"
799 "<!-- List args for functions here-->\n"
800 "<i> hue</i> → the hue of the color, as an integer value from 0 to 360.<br>\n"
801 "<i> saturation</i> → the saturation percentage of the color as an integer value from 0 to 100.<br>\n"
802 "<i> lightness</i> → the lightness percentage of the color as an integer value from 0 to 100.<br>\n"
804 "<p><h4>Example</h4>\n"
805 "<!-- Show example of function.-->\n"
806 " color_hsl(100,50,70) → '166,217,140'</p>\n"
808 gFunctionHelpTexts.insert(
"color_hsla", QCoreApplication::translate(
"function_help",
"<h3>color_hsla() function</h3>\n"
809 "Returns a string representation of a color based on its hue, saturation, lightness and alpha (transparency) attributes\n"
811 "<p><h4>Syntax</h4>\n"
812 " color_hsla(<i>hue, saturation, lightness, alpha</i>)</p>\n"
814 "<p><h4>Arguments</h4>\n"
815 "<!-- List args for functions here-->\n"
816 "<i> hue</i> → the hue of the color, as an integer value from 0 to 360.<br>\n"
817 "<i> saturation</i> → the saturation percentage of the color as an integer value from 0 to 100.<br>\n"
818 "<i> lightness</i> → the lightness percentage of the color as an integer value from 0 to 100.<br>\n"
819 "<i> alpha</i> → the alpha component as an integer value from 0 (completely transparent) to 255 (opaque).<br>\n"
821 "<p><h4>Example</h4>\n"
822 "<!-- Show example of function.-->\n"
823 " color_hsla(100,50,70,200) → '166,217,140,200'</p>\n"
825 gFunctionHelpTexts.insert(
"color_hsv", QCoreApplication::translate(
"function_help",
"<h3>color_hsv() function</h3>\n"
826 "Returns a string representation of a color based on its hue, saturation, and value attributes\n"
828 "<p><h4>Syntax</h4>\n"
829 " color_hsv(<i>hue, saturation, value</i>)</p>\n"
831 "<p><h4>Arguments</h4>\n"
832 "<!-- List args for functions here-->\n"
833 "<i> hue</i> → the hue of the color, as an integer value from 0 to 360.<br>\n"
834 "<i> saturation</i> → the saturation percentage of the color as an integer value from 0 to 100.<br>\n"
835 "<i> value</i> → the value percentage of the color as an integer from 0 to 100.<br>\n"
837 "<p><h4>Example</h4>\n"
838 "<!-- Show example of function.-->\n"
839 " color_hsv(40,100,100) → '255,170,0'</p>\n"
841 gFunctionHelpTexts.insert(
"color_hsva", QCoreApplication::translate(
"function_help",
"<h3>color_hsva() function</h3>\n"
842 "Returns a string representation of a color based on its hue, saturation, value and alpha (transparency) attributes\n"
844 "<p><h4>Syntax</h4>\n"
845 " color_hsva(<i>hue, saturation, value, alpha</i>)</p>\n"
847 "<p><h4>Arguments</h4>\n"
848 "<!-- List args for functions here-->\n"
849 "<i> hue</i> → the hue of the color, as an integer value from 0 to 360.<br>\n"
850 "<i> saturation</i> → the saturation percentage of the color as an integer value from 0 to 100.<br>\n"
851 "<i> value</i> → the value percentage of the color as an integer from 0 to 100.<br>\n"
852 "<i> alpha</i> → the alpha component as an integer value from 0 (completely transparent) to 255 (opaque).<br>\n"
854 "<p><h4>Example</h4>\n"
855 "<!-- Show example of function.-->\n"
856 " color_hsva(40,100,100,200) → '255,170,0,200'</p>\n"
858 gFunctionHelpTexts.insert(
"color_rgb", QCoreApplication::translate(
"function_help",
"\n"
859 "<h3>color_rgb() function</h3>\n"
860 "Returns a string representation of a color based on its red, green, and blue components\n"
862 "<p><h4>Syntax</h4>\n"
863 " color_rgb(<i>red, green, blue</i>)</p>\n"
865 "<p><h4>Arguments</h4>\n"
866 "<!-- List args for functions here-->\n"
867 "<i> red</i> → the red component as an integer value from 0 to 255.<br>\n"
868 "<i> green</i> → the green component as an integer value from 0 to 255.<br>\n"
869 "<i> blue</i> → the blue component as an integer value from 0 to 255.<br>\n"
871 "<p><h4>Example</h4>\n"
872 "<!-- Show example of function.-->\n"
873 " color_rgb(255,127,0) → '255,127,0'</p>\n"
875 gFunctionHelpTexts.insert(
"color_rgba", QCoreApplication::translate(
"function_help",
"\n"
876 "<h3>color_rgba() function</h3>\n"
877 "Returns a string representation of a color based on its red, green, blue, and alpha (transparency) components\n"
879 "<p><h4>Syntax</h4>\n"
880 " color_rgba(<i>red, green, blue, alpha</i>)</p>\n"
882 "<p><h4>Arguments</h4>\n"
883 "<!-- List args for functions here-->\n"
884 "<i> red</i> → the red component as an integer value from 0 to 255.<br>\n"
885 "<i> green</i> → the green component as an integer value from 0 to 255.<br>\n"
886 "<i> blue</i> → the blue component as an integer value from 0 to 255.<br>\n"
887 "<i> alpha</i> → the alpha component as an integer value from 0 (completely transparent) to 255 (opaque).<br>\n"
889 "<p><h4>Example</h4>\n"
890 "<!-- Show example of function.-->\n"
891 " color_rgba(255,127,0,200) → '255,127,0,200'</p>\n"
893 gFunctionHelpTexts.insert(
"combine", QCoreApplication::translate(
"function_help",
"<h3>combine function</h3>\n"
894 "Returns the combination of geometry a and geometry b.\n"
897 "<pre>combine( geometry a , geometry b)</pre>\n"
899 "<h4>Arguments</h4>\n"
900 "geometry → geometry\n"
901 "geometry → geometry\n"
904 "<pre> geomToWKT( combine( geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5 )' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4, 2 1 )' )) ) → returns MULTILINESTRING((4 4, 2 1), (3 3, 4 4), (4 4, 5 5)) </pre>\n"
905 "<pre> geomToWKT( combine( geomFromWKT( 'LINESTRING(3 3 , 4 4 )' ) , geomFromWKT( 'LINESTRING(3 3 , 6 6, 2 1 )' )) ) → returns LINESTRING(3 3, 4 4, 6 6, 2 1) </pre>\n"
907 gFunctionHelpTexts.insert(
"concat", QCoreApplication::translate(
"function_help",
"<h3>concat() function</h3>\n"
908 "Concatenates several strings to one.\n"
911 " concat(<i>string<i>[,<i>string</i>...])\n"
913 "<h4>Arguments</h4>\n"
914 "<!-- List args for functions here-->\n"
915 "<i> string</i> → is string. a string.<br>\n"
918 "<!-- Show example of function.-->\n"
919 " concat('a','b','c','d','e') → 'abcde'\n"
921 gFunctionHelpTexts.insert(
"contains", QCoreApplication::translate(
"function_help",
"<h3>contains function</h3>\n"
922 "Returns true if and only if no points of b lie in the exterior of a, and at least one point of the interior of b lies in the interior of a. \n"
925 "<pre>contains( geometry a , geometry b)</pre>\n"
927 "<h4>Arguments</h4>\n"
928 "geometry → geometry\n"
929 "geometry → geometry\n"
932 "<pre> contains( geomFromWKT( 'POLYGON((0 0 , 0 1 , 1 1 , 1 0 , 0 0 ))' ) , geomFromWKT( 'POINT( 0.5 0.5 )' )) → returns 1</pre>\n"
933 "<pre> contains( geomFromWKT( 'POLYGON((0 0 , 0 1 , 1 1 , 1 0 , 0 0 ))' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) → returns 0</pre>\n"
935 gFunctionHelpTexts.insert(
"convexHull", QCoreApplication::translate(
"function_help",
"<h3>convexHull function</h3>\n"
936 "Returns the convex hull of a geometry. It represents the minimum convex geometry that encloses all geometries within the set.\n"
939 "<pre>convexHull( a, b )</pre>\n"
941 "<h4>Arguments</h4>\n"
942 "a → geometry\n"
943 "a → geometry\n"
946 "<pre> geomToWKT( convexHull( geomFromWKT( 'LINESTRING(3 3 , 4 4 , 4 10)' )) ) → returns POLYGON((3 3,4 10,4 4,3 3)) </pre>\n"
948 gFunctionHelpTexts.insert(
"cos", QCoreApplication::translate(
"function_help",
"<h3>cos() function</h3>\n"
949 "Returns cosinus of an angle.\n"
952 "<p><h4>Syntax</h4>\n"
953 " cos(<i>real</i>)</p>\n"
955 "<p><h4>Arguments</h4>\n"
956 "<i>real</i> → angle in radians.</p>\n"
958 "<p><h4>Example</h4>\n"
959 " cos(1.571) → 0.000796326710733263</p>\n"
961 gFunctionHelpTexts.insert(
"crosses", QCoreApplication::translate(
"function_help",
"<h3>crosses function</h3>\n"
962 "Returns 1 if the supplied geometries have some, but not all, interior points in common.\n"
965 "<pre>crosses( $geometry , $geometry)</pre>\n"
967 "<h4>Arguments</h4>\n"
968 "geometry → geometry\n"
969 "geometry → geometry\n"
972 "<pre> crosses( geomFromWKT( 'LINESTRING(3 5 , 4 4 , 5 3)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) → returns 1</pre>\n"
973 "<pre> crosses( geomFromWKT( 'POINT(4 5)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) → returns 0</pre>\n"
975 gFunctionHelpTexts.insert(
"day", QCoreApplication::translate(
"function_help",
"<h3>day() function</h3>\n"
976 "Extract the day from a date, or the number of days\n"
977 "from a <code>Interval</code>\n"
980 "<code>day(date)</code><br>\n"
981 "<code>day(Interval)</code><br>\n"
983 "<h4>Arguments</h4>\n"
984 "<code>date</code> - is date or datetime. The date to extract the day from.\n"
986 "<code>Interval</code> - is Interval. The Interval to return the number of days from.\n"
989 "<!-- Show example of function.-->\n"
990 "<code>day('2012-05-12') → 12</code><br>\n"
991 "<code>day(tointerval('3 days')) → 3</code><br>\n"
992 "<code>day(age('2012-01-01','2010-01-01')) → 730</code><br>\n"
995 gFunctionHelpTexts.insert(
"difference", QCoreApplication::translate(
"function_help",
"<h3>difference function</h3>\n"
996 "Returns a geometry that represents that part of geometry a that does not intersect with geometry b.\n"
999 "<pre>difference( a, b )</pre>\n"
1001 "<h4>Arguments</h4>\n"
1002 "geometry → geometry\n"
1003 "geometry → geometry\n"
1005 "<h4>Example</h4>\n"
1006 "<pre> geomToWKT( difference( geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4)' )) ) → returns LINESTRING(4 4, 5 5)</pre>\n"
1008 gFunctionHelpTexts.insert(
"disjoint", QCoreApplication::translate(
"function_help",
"<h3>disjoint function</h3>\n"
1009 "Returns 1 if the geometries do not \"spatially intersect\" - if they do not share any space together. \n"
1012 "<pre>disjoint( a, b )</pre>\n"
1014 "<h4>Arguments</h4>\n"
1015 "a → geometry\n"
1016 "b → geometry\n"
1018 "<h4>Example</h4>\n"
1019 "<pre> disjoint( geomFromWKT( 'POLYGON((0 0 , 0 1 , 1 1 , 1 0 , 0 0 ))' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) → returns 1</pre>\n"
1020 "<pre> disjoint( geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' ) , geomFromWKT( 'POINT(4 4)' )) → returns 0</pre>\n"
1022 gFunctionHelpTexts.insert(
"distance", QCoreApplication::translate(
"function_help",
"<h3>distance function</h3>\n"
1023 " Returns the minimum distance (based on spatial ref) between two geometries in projected units.\n"
1026 "<pre>distance( a, b )</pre>\n"
1028 "<h4>Arguments</h4>\n"
1029 "a → geometry\n"
1030 "b → geometry\n"
1032 "<h4>Example</h4>\n"
1033 "<pre> distance( geomFromWKT( 'POINT(4 4)' ) , geomFromWKT( 'POINT(4 8)' )) → returns 4</pre>\n"
1035 gFunctionHelpTexts.insert(
"exp", QCoreApplication::translate(
"function_help",
"<h3>exp() function</h3>\n"
1036 "Returns exponential of an value.\n"
1039 "<p><h4>Syntax</h4>\n"
1040 " exp(<i>real</i>)</p>\n"
1042 "<p><h4>Arguments</h4>\n"
1043 "<i>real</i> → number.</p>\n"
1045 "<p><h4>Example</h4>\n"
1046 " exp(1.0) → 2.71828182845905</p>\n"
1048 gFunctionHelpTexts.insert(
"floor", QCoreApplication::translate(
"function_help",
"<h3>floor() function</h3>\n"
1049 "Rounds a number downwards.\n"
1052 "<code>floor(value)</code><br>\n"
1054 "<h4>Arguments</h4>\n"
1055 "<code>value</code> - a number.\n"
1058 "<h4>Example</h4>\n"
1059 "<!-- Show example of function.-->\n"
1060 "<code>floor(4.9) → 4</code><br>\n"
1061 "<code>floor(-4.9) → -5</code><br>\n"
1063 gFunctionHelpTexts.insert(
"format", QCoreApplication::translate(
"function_help",
"<h3>format() function</h3>\n"
1064 "Format a string using supplied arguments. \n"
1067 "<code>format('string', arg, [arg...n])</code><br>\n"
1069 "<h4>Arguments</h4>\n"
1070 "<code>string</code> - is string. String with Qt QString place holders. Use %1, %2, etc for placeholders. Placeholders can be repeated. \n"
1072 "<code>arg [arg...n]</code> - any type. Any number of args. \n"
1074 "<h4>Example</h4>\n"
1075 "<!-- Show example of function.-->\n"
1076 "<code>format('This %1 a %2','is', 'test') → This is a test</code><br>") );
1077 gFunctionHelpTexts.insert(
"format_date", QCoreApplication::translate(
"function_help",
"<h3>format_date() function</h3>\n"
1078 "Format a date type or string into a custom string format. Uses Qt data time format strings. See <a href='http://qt-project.org/doc/qt-4.8/qdatetime.html#toString'>QDateTime::toString</a>\n"
1081 "<code>format_date('string', 'format_string')</code><br>\n"
1083 "<h4>Arguments</h4>\n"
1084 "<code>string</code> - is string. Date/Time/DateTime string.\n"
1086 "<code>format_string</code> - is string. String template used to format the string.\n"
1091 " <th>Expression</th>\n"
1093 " <th>Output</th>\n"
1097 " <tr valign=\"top\">\n"
1100 " <td>the day as number without a leading zero (1 to 31)</td>\n"
1103 " <tr valign=\"top\">\n"
1106 " <td>the day as number with a leading zero (01 to 31)</td>\n"
1109 " <tr valign=\"top\">\n"
1112 " <td>the abbreviated localized day name (e.g. 'Mon' to 'Sun'). Uses <a href=\n"
1113 " \"qdate.html#shortDayName\">QDate::shortDayName</a>().</td>\n"
1116 " <tr valign=\"top\">\n"
1119 " <td>the long localized day name (e.g. 'Monday' to 'Sunday'). Uses <a href=\n"
1120 " \"qdate.html#longDayName\">QDate::longDayName</a>().</td>\n"
1123 " <tr valign=\"top\">\n"
1126 " <td>the month as number without a leading zero (1-12)</td>\n"
1129 " <tr valign=\"top\">\n"
1132 " <td>the month as number with a leading zero (01-12)</td>\n"
1135 " <tr valign=\"top\">\n"
1138 " <td>the abbreviated localized month name (e.g. 'Jan' to 'Dec'). Uses <a href=\n"
1139 " \"qdate.html#shortMonthName\">QDate::shortMonthName</a>().</td>\n"
1142 " <tr valign=\"top\">\n"
1145 " <td>the long localized month name (e.g. 'January' to 'December'). Uses <a href=\n"
1146 " \"qdate.html#longMonthName\">QDate::longMonthName</a>().</td>\n"
1149 " <tr valign=\"top\">\n"
1152 " <td>the year as two digit number (00-99)</td>\n"
1155 " <tr valign=\"top\">\n"
1158 " <td>the year as four digit number</td>\n"
1162 " <p>These expressions may be used for the time part of the format string:</p>\n"
1167 " <th>Expression</th>\n"
1169 " <th>Output</th>\n"
1173 " <tr valign=\"top\">\n"
1176 " <td>the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)</td>\n"
1179 " <tr valign=\"top\">\n"
1182 " <td>the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)</td>\n"
1185 " <tr valign=\"top\">\n"
1188 " <td>the hour without a leading zero (0 to 23, even with AM/PM display)</td>\n"
1191 " <tr valign=\"top\">\n"
1194 " <td>the hour with a leading zero (00 to 23, even with AM/PM display)</td>\n"
1197 " <tr valign=\"top\">\n"
1200 " <td>the minute without a leading zero (0 to 59)</td>\n"
1203 " <tr valign=\"top\">\n"
1206 " <td>the minute with a leading zero (00 to 59)</td>\n"
1209 " <tr valign=\"top\">\n"
1212 " <td>the second without a leading zero (0 to 59)</td>\n"
1215 " <tr valign=\"top\">\n"
1218 " <td>the second with a leading zero (00 to 59)</td>\n"
1221 " <tr valign=\"top\">\n"
1224 " <td>the milliseconds without leading zeroes (0 to 999)</td>\n"
1227 " <tr valign=\"top\">\n"
1230 " <td>the milliseconds with leading zeroes (000 to 999)</td>\n"
1233 " <tr valign=\"top\">\n"
1234 " <td>AP or A</td>\n"
1236 " <td>interpret as an AM/PM time. <i>AP</i> must be either \"AM\" or \"PM\".</td>\n"
1239 " <tr valign=\"top\">\n"
1240 " <td>ap or a</td>\n"
1242 " <td>Interpret as an AM/PM time. <i>ap</i> must be either \"am\" or \"pm\".</td>\n"
1248 "<h4>Example</h4>\n"
1249 "<!-- Show example of function.-->\n"
1250 "<code>format_date('2012-05-15','dd.MM.yyyy') → 15.05.2012</code><br>\n"
1252 gFunctionHelpTexts.insert(
"format_number", QCoreApplication::translate(
"function_help",
"<h3>format_number() function</h3>\n"
1253 "Returns a number formatted with the locale separator for thousands. \n"
1254 "Also truncates the number to the number of supplied places. \n"
1256 "<code>format_number(number,places)</code><br>\n"
1258 "<h4>Arguments</h4>\n"
1259 "<code>number</code> - is number. The number to be formatted.\n"
1261 "<code>places</code> - is int. The number of decimal places to truncate the string\n"
1264 "<h4>Example</h4>\n"
1265 "<!-- Show example of function.-->\n"
1266 "<code>format_number(10000000.332,2) → 10,000,000.33</code>\n"
1269 gFunctionHelpTexts.insert(
"geomFromGML", QCoreApplication::translate(
"function_help",
"<h3>geomFromGML function</h3>\n"
1270 "Returns a geometry from a GML representation of geometry\n"
1273 "<pre>geomFromGML(text)</pre>\n"
1275 "<h4>Arguments</h4>\n"
1276 "text → GML representation of a geometry\n"
1278 "<h4>Example</h4>\n"
1279 "<pre> geomFromGML( '<gml:LineString srsName=\"EPSG:4326\"><gml:coordinates>4,4 5,5 6,6</gml:coordinates></gml:LineString>') → returns a geometry</pre>\n"
1282 gFunctionHelpTexts.insert(
"geomFromWKT", QCoreApplication::translate(
"function_help",
"<h3>geomFromWKT function</h3>\n"
1283 "Returns a geometry created from a Well-Known Text (WKT) representation.\n"
1286 "<pre>geomFromWKT(text)</pre>\n"
1288 "<h4>Arguments</h4>\n"
1289 "text → Well-Known Text (WKT) representation of a geometry\n"
1291 "<h4>Example</h4>\n"
1292 "<pre> geomFromWKT( 'POINT(4 5)' ) → returns a geometry</pre>\n"
1295 gFunctionHelpTexts.insert(
"geomToWKT", QCoreApplication::translate(
"function_help",
"<h3>geomToWKT function</h3>\n"
1296 "Returns the Well-Known Text (WKT) representation of the geometry without SRID metadata.\n"
1299 "<pre>geomToWKT(a)</pre>\n"
1301 "<h4>Arguments</h4>\n"
1302 "a → geometry\n"
1304 "<h4>Example</h4>\n"
1305 "<pre> geomToWKT( $geometry ) → POINT(6 50)</pre>\n"
1307 gFunctionHelpTexts.insert(
"geometry", QCoreApplication::translate(
"function_help",
"<h3>geometry function</h3>\n"
1308 "Returns the feature's geometry\n"
1311 "<pre>geometry( f )</pre>\n"
1313 "<h4>Arguments</h4>\n"
1314 "f → QgsFeature\n"
1316 "<h4>Example</h4>\n"
1317 "<pre> geomToWKT( geometry( getFeature( layer, attributeField, value ) ) ) → POINT(6 50)</pre>\n"
1318 "<pre> intersects( $geometry, geometry( getFeature( layer, attributeField, value ) ) ) → 1</pre>\n"
1320 gFunctionHelpTexts.insert(
"getFeature", QCoreApplication::translate(
"function_help",
"<h3>getFeature function</h3>\n"
1321 "Returns the first feature of a layer matching a given attribute value\n"
1324 "<pre>getFeature( layer, attributeField, value )</pre>\n"
1327 gFunctionHelpTexts.insert(
"hour", QCoreApplication::translate(
"function_help",
"<h3>hour() function</h3>\n"
1328 "Extract the hour from a datetime or time, or the number of hours\n"
1329 "from a <code>Interval</code>\n"
1332 "<code>hour(datetime)</code><br>\n"
1333 "<code>hour(Interval)</code><br>\n"
1335 "<h4>Arguments</h4>\n"
1336 "<code>date</code> - is datetime or time. The date to extract the hour from.\n"
1338 "<code>Interval</code> - is Interval. The Interval to return the number of hours from.\n"
1340 "<h4>Example</h4>\n"
1341 "<!-- Show example of function.-->\n"
1342 "<code>hour('2012-07-22T13:24:57') → 13</code><br>\n"
1343 "<code>hour(tointerval('3 hours')) → 3</code><br>\n"
1344 "<code>hour(age('2012-07-22T13:00:00','2012-07-22T10:00:00')) → 3</code><br>\n"
1345 "<code>hour(age('2012-01-01','2010-01-01')) → 17520</code><br>\n"
1348 gFunctionHelpTexts.insert(
"intersection", QCoreApplication::translate(
"function_help",
"<h3>intersection function</h3>\n"
1349 "Returns a geometry that represents the shared portion of geometry a and geometry b.\n"
1352 "<pre>intersection( geometry a , geometry b)</pre>\n"
1354 "<h4>Arguments</h4>\n"
1355 "geometry → geometry\n"
1356 "geometry → geometry\n"
1358 "<h4>Example</h4>\n"
1359 "<pre> geomToWKT( intersection( geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 )' )) ) → returns LINESTRING(3 3, 4 4)</pre>\n"
1361 gFunctionHelpTexts.insert(
"intersects", QCoreApplication::translate(
"function_help",
"<h3>intersects function</h3>\n"
1362 "Returns 1 if the geometries spatially intersect (share any portion of space) and 0 if they don't.\n"
1365 "<pre>intersects( a, b )</pre>\n"
1367 "<h4>Arguments</h4>\n"
1368 "a → geometry\n"
1369 "b → geometry\n"
1371 "<h4>Example</h4>\n"
1372 "<pre> intersects( geomFromWKT( 'POINT(4 4)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) → returns 1</pre>\n"
1373 "<pre> intersects( geomFromWKT( 'POINT(4 5)' ) , geomFromWKT( 'POINT(5 5)' )) → returns 0</pre>\n"
1375 gFunctionHelpTexts.insert(
"left", QCoreApplication::translate(
"function_help",
"<h3>left() function</h3>\n"
1376 "Returns a substring that contains the <i>n</i> leftmost characters of the string.\n"
1379 "<code>left(string, length)</code><br>\n"
1381 "<h4>Arguments</h4>\n"
1382 "<code>string</code> - is string. The string.\n"
1384 "<code>length</code> - is int. The number of characters from the left to return.\n"
1386 "<h4>Example</h4>\n"
1387 "<!-- Show example of function.-->\n"
1388 "<code>left('Hello World',5) → 'Hello'</code><br>\n"
1391 gFunctionHelpTexts.insert(
"length", QCoreApplication::translate(
"function_help",
"<h3>length() function</h3>\n"
1392 "Returns the length of a string.\n"
1394 "<p><h4>Syntax</h4>\n"
1395 " length(<i>string</i>)</p>\n"
1397 "<p><h4>Arguments</h4>\n"
1398 "<!-- List args for functions here-->\n"
1399 "<i> string</i> → is string. The String to count the length of.</p>\n"
1401 "<p><h4>Example</h4>\n"
1402 "<!-- Show example of function.-->\n"
1403 " length('HELLO') → 5</p>\n"
1405 gFunctionHelpTexts.insert(
"ln", QCoreApplication::translate(
"function_help",
"<h3>ln() function</h3>\n"
1406 "Returns the value of the natural logarithm of the passed expression.\n"
1408 "This function takes one argument.\n"
1410 "<code>ln(value)</code><br>\n"
1412 "<h4>Arguments</h4>\n"
1413 "<code>value</code> - any positive number.\n"
1416 "<h4>Example</h4>\n"
1417 "<!-- Show example of function.-->\n"
1418 "<code>ln(1) → 0</code><br>\n"
1419 "<code>ln(2.7182818284590452354) → 1</code><br>\n"
1421 gFunctionHelpTexts.insert(
"log", QCoreApplication::translate(
"function_help",
"<h3>log() function</h3>\n"
1422 "Returns the value of the logarithm of the passed value and base.\n"
1424 "This function takes two arguments.\n"
1426 "<code>log(base, value)</code><br>\n"
1428 "<h4>Arguments</h4>\n"
1429 "<code>base</code> - any positive number.<br>\n"
1430 "<code>value</code> - any positive number.\n"
1433 "<h4>Example</h4>\n"
1434 "<!-- Show example of function.-->\n"
1435 "<code>log(2, 32) → 5</code><br>\n"
1436 "<code>log(0.5, 32) → -5</code><br>\n"
1438 gFunctionHelpTexts.insert(
"log10", QCoreApplication::translate(
"function_help",
"<h3>log10() function</h3>\n"
1439 "Returns the value of the base 10 logarithm of the passed expression.\n"
1441 "This function takes one argument.\n"
1443 "<code>log10(value)</code><br>\n"
1445 "<h4>Arguments</h4>\n"
1446 "<code>value</code> - any positive number.\n"
1449 "<h4>Example</h4>\n"
1450 "<!-- Show example of function.-->\n"
1451 "<code>log10(1) → 0</code><br>\n"
1452 "<code>log10(100) → 2</code><br>\n"
1454 gFunctionHelpTexts.insert(
"lower", QCoreApplication::translate(
"function_help",
"<h3>lower() function</h3>\n"
1455 "Converts a string to lower case letters.\n"
1457 "<p><h4> Syntax</h4>\n"
1458 " lower(<i>string</i>)</p>\n"
1460 "<p><h4> Arguments</h4>\n"
1461 "<i> string</i> → is string. The String to convert to lower case.</p>\n"
1463 "<p><h4> Example</h4>\n"
1464 " lower('HELLO World') → 'hello world'</p>\n"
1466 gFunctionHelpTexts.insert(
"lpad", QCoreApplication::translate(
"function_help",
"<h3>lpad() function</h3>\n"
1467 "Returns a string with supplied width padded\n"
1468 "using the fill character.\n"
1471 "<code>lpad(string, length, fill)</code><br>\n"
1473 "<h4>Arguments</h4>\n"
1474 "<code>string</code> - is string. The string.\n"
1476 "<code>length</code> - is int. The length of the new string.\n"
1478 "<code>fill</code> - is char. The character to padd the remaining space with. \n"
1480 "<h4>Example</h4>\n"
1481 "<!-- Show example of function.-->\n"
1482 "<code>lpad('Hello', 10, 'x') → 'Helloxxxxx'</code><br>\n"
1484 gFunctionHelpTexts.insert(
"max", QCoreApplication::translate(
"function_help",
"<h3>max() function</h3>\n"
1485 "Returns the largest value in a set of values.\n"
1488 " max(<i>value<i>[,<i>value</i>...])\n"
1490 "<h4>Arguments</h4>\n"
1491 "<!-- List args for functions here-->\n"
1492 "<i> value</i> → a number.<br>\n"
1494 "<h4>Example</h4>\n"
1495 "<!-- Show example of function.-->\n"
1496 " max(2,10.2,5.5) → 10.2\n"
1498 gFunctionHelpTexts.insert(
"min", QCoreApplication::translate(
"function_help",
"<h3>min() function</h3>\n"
1499 "Returns the smallest value in a set of values.\n"
1502 " min(<i>value<i>[,<i>value</i>...])\n"
1504 "<h4>Arguments</h4>\n"
1505 "<!-- List args for functions here-->\n"
1506 "<i> value</i> → a number.<br>\n"
1508 "<h4>Example</h4>\n"
1509 "<!-- Show example of function.-->\n"
1510 " min(20.5,10,6.2) → 6.2\n"
1512 gFunctionHelpTexts.insert(
"minute", QCoreApplication::translate(
"function_help",
"<h3>minute() function</h3>\n"
1513 "Extract the minute from a datetime or time, or the number of minutes\n"
1514 "from a <code>Interval</code>\n"
1517 "<code>minute(datetime)</code><br>\n"
1518 "<code>minute(Interval)</code><br>\n"
1520 "<h4>Arguments</h4>\n"
1521 "<code>date</code> - is datetime or time. The date to extract the minute from.\n"
1523 "<code>Interval</code> - is Interval. The Interval to return the number of minutes from.\n"
1525 "<h4>Example</h4>\n"
1526 "<!-- Show example of function.-->\n"
1527 "<code>minute('2012-07-22T13:24:57') → 24</code><br>\n"
1528 "<code>minute(tointerval('3 minutes')) → 3</code><br>\n"
1529 "<code>minute(age('2012-07-22T00:20:00','2012-07-22T00:00:00')) → 20</code><br>\n"
1530 "<code>minute(age('2012-01-01','2010-01-01')) → 1051200</code><br>\n"
1533 gFunctionHelpTexts.insert(
"month", QCoreApplication::translate(
"function_help",
"<h3>month() function</h3>\n"
1534 "Extract the month part from a date, or the number of months\n"
1535 "from a <code>Interval</code>\n"
1538 "<code>month(date)</code><br>\n"
1539 "<code>month(Interval)</code><br>\n"
1541 "<h4>Arguments</h4>\n"
1542 "<code>date</code> - is date or datetime. The date to extract the month from.\n"
1544 "<code>Interval</code> - is Interval. The Interval to return the number of months from.\n"
1546 "<h4>Example</h4>\n"
1547 "<!-- Show example of function.-->\n"
1548 "<code>month('2012-05-12') → 05</code><br>\n"
1549 "<code>month(tointerval('3 months')) → 3</code><br>\n"
1550 "<code>month(age('2012-01-01','2010-01-01')) → 4.033...</code><br>\n"
1553 gFunctionHelpTexts.insert(
"overlaps", QCoreApplication::translate(
"function_help",
"<h3>overlaps function</h3>\n"
1554 "Returns 1 if the geometries share space, are of the same dimension, but are not completely contained by each other.\n"
1557 "<pre>overlaps( a, b )</pre>\n"
1559 "<h4>Arguments</h4>\n"
1560 "a → geometry\n"
1561 "b → geometry\n"
1563 "<h4>Example</h4>\n"
1564 "<pre> overlaps( geomFromWKT( 'LINESTRING(3 5 , 4 4 , 5 5 , 5 3)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) → returns 1</pre>\n"
1565 "<pre> overlaps( geomFromWKT( 'LINESTRING(0 0 , 1 1)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) → returns 0</pre>\n"
1567 gFunctionHelpTexts.insert(
"ramp_color", QCoreApplication::translate(
"function_help",
"\n"
1568 "<h3>ramp_color() function</h3>\n"
1569 "Returns a string representing a color from a color ramp. \n"
1571 "<p><h4>Syntax</h4>\n"
1572 " ramp_color(<i>ramp_name,value</i>)</p>\n"
1574 "<p><h4>Arguments</h4>\n"
1575 "<!-- List args for functions here-->\n"
1576 "<i> ramp_name</i> → the name of the color ramp as a string, for example 'Spectral'.<br>\n"
1577 "<i> value</i> → the position on the ramp to select the color from as a real number between 0 and 1.<br>\n"
1579 "<p><h4>Example</h4>\n"
1580 "<!-- Show example of function.-->\n"
1581 " ramp_color('Spectral',0.3) → '253,190,115,255'</p>\n"
1583 "<p><h4>Note:</h4>\n"
1584 "The color ramps available vary between QGIS installations. This function\n"
1585 "may not give the expected results if you move your Quantum project.\n"
1588 gFunctionHelpTexts.insert(
"rand", QCoreApplication::translate(
"function_help",
"<h3>rand() function</h3>\n"
1589 "Returns a random integer within the range specified by the minimum and \n"
1590 "maximum argument (inclusive).\n"
1592 "This function takes two arguments.\n"
1594 "<code>rand(min, max)</code><br>\n"
1596 "<h4>Arguments</h4>\n"
1597 "<code>min</code> - an integer representing the smallest possible random number desired.<br>\n"
1598 "<code>max</code> - an integer representing the largest possible random number desired.\n"
1601 "<h4>Example</h4>\n"
1602 "<!-- Show example of function.-->\n"
1603 "<code>rand(1, 10) → 8</code><br>\n"
1605 gFunctionHelpTexts.insert(
"randf", QCoreApplication::translate(
"function_help",
"<h3>randf() function</h3>\n"
1606 "Returns a random float within the range specified by the minimum and \n"
1607 "maximum argument (inclusive).\n"
1609 "This function takes two arguments.\n"
1611 "<code>randf(min, max)</code><br>\n"
1613 "<h4>Arguments</h4>\n"
1614 "<code>min</code> - a float representing the smallest possible random number desired.<br>\n"
1615 "<code>max</code> - a float representing the largest possible random number desired.\n"
1618 "<h4>Example</h4>\n"
1619 "<!-- Show example of function.-->\n"
1620 "<code>randf(1, 10) → 4.59258286403147</code><br>\n"
1622 gFunctionHelpTexts.insert(
"regexp_match", QCoreApplication::translate(
"function_help",
"<h3>regexp_match() function</h3>\n"
1623 "Returns true if any part of a string matches the supplied regular expression.\n"
1625 "<p><h4>Syntax</h4>\n"
1626 " regexp_match(<i>string,regex</i>)</p>\n"
1628 "<p><h4>Arguments</h4>\n"
1629 "<!-- List args for functions here-->\n"
1630 "<i> string</i> → is string. The string to test against the regular expression.<br>\n"
1631 "<i> regex</i> → is string. The regular expression to test against. Backslash characters must be double escaped (eg \"\\s\" to match a white space character). Non-greedy regular expressions are not supported.<br>\n"
1633 "<p><h4>Example</h4>\n"
1634 "<!-- Show example of function.-->\n"
1635 " regexp_match('QGIS ROCKS','\\sROCKS') → 1</p>\n"
1637 gFunctionHelpTexts.insert(
"regexp_replace", QCoreApplication::translate(
"function_help",
"<h3>regexp_replace() function</h3>\n"
1638 "Returns a string with the supplied regular expression replaced.\n"
1640 "<p><h4>Syntax</h4>\n"
1641 " regexp_replace(<i>string,regex,after</i>)</p>\n"
1643 "<p><h4>Arguments</h4>\n"
1644 "<!-- List args for functions here-->\n"
1645 "<i> string</i> → is string. The start string.<br>\n"
1646 "<i> regex</i> → is string. The regular expression to replace. Backslash characters must be double escaped (eg \"\\s\" to match a white space character). Non-greedy regular expressions are not supported.<br>\n"
1647 "<i> after</i> → is string. The string that will replace any matching occurences of the supplied regular expression. Captured groups can be inserted into the replacement string using \\1, \\2, etc. <br></p>\n"
1649 "<p><h4>Example</h4>\n"
1650 "<!-- Show example of function.-->\n"
1651 " regexp_replace('QGIS SHOULD ROCK','\\sSHOULD\\s',' DOES ') → 'QGIS DOES ROCK'</p>\n"
1653 gFunctionHelpTexts.insert(
"regexp_substr", QCoreApplication::translate(
"function_help",
"<h3>regexp_substr() function</h3>\n"
1654 "Returns the portion of a string which matches a supplied regular expression.\n"
1656 "<p><h4>Syntax</h4>\n"
1657 " regexp_substr(<i>string,regex</i>)</p>\n"
1659 "<p><h4>Arguments</h4>\n"
1660 "<!-- List args for functions here-->\n"
1661 "<i> string</i> → is string. The input string.<br>\n"
1662 "<i> regex</i> → is string. The regular expression to match against. Backslash characters must be double escaped (eg \"\\s\" to match a white space character). Non-greedy regular expressions are not supported.<br>\n"
1664 "<p><h4>Example</h4>\n"
1665 "<!-- Show example of function.-->\n"
1666 " regexp_substr('abc123','(\\d+)') → '123'</p>\n"
1668 gFunctionHelpTexts.insert(
"replace", QCoreApplication::translate(
"function_help",
"<h3>replace() function</h3>\n"
1669 "Returns a string with the the supplied string replaced.\n"
1671 "<p><h4>Syntax</h4>\n"
1672 " replace(<i>string,before,after</i>)</p>\n"
1674 "<p><h4>Arguments</h4>\n"
1675 "<!-- List args for functions here-->\n"
1676 "<i> string</i> → is string. The start string.<br>\n"
1677 "<i> before</i> → is string. The string to replace.<br>\n"
1678 "<i> after</i> → is string. The string that will replace <i>before</i><br></p>\n"
1680 "<p><h4>Example</h4>\n"
1681 "<!-- Show example of function.-->\n"
1682 " replace('QGIS SHOULD ROCK','SHOULD','DOES') → 'QGIS DOES ROCK'</p>\n"
1684 gFunctionHelpTexts.insert(
"right", QCoreApplication::translate(
"function_help",
"<h3>right() function</h3>\n"
1685 "Returns a substring that contains the <i>n</i> rightmost characters of the string.\n"
1688 "<code>right(string, pos)</code><br>\n"
1690 "<h4>Arguments</h4>\n"
1691 "<code>string</code> - is string. The string.\n"
1693 "<code>length</code> - is int. The number of characters from the right to return.\n"
1695 "<h4>Example</h4>\n"
1696 "<!-- Show example of function.-->\n"
1697 "<code>right('Hello World',5) → 'World'</code><br>\n"
1700 gFunctionHelpTexts.insert(
"round", QCoreApplication::translate(
"function_help",
"<h3>round() function</h3>\n"
1701 "Rounds a number to number of decimal places.\n"
1703 "This function can take one or two arguments depending on what is needed.\n"
1705 "<code>round(decimal,places)</code><br>\n"
1706 "<code>round(decimal)</code><br>\n"
1708 "<h4>Arguments</h4>\n"
1709 "<code>decimal</code> - is decimal. The decimal number to be rounded.\n"
1711 "<code>places</code> - is int. The number of places to round decimal too. Can be negative.\n"
1713 "<h4>Example</h4>\n"
1714 "<!-- Show example of function.-->\n"
1715 "<code>round(1234.567, 2 ) → 1234.57</code><br>\n"
1716 "use <code>round(decimal)</code> to round to the nearest integer<br>\n"
1717 "<code>round(1234.567) → 1235</code><br>\n"
1721 gFunctionHelpTexts.insert(
"rpad", QCoreApplication::translate(
"function_help",
"<h3>rpad() function</h3>\n"
1722 "Returns a string with supplied width padded\n"
1723 "using the fill character.\n"
1726 "<code>rpad(string, width, fill)</code><br>\n"
1728 "<h4>Arguments</h4>\n"
1729 "<code>string</code> - is string. The string.\n"
1731 "<code>width</code> - is int. The length of the new string.\n"
1733 "<code>fill</code> - is char. The character to padd the remaining space with. \n"
1735 "<h4>Example</h4>\n"
1736 "<!-- Show example of function.-->\n"
1737 "<code>rpad('Hello', 10, 'x') → 'xxxxxHello'</code><br>\n"
1740 gFunctionHelpTexts.insert(
"scale_exp", QCoreApplication::translate(
"function_help",
"<h3>scale_exp() function</h3>\n"
1741 "Transforms a given value from an input domain to an output range using an exponential curve. This function can be used to ease values in or out \n"
1742 "of the specified output range. \n"
1744 "<p><h4>Syntax</h4>\n"
1745 " scale_exp(<i>val</i>,<i>domain_min</i>,<i>domain_max</i>,<i>range_min</i>,<i>range_max</i>,<i>exponent</i>)</p>\n"
1747 "<p><h4>Arguments</h4>\n"
1748 "<!-- List args for functions here-->\n"
1749 "<i> val</i> → is a value in the input domain. The function will return a corresponding scaled value in the output range.<br>\n"
1750 "<i> domain_min, domain_max</i> → specify the input domain, the smallest and largest values the input <i>val</i> should take.<br>\n"
1751 "<i> range_min, range_max</i> → specify the output range, the smallest and largest values which should be output by the function.<br>\n"
1752 "<i> exponent</i> → a positive value (greater than 0), which dictates the way input values are mapped to the output range. Large exponents will cause the output values to 'ease in', starting slowly before\n"
1753 "accelerating as the input values approach the domain maximum. Smaller exponents (less than 1) will cause output values to 'ease out', where the mapping starts quickly but slows as it approaches the domain maximum.<br>\n"
1755 "<h4>Example</h4>\n"
1756 "<!-- Show example of function.-->\n"
1757 "<b>Easing in, using an exponent of 2:</b><br>\n"
1758 " scale_exp(5,0,10,0,100,2) → 25<br>\n"
1759 " scale_exp(7.5,0,10,0,100,2) → 56.25<br>\n"
1760 " scale_exp(9.5,0,10,0,100,2) → 90.25<br> \n"
1762 "<b>Easing out, using an exponent of 0.5:</b><br> \n"
1763 " scale_exp(3,0,10,0,100,0.5) → 54.772<br>\n"
1764 " scale_exp(6,0,10,0,100,0.5) → 77.459<br>\n"
1765 " scale_exp(9,0,10,0,100,0.5) → 94.868<br> \n"
1769 gFunctionHelpTexts.insert(
"scale_linear", QCoreApplication::translate(
"function_help",
"<h3>scale_linear() function</h3>\n"
1770 "Transforms a given value from an input domain to an output range using linear interpolation. \n"
1772 "<p><h4>Syntax</h4>\n"
1773 " scale_linear(<i>val</i>,<i>domain_min</i>,<i>domain_max</i>,<i>range_min</i>,<i>range_max</i>)</p>\n"
1775 "<p><h4>Arguments</h4>\n"
1776 "<!-- List args for functions here-->\n"
1777 "<i> val</i> → is a value in the input domain. The function will return a corresponding scaled value in the output range.<br>\n"
1778 "<i> domain_min, domain_max</i> → specify the input domain, the smallest and largest values the input <i>val</i> should take.<br>\n"
1779 "<i> range_min, range_max</i> → specify the output range, the smallest and largest values which should be output by the function.<br>\n"
1781 "<h4>Example</h4>\n"
1782 "<!-- Show example of function.-->\n"
1783 " scale_linear(5,0,10,0,100) → 50<br>\n"
1784 " scale_linear(0.2,0,1,0,360) → 72 <i>(eg, scaling a value between 0 and 1 to an angle between 0 and 360)</i><br>\n"
1785 " scale_linear(1500,1000,10000,9,20) → 10.22 <i>(eg, scaling a population which varies between 1000 and 10000 to a font size between 9 and 20)</i><br>\n"
1789 gFunctionHelpTexts.insert(
"second", QCoreApplication::translate(
"function_help",
"<h3>second() function</h3>\n"
1790 "Extract the seconds from a datetime or time, or the number of seconds\n"
1791 "from a <code>Interval</code>\n"
1794 "<code>second(datetime)</code><br>\n"
1795 "<code>second(Interval)</code><br>\n"
1797 "<h4>Arguments</h4>\n"
1798 "<code>date</code> - is datetime or time. The date to extract the second from.\n"
1800 "<code>Interval</code> - is Interval. The Interval to return the number of seconds from.\n"
1802 "<h4>Example</h4>\n"
1803 "<!-- Show example of function.-->\n"
1804 "<code>second('2012-07-22T13:24:57') → 57</code><br>\n"
1805 "<code>second(tointerval('3 seconds')) → 3</code><br>\n"
1806 "<code>second(age('2012-07-22T00:20:00','2012-07-22T00:00:00')) → 1200</code><br>\n"
1807 "<code>second(age('2012-01-01','2010-01-01')) → 63072000</code><br>\n"
1810 gFunctionHelpTexts.insert(
"sin", QCoreApplication::translate(
"function_help",
"<h3>sin() function</h3>\n"
1811 "Returns sinus of an angle.\n"
1814 "<p><h4>Syntax</h4>\n"
1815 " sin(<i>real</i>)</p>\n"
1817 "<p><h4>Arguments</h4>\n"
1818 "<i>real</i> → angle in radians.</p>\n"
1820 "<p><h4>Example</h4>\n"
1821 " sin(1.571) → 0.999999682931835</p>\n"
1823 gFunctionHelpTexts.insert(
"sqrt", QCoreApplication::translate(
"function_help",
"<h3>sqrt() function</h3>\n"
1824 "Returns square root of a value\n"
1827 "<p><h4>Syntax</h4>\n"
1828 " sqrt(<i>real</i>)</p>\n"
1830 "<p><h4>Arguments</h4>\n"
1831 "<i>real</i> → number.</p>\n"
1833 "<p><h4>Example</h4>\n"
1834 " sqrt(9) → 3</p>\n"
1836 gFunctionHelpTexts.insert(
"strpos", QCoreApplication::translate(
"function_help",
"<h3>strpos() function</h3>\n"
1837 "Return the index of a regular expression in a string.\n"
1840 " strpos(<i>haystack</i>, <i>needle</i>)\n"
1842 "Returns -1 if the expression isn't found.\n"
1844 "<p><h4>Arguments</h4>\n"
1845 "<!-- List args for functions here-->\n"
1846 "<i> haystack</i> → is string. The string that is to be searched.<br>\n"
1847 "<i> needle</i> → is string. The regular expression to look for.<br>\n"
1849 "<h4>Example</h4>\n"
1850 "<!-- Show example of function.-->\n"
1851 " strpos('HELLO WORLD','WORLD') → 6<br>\n"
1852 " strpos('HELLO WORLD','GOODBYE') → -1<br>\n"
1854 gFunctionHelpTexts.insert(
"substr", QCoreApplication::translate(
"function_help",
"<h3>substr() function</h3>\n"
1855 "Return a part of a string\n"
1857 "<p><h4>Syntax</h4>\n"
1858 " substr(<i>string,startpos,length</i>)</p>\n"
1860 "<p><h4>Arguments</h4>\n"
1861 "<!-- List args for functions here-->\n"
1862 "<i> string</i> → is string. The full string.<br>\n"
1863 "<i> startpos</i> → is number. The start position to extract from.<br>\n"
1864 "<i> length</i> → is number. The length of the string to extract.<br></p>\n"
1866 "<p><h4>Example</h4>\n"
1867 "<!-- Show example of function.-->\n"
1868 " substr('HELLO WORLD',3,5) → 'LLO W'</p>\n"
1870 gFunctionHelpTexts.insert(
"symDifference", QCoreApplication::translate(
"function_help",
"<h3>symDifference function</h3>\n"
1871 "Returns a geometry that represents the portions of a and b that do not intersect.\n"
1874 "<pre>symDifference( geometry a, geometry b)</pre>\n"
1876 "<h4>Arguments</h4>\n"
1877 "geometry → geometry\n"
1878 "geometry → geometry\n"
1880 "<h4>Example</h4>\n"
1881 "<pre> geomToWKT( symDifference( geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' ) , geomFromWKT( 'LINESTRING(3 3 , 8 8)' )) ) → returns LINESTRING(5 5, 8 8)</pre>\n"
1883 gFunctionHelpTexts.insert(
"tan", QCoreApplication::translate(
"function_help",
"<h3>tan() function</h3>\n"
1884 "Returns tangent of an angle.\n"
1887 "<p><h4>Syntax</h4>\n"
1888 " tan(<i>real</i>)</p>\n"
1890 "<p><h4>Arguments</h4>\n"
1891 "<i>real</i> → angle in radians.</p>\n"
1893 "<p><h4>Example</h4>\n"
1894 " tan(1.0) → 1.5574077246549</p>\n"
1896 gFunctionHelpTexts.insert(
"title", QCoreApplication::translate(
"function_help",
"<h3>title() function</h3>\n"
1897 "Converts all words of a string to title case (all words lower case with leading\n"
1898 "capital letter).\n"
1900 "<p><h4>Syntax</h4>\n"
1901 " title(<i>string</i>)</p>\n"
1903 "<p><h4>Arguments</h4>\n"
1904 "<!-- List args for functions here-->\n"
1905 "<i> string</i> → is string. The string to convert to title case.</p>\n"
1907 "<p><h4>Example</h4>\n"
1908 "<!-- Show example of function.-->\n"
1909 " upper('hello WOrld') → 'Hello World'</p>\n"
1911 gFunctionHelpTexts.insert(
"todate", QCoreApplication::translate(
"function_help",
"<h3>todate() function</h3>\n"
1912 "Convert a string into Qt data type.\n"
1915 "<code>todate('string')</code><br>\n"
1917 "<h4>Arguments</h4>\n"
1918 "<code>string</code> - is string in Qt date format.\n"
1921 "<h4>Example</h4>\n"
1922 "<!-- Show example of function.-->\n"
1923 "<code>todate('2012-05-04') → 2012-05-04</code><br>") );
1924 gFunctionHelpTexts.insert(
"todatetime", QCoreApplication::translate(
"function_help",
"<h3>todatetime() function</h3>\n"
1925 "Convert a string into Qt data time type.\n"
1928 "<code>todatetime('string')</code><br>\n"
1930 "<h4>Arguments</h4>\n"
1931 "<code>string</code> - is string in Qt date time format.\n"
1934 "<h4>Example</h4>\n"
1935 "<!-- Show example of function.-->\n"
1936 "<code>todatetime('2012-05-04 12:50:00') → 2012-05-04T12:50:00</code><br>") );
1937 gFunctionHelpTexts.insert(
"toint", QCoreApplication::translate(
"function_help",
"<h3>toint() function</h3>\n"
1938 "Converts a string to integer number. Nothing changed if a value cannot be converted to integer (e.g '123asd' is invalid).\n"
1940 "<p><h4>Syntax</h4>\n"
1941 " toint(<i>string</i>)</p>\n"
1943 "<p><h4>Arguments</h4>\n"
1944 "<!-- List args for functions here-->\n"
1945 "<i> string</i> → is string. The String to convert to integer number.</p>\n"
1947 "<p><h4>Example</h4>\n"
1948 "<!-- Show example of function.-->\n"
1949 " toint('123') → 123</p>\n"
1951 gFunctionHelpTexts.insert(
"tointerval", QCoreApplication::translate(
"function_help",
"<h3>tointerval() function</h3>\n"
1952 "Converts a string to a interval type. Can be used to take days, hours, month, etc off a date. \n"
1955 "<code>tointerval('string')</code><br>\n"
1957 "<h4>Arguments</h4>\n"
1958 "<code>string</code> - is string. Format {n} days {n} hours {n} months\n"
1961 "<h4>Example</h4>\n"
1962 "<!-- Show example of function.-->\n"
1963 "<code>todatetime('2012-05-05 12:00:00') - tointerval('1 day 2 hours') → 2012-05-04T10:00:00</code><br>") );
1964 gFunctionHelpTexts.insert(
"toreal", QCoreApplication::translate(
"function_help",
"<h3>toreal() function</h3>\n"
1965 "Converts a string to real number. Nothing changed if a value cannot be converted to real (e.g '123.56asd' is invalid). Numbers are rounded after saving changes if the precision is smaller than the result of the conversion.\n"
1967 "<p><h4>Syntax</h4>\n"
1968 " toreal(<i>string</i>)</p>\n"
1970 "<p><h4>Arguments</h4>\n"
1971 "<!-- List args for functions here-->\n"
1972 "<i> string</i> → is string. The String to convert to real number.</p>\n"
1974 "<p><h4>Example</h4>\n"
1975 "<!-- Show example of function.-->\n"
1976 " toreal('123.45') → 123.45</p>\n"
1978 gFunctionHelpTexts.insert(
"tostring", QCoreApplication::translate(
"function_help",
"<h3>tostring() function</h3>\n"
1979 "Converts a number to string.\n"
1981 "<p><h4>Syntax</h4>\n"
1982 " tostring(<i>number</i>)</p>\n"
1984 "<p><h4>Arguments</h4>\n"
1985 "<!-- List args for functions here-->\n"
1986 "<i>number</i> → is integer or real. The number to convert to string.</p>\n"
1988 "<p><h4>Example</h4>\n"
1989 "<!-- Show example of function.-->\n"
1990 " tostring(123) → '123'</p>\n"
1992 gFunctionHelpTexts.insert(
"totime", QCoreApplication::translate(
"function_help",
"<h3>totime() function</h3>\n"
1993 "Convert a string into Qt time type.\n"
1996 "<code>totime('string')</code><br>\n"
1998 "<h4>Arguments</h4>\n"
1999 "<code>string</code> - is string in Qt time format.\n"
2002 "<h4>Example</h4>\n"
2003 "<!-- Show example of function.-->\n"
2004 "<code>totime('12:30:01') → 12:30:01</code><br>") );
2005 gFunctionHelpTexts.insert(
"touches", QCoreApplication::translate(
"function_help",
"<h3>touches function</h3>\n"
2006 "Returns 1 if the geometries have at least one point in common, but their interiors do not intersect.\n"
2009 "<pre>touches( a, b )</pre>\n"
2011 "<h4>Arguments</h4>\n"
2012 "a → geometry\n"
2013 "b → geometry\n"
2015 "<h4>Example</h4>\n"
2016 "<pre> touches( geomFromWKT( 'LINESTRING(5 3 , 4 4)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) → returns 1</pre>\n"
2017 "<pre> touches( geomFromWKT( 'POINT(4 4)' ) , geomFromWKT( 'POINT(5 5)' )) → returns 0</pre>\n"
2019 gFunctionHelpTexts.insert(
"transform", QCoreApplication::translate(
"function_help",
"<h3>transform function</h3>\n"
2020 "Returns the geometry transformed from the source CRS to the dest CRS.\n"
2023 "<pre>transform( geom, sAuthId, dAuthId )</pre>\n"
2025 "<h4>Arguments</h4>\n"
2026 "geom → QgsGeometry\n"
2028 "sCrsId → the Source Auth CRS Id\n"
2030 "dCrsId → the Dest Auth CRS Id\n"
2032 "<h4>Example</h4>\n"
2033 "<pre> geomToWKT( transform( $geometry, 'EPSG:2154', 'EPSG:4326' ) ) → POINT(0 51)</pre>\n"
2035 gFunctionHelpTexts.insert(
"trim", QCoreApplication::translate(
"function_help",
"<h3>trim() function</h3>\n"
2036 "Removes all leading and trailing whitespace (spaces, tabs, etc) from a string.\n"
2038 "<p><h4>Syntax</h4>\n"
2039 " trim(<i>string</i>)</p>\n"
2041 "<p><h4>Arguments</h4>\n"
2042 "<!-- List args for functions here-->\n"
2043 "<i> string</i> → is string. The string to trim.</p>\n"
2045 "<p><h4>Example</h4>\n"
2046 "<!-- Show example of function.-->\n"
2047 " trim(' hello world ') → 'hello world'</p>\n"
2049 gFunctionHelpTexts.insert(
"union", QCoreApplication::translate(
"function_help",
"<h3>union function</h3>\n"
2050 "Returns a geometry that represents the point set union of the geometries.\n"
2053 "<pre>union( a, b )</pre>\n"
2055 "<h4>Arguments</h4>\n"
2056 "a → geometry\n"
2057 "b → geometry\n"
2059 "<h4>Example</h4>\n"
2060 "<pre> geomToWKT( union( geomFromWKT( 'POINT(4 4)' ) , geomFromWKT( 'POINT(5 5)' )) ) → returns MULTIPOINT(4 4, 5 5)</pre>\n"
2062 gFunctionHelpTexts.insert(
"upper", QCoreApplication::translate(
"function_help",
"<h3>upper() function</h3>\n"
2063 "Converts a string to upper case letters.\n"
2065 "<p><h4>Syntax</h4>\n"
2066 " upper(<i>string</i>)</p>\n"
2068 "<p><h4>Arguments</h4>\n"
2069 "<!-- List args for functions here-->\n"
2070 "<i> string</i> → is string. The String to convert to upper case.</p>\n"
2072 "<p><h4>Example</h4>\n"
2073 "<!-- Show example of function.-->\n"
2074 " upper('hello WOrld') → 'HELLO WORLD'</p>\n"
2076 gFunctionHelpTexts.insert(
"week", QCoreApplication::translate(
"function_help",
"<h3>week() function</h3>\n"
2077 "Extract the week number from a date, or the number of weeks\n"
2078 "from a <code>Interval</code>\n"
2081 "<code>week(date)</code><br>\n"
2082 "<code>week(Interval)</code><br>\n"
2084 "<h4>Arguments</h4>\n"
2085 "<code>date</code> - is date or datetime. The date to extract the week from.\n"
2087 "<code>Interval</code> - is Interval. The Interval to return the number of weeks from.\n"
2089 "<h4>Example</h4>\n"
2090 "<!-- Show example of function.-->\n"
2091 "<code>week('2012-05-12') → 19</code><br>\n"
2092 "<code>week(tointerval('3 weeks')) → 3</code><br>\n"
2093 "<code>week(age('2012-01-01','2010-01-01')) → 104.285...</code><br>\n"
2096 gFunctionHelpTexts.insert(
"within", QCoreApplication::translate(
"function_help",
"<h3>within function</h3>\n"
2097 "Returns 1 if the geometry a is completely inside geometry b\n"
2100 "<pre>within( geometry a , geometry b)</pre>\n"
2102 "<h4>Arguments</h4>\n"
2103 "geometry → geometry\n"
2104 "geometry → geometry\n"
2106 "<h4>Example</h4>\n"
2107 "<pre> within( geomFromWKT( 'POINT( 0.5 0.5 )') , geomFromWKT('POLYGON((0 0 , 0 1 , 1 1 , 1 0 , 0 0 ))' ) ) → returns 1</pre>\n"
2108 "<pre> within( geomFromWKT( 'POINT( 5 5 )') , geomFromWKT('POLYGON((0 0 , 0 1 , 1 1 , 1 0 , 0 0 ))' ) ) → returns 0</pre>\n"
2110 gFunctionHelpTexts.insert(
"wordwrap", QCoreApplication::translate(
"function_help",
"<h3>wordwrap() function</h3>\n"
2111 "Returns a string wrapped to a maximum/minimum number of characters.\n"
2113 "<p><h4>Syntax</h4>\n"
2114 " wordwrap(<i>string,wrap_length[,delimiter_string]</i>)</p>\n"
2116 "<p><h4>Arguments</h4>\n"
2117 "<!-- List args for functions here-->\n"
2118 "<i> string</i> → is string. The string to be wrapped.<br>\n"
2119 "<i> wrap_length</i> → is number. If positive, the number represents the ideal maximum number of characters to wrap; if negative, the number represents the minimum number of characters to wrap.<br>\n"
2120 "<i> delimiter_string</i> → is string. The delimiter string to wrap to a new line (<u>optional</u>).<br></p>\n"
2122 "<p><h4>Example</h4>\n"
2123 "<!-- Show example of function.-->\n"
2124 " wordwrap('UNIVERSITY OF QGIS',13) → 'UNIVERSITY OF\nQGIS'<br>\n"
2125 " wordwrap('UNIVERSITY OF QGIS',-3) → 'UNIVERSITY\nOF QGIS'</p>\n"
2127 gFunctionHelpTexts.insert(
"xat", QCoreApplication::translate(
"function_help",
"<h3>xat() function</h3>\n"
2128 "Retrieves a x coordinate of the current feature\n"
2131 "<code>xat(i)</code>\n"
2133 "<h4>Arguments</h4>\n"
2134 "<code>i<code> - is int. index of point of a line (indices start at 0; negative values apply to the last index).\n"
2136 "<h4>Example</h4>\n"
2137 "<pre>xat(1) → 5</pre>\n"
2139 gFunctionHelpTexts.insert(
"xmax", QCoreApplication::translate(
"function_help",
"<h3>xmax function</h3>\n"
2140 "Returns the maximum x coordinate of a geometry. Calculations are in the Spatial Reference System of this Geometry. \n"
2143 "<pre>xmax(geom)</pre>\n"
2145 "<h4>Arguments</h4>\n"
2146 "geom → a geometry\n"
2148 "<h4>Example</h4>\n"
2149 "<pre> xmax($geometry) → returns maximum x coordinate of $geometry</pre>\n"
2152 gFunctionHelpTexts.insert(
"xmin", QCoreApplication::translate(
"function_help",
"<h3>xmin function</h3>\n"
2153 "Returns the minimum x coordinate of a geometry. Calculations are in the Spatial Reference System of this Geometry. \n"
2156 "<pre>xmin(geom)</pre>\n"
2158 "<h4>Arguments</h4>\n"
2159 "geom → a geometry\n"
2161 "<h4>Example</h4>\n"
2162 "<pre> xmin($geometry) → returns minimum x coordinate of $geometry</pre>\n"
2165 gFunctionHelpTexts.insert(
"yat", QCoreApplication::translate(
"function_help",
"<h3>yat() function</h3>\n"
2166 "Retrieves a y coordinate of the current feature\n"
2169 "<code>yat(i)</code>\n"
2171 "<h4>Arguments</h4>\n"
2172 "<code>i<code> - is int. index of point of a line (indices start at 0; negative values apply to the last index).\n"
2174 "<h4>Example</h4>\n"
2175 "<pre>yat(1) → 5</pre>\n"
2177 gFunctionHelpTexts.insert(
"year", QCoreApplication::translate(
"function_help",
"<h3>year() function</h3>\n"
2178 "Extract the year part from a date, or the number of years\n"
2179 "from a <code>Interval</code>\n"
2182 "<code>year(date)</code><br>\n"
2183 "<code>year(Interval)</code><br>\n"
2185 "<h4>Arguments</h4>\n"
2186 "<code>date</code> - is date or datetime. The date to extract the year from.\n"
2188 "<code>Interval</code> - is Interval. The Interval to return the number of years from.\n"
2190 "<h4>Example</h4>\n"
2191 "<!-- Show example of function.-->\n"
2192 "<code>year('2012-05-12') → 2012</code><br>\n"
2193 "<code>year(tointerval('3 Years')) → 3</code><br>\n"
2194 "<code>year(age('2012-01-01','2010-01-01')) → 1.9986..</code><br>\n"
2197 gFunctionHelpTexts.insert(
"ymax", QCoreApplication::translate(
"function_help",
"<h3>ymax function</h3>\n"
2198 "Returns the maximum y coordinate of a geometry. Calculations are in the Spatial Reference System of this Geometry. \n"
2201 "<pre>ymax(geom)</pre>\n"
2203 "<h4>Arguments</h4>\n"
2204 "geom → a geometry\n"
2206 "<h4>Example</h4>\n"
2207 "<pre> ymax($geometry) → returns maximum y coordinate of $geometry</pre>\n"
2210 gFunctionHelpTexts.insert(
"ymin", QCoreApplication::translate(
"function_help",
"<h3>ymin function</h3>\n"
2211 "Returns the minimum y coordinate of a geometry. Calculations are in the Spatial Reference System of this Geometry. \n"
2214 "<pre>ymin(geom)</pre>\n"
2216 "<h4>Arguments</h4>\n"
2217 "geom → a geometry\n"
2219 "<h4>Example</h4>\n"
2220 "<pre> ymin($geometry) → returns minimum y coordinate of $geometry</pre>\n"