Replace 1/0 with TRUE/FALSE in function help

This commit is contained in:
Alessandro Pasotti 2022-03-18 10:20:28 +01:00
parent 43d2ebbb03
commit 14fdc19e88
44 changed files with 103 additions and 103 deletions

View File

@ -2,7 +2,7 @@
"name": "AND",
"type": "operator",
"groups": ["Operators"],
"description": "Returns 1 when condition a and b are true.",
"description": "Returns TRUE when condition a and b are true.",
"arguments": [{
"arg": "a",
"description": "condition"
@ -12,16 +12,16 @@
}],
"examples": [{
"expression": "TRUE AND TRUE",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "TRUE AND FALSE",
"returns": "0"
"returns": "FALSE"
}, {
"expression": "4 = 2+2 AND 1 = 1",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "4 = 2+2 AND 1 = 2",
"returns": "0"
"returns": "FALSE"
}],
"tags": ["condition"]
}

View File

@ -2,7 +2,7 @@
"name": "ILIKE",
"type": "operator",
"groups": ["Operators"],
"description": "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.",
"description": "Returns TRUE 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.",
"arguments": [{
"arg": "string/number",
"description": "string to search"
@ -12,49 +12,49 @@
}],
"examples": [{
"expression": "'A' ILIKE 'A'",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "'A' ILIKE 'a'",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "'A' ILIKE 'B'",
"returns": "0"
"returns": "FALSE"
}, {
"expression": "'ABC' ILIKE 'b'",
"returns": "0"
"returns": "FALSE"
}, {
"expression": "'ABC' ILIKE 'B'",
"returns": "0"
"returns": "FALSE"
}, {
"expression": "'ABC' ILIKE '_b_'",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "'ABC' ILIKE '_B_'",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "'ABCD' ILIKE '_b_'",
"returns": "0"
"returns": "FALSE"
}, {
"expression": "'ABCD' ILIKE '_B_'",
"returns": "0"
"returns": "FALSE"
}, {
"expression": "'ABCD' ILIKE '_b%'",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "'ABCD' ILIKE '_B%'",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "'ABCD' ILIKE '%b%'",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "'ABCD' ILIKE '%B%'",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "'ABCD%' ILIKE 'abcd\\\\\\\\%'",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "'ABCD' ILIKE '%B\\\\\\\\%'",
"returns": "0"
"returns": "FALSE"
}],
"tags": ["compare", "numbers", "insensitive", "first", "match", "sensitive", "supplied", "parameter", "case", "matches", "pattern"]
}

View File

@ -2,7 +2,7 @@
"name": "IN",
"type": "operator",
"groups": ["Operators"],
"description": "Returns 1 if value is found within a list of values.",
"description": "Returns TRUE if value is found within a list of values.",
"arguments": [{
"arg": "a",
"description": "value"
@ -12,10 +12,10 @@
}],
"examples": [{
"expression": "'A' IN ('A','B')",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "'A' IN ('C','B')",
"returns": "0"
"returns": "FALSE"
}],
"tags": ["list", "contained", "found"]
}

View File

@ -2,7 +2,7 @@
"name": "IS",
"type": "operator",
"groups": ["Operators"],
"description": "Returns 1 if a is the same as b.",
"description": "Returns TRUE if a is the same as b.",
"arguments": [{
"arg": "a",
"description": "any value"
@ -12,19 +12,19 @@
}],
"examples": [{
"expression": "'A' IS 'A'",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "'A' IS 'a'",
"returns": "0"
"returns": "FALSE"
}, {
"expression": "4 IS 4",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "4 IS 2+2",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "4 IS 2",
"returns": "0"
"returns": "FALSE"
}, {
"expression": "$geometry IS NULL",
"returns": "0, if your geometry is not NULL"

View File

@ -2,7 +2,7 @@
"name": "IS NOT",
"type": "operator",
"groups": ["Operators"],
"description": "Returns 1 if a is not the same as b.",
"description": "Returns TRUE if a is not the same as b.",
"arguments": [{
"arg": "a",
"description": "value"
@ -12,13 +12,13 @@
}],
"examples": [{
"expression": "'a' IS NOT 'b'",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "'a' IS NOT 'a'",
"returns": "0"
"returns": "FALSE"
}, {
"expression": "4 IS NOT 2+2",
"returns": "0"
"returns": "FALSE"
}],
"tags": ["compare", "same", "different"]
}

View File

@ -2,7 +2,7 @@
"name": "LIKE",
"type": "operator",
"groups": ["Operators"],
"description": "Returns 1 if the first parameter matches the supplied pattern. Works with numbers also.",
"description": "Returns TRUE if the first parameter matches the supplied pattern. Works with numbers also.",
"arguments": [{
"arg": "string/number",
"description": "value"
@ -12,34 +12,34 @@
}],
"examples": [{
"expression": "'A' LIKE 'A'",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "'A' LIKE 'a'",
"returns": "0"
"returns": "FALSE"
}, {
"expression": "'A' LIKE 'B'",
"returns": "0"
"returns": "FALSE"
}, {
"expression": "'ABC' LIKE 'B'",
"returns": "0"
"returns": "FALSE"
}, {
"expression": "'ABC' LIKE '_B_'",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "'ABCD' LIKE '_B_'",
"returns": "0"
"returns": "FALSE"
}, {
"expression": "'ABCD' LIKE '_B%'",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "'ABCD' LIKE '%B%'",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "'1%' LIKE '1\\\\\\\\%'",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "'1_' LIKE '1\\\\\\\\%'",
"returns": "0"
"returns": "FALSE"
}],
"tags": ["compare", "sensitive", "numbers", "first", "works", "supplied", "parameter", "matches", "pattern"]
}

View File

@ -9,10 +9,10 @@
}],
"examples": [{
"expression": "NOT 1",
"returns": "0"
"returns": "FALSE"
}, {
"expression": "NOT 0",
"returns": "1"
"returns": "TRUE"
}],
"tags": ["negates", "condition"]
}

View File

@ -2,7 +2,7 @@
"name": "OR",
"type": "operator",
"groups": ["Operators"],
"description": "Returns 1 when condition a or b is true.",
"description": "Returns TRUE when condition a or b is true.",
"arguments": [{
"arg": "a",
"description": "condition"
@ -12,13 +12,13 @@
}],
"examples": [{
"expression": "4 = 2+2 OR 1 = 1",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "4 = 2+2 OR 1 = 2",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "4 = 2 OR 1 = 2",
"returns": "0"
"returns": "FALSE"
}],
"tags": ["condition"]
}

View File

@ -2,7 +2,7 @@
"name": "array_all",
"type": "function",
"groups": ["Arrays"],
"description": "Returns true if an array contains all the values of a given array.",
"description": "Returns TRUE if an array contains all the values of a given array.",
"arguments": [{
"arg": "array_a",
"description": "an array"

View File

@ -2,7 +2,7 @@
"name": "array_contains",
"type": "function",
"groups": ["Arrays"],
"description": "Returns true if an array contains the given value.",
"description": "Returns TRUE if an array contains the given value.",
"arguments": [{
"arg": "array",
"description": "an array"

View File

@ -12,10 +12,10 @@
}],
"examples": [{
"expression": "array_find(array('a', 'b', 'c'), 'b')",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "array_find(array('a', 'b', 'c', 'b'), 'b')",
"returns": "1"
"returns": "TRUE"
}],
"tags": ["array", "found", "first", "lowest", "index"]
}

View File

@ -2,7 +2,7 @@
"name": "array_intersect",
"type": "function",
"groups": ["Arrays"],
"description": "Returns true if at least one element of array1 exists in array2.",
"description": "Returns TRUE if at least one element of array1 exists in array2.",
"arguments": [{
"arg": "array1",
"description": "an array"

View File

@ -12,7 +12,7 @@
"returns": "height of bounding box of the current feature's geometry"
}, {
"expression": "bounds_height(geom_from_wkt('Polygon((1 1, 0 0, -1 1, 1 1))'))",
"returns": "1"
"returns": "TRUE"
}],
"tags": ["box", "spatial", "reference", "calculations", "system", "height", "bounding"]
}

View File

@ -20,11 +20,11 @@
}, {
"expression": "clamp(1,0,10)",
"returns": "1",
"note": "<i>input</i> is less than minimum value of 1, so function returns 1"
"note": "<i>input</i> is less than minimum value of 1, so function Returns 1"
}, {
"expression": "clamp(1,11,10)",
"returns": "10",
"note": "<i>input</i> is greater than maximum value of 10, so function returns 10"
"note": "<i>input</i> is greater than maximum value of 10, so function Returns 10"
}],
"tags": ["specified", "restricts", "input", "range"]
}

View File

@ -2,7 +2,7 @@
"name": "contains",
"type": "function",
"groups": ["GeometryGroup"],
"description": "Tests whether a geometry contains another. Returns true if and only if no points of geometry2 lie in the exterior of geometry1, and at least one point of the interior of geometry2 lies in the interior of geometry1.",
"description": "Tests whether a geometry contains another. Returns TRUE if and only if no points of geometry2 lie in the exterior of geometry1, and at least one point of the interior of geometry2 lies in the interior of geometry1.",
"arguments": [{
"arg": "geometry1",
"description": "a geometry"

View File

@ -2,7 +2,7 @@
"name": "crosses",
"type": "function",
"groups": ["GeometryGroup"],
"description": "Tests whether a geometry crosses another. Returns true if the supplied geometries have some, but not all, interior points in common.",
"description": "Tests whether a geometry crosses another. Returns TRUE if the supplied geometries have some, but not all, interior points in common.",
"arguments": [{
"arg": "geometry1",
"description": "a geometry"

View File

@ -2,7 +2,7 @@
"name": "disjoint",
"type": "function",
"groups": ["GeometryGroup"],
"description": "Tests whether geometries do not spatially intersect. Returns true if the geometries do not share any space together.",
"description": "Tests whether geometries do not spatially intersect. Returns TRUE if the geometries do not share any space together.",
"arguments": [{
"arg": "geometry1",
"description": "a geometry"

View File

@ -2,7 +2,7 @@
"name": "file_exists",
"type": "function",
"groups": ["Files and Paths"],
"description": "Returns true if a file path exists.",
"description": "Returns TRUE if a file path exists.",
"arguments": [{
"arg": "path",
"description": "a file path or a map layer value. If a map layer value is specified then the file source of the layer will be used."

View File

@ -2,7 +2,7 @@
"name": "intersects",
"type": "function",
"groups": ["GeometryGroup"],
"description": "Tests whether a geometry intersects another. Returns true if the geometries spatially intersect (share any portion of space) and false if they do not.",
"description": "Tests whether a geometry intersects another. Returns TRUE if the geometries spatially intersect (share any portion of space) and false if they do not.",
"arguments": [{
"arg": "geometry1",
"description": "a geometry"

View File

@ -2,7 +2,7 @@
"name": "intersects_bbox",
"type": "function",
"groups": ["GeometryGroup"],
"description": "Tests whether a geometry's bounding box overlaps another geometry's bounding box. Returns true if the geometries spatially intersect the bounding box defined and false if they do not.",
"description": "Tests whether a geometry's bounding box overlaps another geometry's bounding box. Returns TRUE if the geometries spatially intersect the bounding box defined and false if they do not.",
"arguments": [{
"arg": "geometry1",
"description": "a geometry"

View File

@ -2,7 +2,7 @@
"name": "is_closed",
"type": "function",
"groups": ["GeometryGroup"],
"description": "Returns true if a line string is closed (start and end points are coincident), or false if a line string is not closed. If the geometry is not a line string then the result will be NULL.",
"description": "Returns TRUE if a line string is closed (start and end points are coincident), or false if a line string is not closed. If the geometry is not a line string then the result will be NULL.",
"arguments": [{
"arg": "geometry",
"description": "a line string geometry"

View File

@ -2,7 +2,7 @@
"name": "is_directory",
"type": "function",
"groups": ["Files and Paths"],
"description": "Returns true if a path corresponds to a directory.",
"description": "Returns TRUE if a path corresponds to a directory.",
"arguments": [{
"arg": "path",
"description": "a file path or a map layer value. If a map layer value is specified then the file source of the layer will be used."

View File

@ -2,7 +2,7 @@
"name": "is_empty",
"type": "function",
"groups": ["GeometryGroup"],
"description": "Returns true if a geometry is empty (without coordinates), false if the geometry is not empty and NULL if there is no geometry. See also is_empty_or_null.",
"description": "Returns TRUE if a geometry is empty (without coordinates), false if the geometry is not empty and NULL if there is no geometry. See also is_empty_or_null.",
"arguments": [{
"arg": "geometry",
"description": "a geometry"

View File

@ -2,7 +2,7 @@
"name": "is_empty_or_null",
"type": "function",
"groups": ["GeometryGroup"],
"description": "Returns true if a geometry is NULL or empty (without coordinates) or false otherwise. This function is like the expression '$geometry IS NULL or is_empty($geometry)'",
"description": "Returns TRUE if a geometry is NULL or empty (without coordinates) or false otherwise. This function is like the expression '$geometry IS NULL or is_empty($geometry)'",
"arguments": [{
"arg": "geometry",
"description": "a geometry"

View File

@ -2,7 +2,7 @@
"name": "is_file",
"type": "function",
"groups": ["Files and Paths"],
"description": "Returns true if a path corresponds to a file.",
"description": "Returns TRUE if a path corresponds to a file.",
"arguments": [{
"arg": "path",
"description": "a file path or a map layer value. If a map layer value is specified then the file source of the layer will be used."

View File

@ -2,7 +2,7 @@
"name": "is_layer_visible",
"type": "function",
"groups": ["General"],
"description": "Returns true if a specified layer is visible.",
"description": "Returns TRUE if a specified layer is visible.",
"arguments": [{
"arg": "layer",
"description": "a string, representing either a layer name or layer ID"

View File

@ -2,7 +2,7 @@
"name": "is_multipart",
"type": "function",
"groups": ["GeometryGroup"],
"description": "Returns true if the geometry is of Multi type.",
"description": "Returns TRUE if the geometry is of Multi type.",
"arguments": [{
"arg": "geometry",
"description": "a geometry"

View File

@ -2,7 +2,7 @@
"name": "is_valid",
"type": "function",
"groups": ["GeometryGroup"],
"description": "Returns true if a geometry is valid; if it is well-formed in 2D according to the OGC rules.",
"description": "Returns TRUE if a geometry is valid; if it is well-formed in 2D according to the OGC rules.",
"arguments": [{
"arg": "geometry",
"description": "a geometry"

View File

@ -9,7 +9,7 @@
}],
"examples": [{
"expression": "m_max( make_point_m( 0,0,1 ) )",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "m_max(make_line( make_point_m( 0,0,1 ), make_point_m( -1,-1,2 ), make_point_m( -2,-2,0 ) ) )",
"returns": "2"

View File

@ -2,7 +2,7 @@
"name": "map_exist",
"type": "function",
"groups": ["Maps"],
"description": "Returns true if the given key exists in the map.",
"description": "Returns TRUE if the given key exists in the map.",
"arguments": [{
"arg": "map",
"description": "a map"

View File

@ -12,10 +12,10 @@
}],
"examples": [{
"expression": "5 = 4",
"returns": "0"
"returns": "FALSE"
}, {
"expression": "4 = 4",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "5 = NULL",
"returns": "NULL"

View File

@ -12,13 +12,13 @@
}],
"examples": [{
"expression": "5 &gt;= 4",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "5 &gt;= 5",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "4 &gt;= 5",
"returns": "0"
"returns": "FALSE"
}],
"tags": ["compares", "equal", "values", "greater", "left", "evaluates", "right"]
}

View File

@ -12,13 +12,13 @@
}],
"examples": [{
"expression": "5 &gt; 4",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "5 &gt; 5",
"returns": "0"
"returns": "FALSE"
}, {
"expression": "4 &gt; 5",
"returns": "0"
"returns": "FALSE"
}],
"tags": ["greater", "compares", "evaluates", "left", "values", "right"]
}

View File

@ -12,13 +12,13 @@
}],
"examples": [{
"expression": "5 &lt;= 4",
"returns": "0"
"returns": "FALSE"
}, {
"expression": "5 &lt;= 5",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "4 &lt;= 5",
"returns": "1"
"returns": "TRUE"
}],
"tags": ["compares", "equal", "less", "values", "left", "evaluates", "right"]
}

View File

@ -12,13 +12,13 @@
}],
"examples": [{
"expression": "5 &lt; 4",
"returns": "0"
"returns": "FALSE"
}, {
"expression": "5 &lt; 5",
"returns": "0"
"returns": "FALSE"
}, {
"expression": "4 &lt; 5",
"returns": "1"
"returns": "TRUE"
}],
"tags": ["left", "evaluates", "compares", "less", "values", "right"]
}

View File

@ -12,7 +12,7 @@
}],
"examples": [{
"expression": "5 - 4",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "5 - NULL",
"returns": "NULL"

View File

@ -12,10 +12,10 @@
}],
"examples": [{
"expression": "5 &lt;&gt; 4",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "4 &lt;&gt; 4",
"returns": "0"
"returns": "FALSE"
}, {
"expression": "5 &lt;&gt; NULL",
"returns": "NULL"

View File

@ -12,16 +12,16 @@
}],
"examples": [{
"expression": "'hello' ~ 'll'",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "'hello' ~ '^ll'",
"returns": "0"
"returns": "FALSE"
}, {
"expression": "'hello' ~ 'llo$'",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "'abc123' ~ '\\\\\\\\d+'",
"returns": "1"
"returns": "TRUE"
}],
"tags": ["white", "space", "regular", "performs", "backslash", "characters", "escaped", "character", "expression", "match"]
}

View File

@ -2,7 +2,7 @@
"name": "overlaps",
"type": "function",
"groups": ["GeometryGroup"],
"description": "Tests whether a geometry overlaps another. Returns true if the geometries share space, are of the same dimension, but are not completely contained by each other.",
"description": "Tests whether a geometry overlaps another. Returns TRUE if the geometries share space, are of the same dimension, but are not completely contained by each other.",
"arguments": [{
"arg": "geometry1",
"description": "a geometry"

View File

@ -12,7 +12,7 @@
"returns": "3.14159"
}, {
"expression": "radians(57.2958)",
"returns": "1"
"returns": "TRUE"
}],
"tags": ["converts", "degrees", "radians"]
}

View File

@ -2,7 +2,7 @@
"name": "roundness",
"type": "function",
"groups": ["GeometryGroup"],
"description": "Calculates how close a polygon shape is to a circle. The function returns 1 when the polygon shape is a perfect circle and 0 when it is completely flat.",
"description": "Calculates how close a polygon shape is to a circle. The function Returns TRUE when the polygon shape is a perfect circle and 0 when it is completely flat.",
"arguments": [{
"arg": "geometry",
"description": "a polygon"

View File

@ -2,7 +2,7 @@
"name": "touches",
"type": "function",
"groups": ["GeometryGroup"],
"description": "Tests whether a geometry touches another. Returns true if the geometries have at least one point in common, but their interiors do not intersect.",
"description": "Tests whether a geometry touches another. Returns TRUE if the geometries have at least one point in common, but their interiors do not intersect.",
"arguments": [{
"arg": "geometry1",
"description": "a geometry"

View File

@ -2,7 +2,7 @@
"name": "within",
"type": "function",
"groups": ["GeometryGroup"],
"description": "Tests whether a geometry is within another. Returns true if the geometry1 is completely within geometry2.",
"description": "Tests whether a geometry is within another. Returns TRUE if the geometry1 is completely within geometry2.",
"arguments": [{
"arg": "geometry1",
"description": "a geometry"

View File

@ -9,10 +9,10 @@
}],
"examples": [{
"expression": "z_min( geom_from_wkt( 'POINT ( 0 0 1 )' ) )",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "z_min( geom_from_wkt( 'MULTIPOINT ( 0 0 1 , 1 1 3 )' ) )",
"returns": "1"
"returns": "TRUE"
}, {
"expression": "z_min( make_line( make_point( 0,0,0 ), make_point( -1,-1,-2 ) ) )",
"returns": "-2"