Skip to content
Permalink
Browse files

Harmonize NULL spelling in function help

  • Loading branch information
DelazJ authored and nyalldawson committed Jul 29, 2020
1 parent c4722b4 commit 8d4843d27b0d81fea56cd567baaf7384326c8579
@@ -1,9 +1,9 @@
{
"name": "NULL",
"type": "value",
"description": "Equates to a null value.",
"description": "Equates to a NULL value.",
"examples": [
{ "expression":"NULL", "returns":"a null value" }
{ "expression":"NULL", "returns":"a NULL value" }
],
"notes": "To test for NULL use an <pre>IS NULL</pre> or <pre>IS NOT NULL</pre> expression."
}
@@ -2,7 +2,7 @@
"name": "boundary",
"type": "function",
"groups": ["GeometryGroup"],
"description":"Returns the closure of the combinatorial boundary of the geometry (ie the topological boundary of the geometry). For instance, a polygon geometry will have a boundary consisting of the linestrings for each ring in the polygon. Some geometry types do not have a defined boundary, e.g., points or geometry collections, and will return null.",
"description":"Returns the closure of the combinatorial boundary of the geometry (ie the topological boundary of the geometry). For instance, a polygon geometry will have a boundary consisting of the linestrings for each ring in the polygon. Some geometry types do not have a defined boundary, e.g., points or geometry collections, and will return NULL.",
"arguments": [ {"arg":"geometry","description":"a geometry"} ],
"examples": [ { "expression":"geom_to_wkt(boundary(geom_from_wkt('Polygon((1 1, 0 0, -1 1, 1 1))')))", "returns":"'LineString(1 1,0 0,-1 1,1 1)'"}]
}
@@ -2,7 +2,7 @@
"name": "close_line",
"type": "function",
"groups": ["GeometryGroup"],
"description": "Returns a closed line string of the input line string by appending the first point to the end of the line, if it is not already closed. If the geometry is not a line string or multi line string then the result will be null.",
"description": "Returns a closed line string of the input line string by appending the first point to the end of the line, if it is not already closed. If the geometry is not a line string or multi line string then the result will be NULL.",
"arguments": [ {"arg":"geometry","description":"a line string geometry"}],
"examples": [ { "expression":"geom_to_wkt(close_line(geom_from_wkt('LINESTRING(0 0, 1 0, 1 1)')))", "returns":"LineString (0 0, 1 0, 1 1, 0 0)"},
{ "expression":"geom_to_wkt(close_line(geom_from_wkt('LINESTRING(0 0, 1 0, 1 1, 0 0)')))", "returns":"LineString (0 0, 1 0, 1 1, 0 0)"}]
@@ -2,13 +2,13 @@
"name": "count_missing",
"type": "function",
"groups": ["Aggregates"],
"description": "Returns the count of missing (null) values.",
"description": "Returns the count of missing (NULL) values.",
"arguments": [
{"arg":"expression", "description":"sub expression of field to aggregate"},
{"arg":"group_by", "optional":true, "description":"optional expression to use to group aggregate calculations"},
{"arg":"filter", "optional":true, "description":"optional expression to use to filter features used to calculate aggregate"}
],
"examples": [
{ "expression":"count_missing(\"stations\",group_by:=\"state\")", "returns":"count of missing (null) station values, grouped by state field"}
{ "expression":"count_missing(\"stations\",group_by:=\"state\")", "returns":"count of missing (NULL) station values, grouped by state field"}
]
}
@@ -2,7 +2,7 @@
"name": "env",
"type": "function",
"groups": ["General"],
"description": "Gets an environment variable and returns its content as a string. If the variable is not found, `NULL` will be returned. This is handy to inject system specific configuration like drive letters or path prefixes. Definition of environment variables depends on the operating system, please check with your system administrator or the operating system documentation how this can be set.",
"description": "Gets an environment variable and returns its content as a string. If the variable is not found, NULL will be returned. This is handy to inject system specific configuration like drive letters or path prefixes. Definition of environment variables depends on the operating system, please check with your system administrator or the operating system documentation how this can be set.",
"arguments": [
{"arg":"name","description":"The name of the environment variable which should be retrieved."}
],
@@ -2,7 +2,7 @@
"name": "exterior_ring",
"type": "function",
"groups": ["GeometryGroup"],
"description": "Returns a line string representing the exterior ring of a polygon geometry. If the geometry is not a polygon then the result will be null.",
"description": "Returns a line string representing the exterior ring of a polygon geometry. If the geometry is not a polygon then the result will be NULL.",
"arguments": [ {"arg":"geom","description":"a polygon geometry"}],
"examples": [ { "expression":"geom_to_wkt(exterior_ring(geom_from_wkt('POLYGON((-1 -1, 4 0, 4 2, 0 2, -1 -1),( 0.1 0.1, 0.1 0.2, 0.2 0.2, 0.2, 0.1, 0.1 0.1))')))", "returns":"'LineString (-1 -1, 4 0, 4 2, 0 2, -1 -1)'"}]
}
@@ -2,7 +2,7 @@
"name": "geometry_n",
"type": "function",
"groups": ["GeometryGroup"],
"description": "Returns a specific geometry from a geometry collection, or null if the input geometry is not a collection.",
"description": "Returns a specific geometry from a geometry collection, or NULL if the input geometry is not a collection.",
"arguments": [ {"arg":"geometry","description":"geometry collection"},
{"arg":"index","description":"index of geometry to return, where 1 is the first geometry in the collection"} ],
"examples": [ { "expression":"geom_to_wkt(geometry_n(geom_from_wkt('GEOMETRYCOLLECTION(POINT(0 1), POINT(0 0), POINT(1 0), POINT(1 1))'),3))", "returns":"'Point (1 0)'"}]
@@ -2,7 +2,7 @@
"name": "interior_ring_n",
"type": "function",
"groups": ["GeometryGroup"],
"description": "Returns a specific interior ring from a polygon geometry, or null if the geometry is not a polygon.",
"description": "Returns a specific interior ring from a polygon geometry, or NULL if the geometry is not a polygon.",
"arguments": [ {"arg":"geometry","description":"polygon geometry"},
{"arg":"index","description":"index of interior to return, where 1 is the first interior ring"} ],
"examples": [ { "expression":"geom_to_wkt(interior_ring_n(geom_from_wkt('POLYGON((-1 -1, 4 0, 4 2, 0 2, -1 -1),(-0.1 -0.1, 0.4 0, 0.4 0.2, 0 0.2, -0.1 -0.1),(-1 -1, 4 0, 4 2, 0 2, -1 -1))'),1))", "returns":"'LineString (-0.1 -0.1, 0.4 0, 0.4 0.2, 0 0.2, -0.1 -0.1))'"}]
@@ -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":"geom","description":"a line string geometry"}],
"examples": [ { "expression":"is_closed(geom_from_wkt('LINESTRING(0 0, 1 1, 2 2)'))", "returns":"false"},
{ "expression":"is_closed(geom_from_wkt('LINESTRING(0 0, 1 1, 2 2, 0 0)'))", "returns":"true"}]
@@ -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":"geom","description":"a geometry"}],
"examples": [ { "expression":"is_empty(geom_from_wkt('LINESTRING(0 0, 1 1, 2 2)'))", "returns":"false"},
{ "expression":"is_empty(geom_from_wkt('LINESTRING EMPTY'))", "returns":"true"},
@@ -2,7 +2,7 @@
"name": "line_merge",
"type": "function",
"groups": ["GeometryGroup"],
"description":"Returns a LineString or MultiLineString geometry, where any connected LineStrings from the input geometry have been merged into a single linestring. This function will return null if passed a geometry which is not a LineString/MultiLineString.",
"description":"Returns a LineString or MultiLineString geometry, where any connected LineStrings from the input geometry have been merged into a single linestring. This function will return NULL if passed a geometry which is not a LineString/MultiLineString.",
"arguments": [ {"arg":"geometry","description":"a LineString/MultiLineString geometry"} ],
"examples": [ { "expression":"geom_to_wkt(line_merge(geom_from_wkt('MULTILINESTRING((0 0, 1 1),(1 1, 2 2))')))", "returns":"'LineString(0 0,1 1,2 2)'"},
{ "expression":"geom_to_wkt(line_merge(geom_from_wkt('MULTILINESTRING((0 0, 1 1),(11 1, 21 2))')))", "returns":"'MultiLineString((0 0, 1 1),(11 1, 21 2)'"}]
@@ -2,7 +2,7 @@
"name": "nullif",
"type": "function",
"groups": ["Conditionals"],
"description": "Returns a null value if value1 equals value2; otherwise it returns value1. This can be used to conditionally substitute values with NULL.",
"description": "Returns a NULL value if value1 equals value2; otherwise it returns value1. This can be used to conditionally substitute values with NULL.",
"arguments": [ {"arg":"value1", "description": "The value that should either be used or substituted with NULL."},
{"arg":"value2", "description": "The control value that will trigger the NULL substitution."}],
"examples": [ { "expression":"nullif('(none)', '(none)')", "returns":"NULL"},
@@ -2,7 +2,7 @@
"name": "num_geometries",
"type": "function",
"groups": ["GeometryGroup"],
"description": "Returns the number of geometries in a geometry collection, or null if the input geometry is not a collection.",
"description": "Returns the number of geometries in a geometry collection, or NULL if the input geometry is not a collection.",
"arguments": [ {"arg":"geometry","description":"geometry collection"} ],
"examples": [ { "expression":"num_geometries(geom_from_wkt('GEOMETRYCOLLECTION(POINT(0 1), POINT(0 0), POINT(1 0), POINT(1 1))'))", "returns":"4"}]
}
@@ -2,7 +2,7 @@
"name": "num_interior_rings",
"type": "function",
"groups": ["GeometryGroup"],
"description": "Returns the number of interior rings in a polygon or geometry collection, or null if the input geometry is not a polygon or collection.",
"description": "Returns the number of interior rings in a polygon or geometry collection, or NULL if the input geometry is not a polygon or collection.",
"arguments": [ {"arg":"geometry","description":"input geometry"} ],
"examples": [ { "expression":"num_interior_rings(geom_from_wkt('POLYGON((-1 -1, 4 0, 4 2, 0 2, -1 -1),(-0.1 -0.1, 0.4 0, 0.4 0.2, 0 0.2, -0.1 -0.1))'))", "returns":"1"}]
}
@@ -2,7 +2,7 @@
"name": "num_rings",
"type": "function",
"groups": ["GeometryGroup"],
"description": "Returns the number of rings (including exterior rings) in a polygon or geometry collection, or null if the input geometry is not a polygon or collection.",
"description": "Returns the number of rings (including exterior rings) in a polygon or geometry collection, or NULL if the input geometry is not a polygon or collection.",
"arguments": [ {"arg":"geometry","description":"input geometry"} ],
"examples": [ { "expression":"num_rings(geom_from_wkt('POLYGON((-1 -1, 4 0, 4 2, 0 2, -1 -1),(-0.1 -0.1, 0.4 0, 0.4 0.2, 0 0.2, -0.1 -0.1))'))", "returns":"2"}]
}
@@ -5,6 +5,6 @@
"description": "Returns a random integer within the range specified by the minimum and maximum argument (inclusive). If a seed is provided, the returned will always be the same, depending on the seed.",
"arguments": [ {"arg":"min","description":"an integer representing the smallest possible random number desired"},
{"arg":"max","description":"an integer representing the largest possible random number desired"},
{"arg":"seed","optional":true,"default":"null","description":"any value to use as seed"}],
{"arg":"seed","optional":true,"default":"NULL","description":"any value to use as seed"}],
"examples": [ { "expression":"rand(1, 10)", "returns":"8"}]
}
@@ -5,6 +5,6 @@
"description": "Returns a random float within the range specified by the minimum and maximum argument (inclusive). If a seed is provided, the returned will always be the same, depending on the seed.",
"arguments": [ {"arg":"min","optional":true,"default":"0.0","description":"an float representing the smallest possible random number desired"},
{"arg":"max","optional":true,"default":"1.0","description":"an float representing the largest possible random number desired"},
{"arg":"seed","optional":true,"default":"null","description":"any value to use as seed"}],
{"arg":"seed","optional":true,"default":"NULL","description":"any value to use as seed"}],
"examples": [ { "expression":"randf(1, 10)", "returns":"4.59258286403147"} ]
}
@@ -5,7 +5,7 @@
"description": "Returns the raster value found at the provided point.",
"arguments": [ {"arg":"layer","description":"the name or id of a raster layer"},
{"arg":"band","description":"the band number to sample the value from."},
{"arg":"point","description":"point geometry (for multipart geometries having more than one part, a null value will be returned)"}],
{"arg":"point","description":"point geometry (for multipart geometries having more than one part, a NULL value will be returned)"}],
"examples": [ { "expression":"raster_value('dem', 1, make_point(1,1))", "returns":"25"}]
}

@@ -2,7 +2,7 @@
"name": "try",
"type": "function",
"groups": ["Conditionals"],
"description": "Tries an expression and returns its value if error-free. If the expression returns an error, an alternative value will be returned when provided otherwise the function will return null.",
"description": "Tries an expression and returns its value if error-free. If the expression returns an error, an alternative value will be returned when provided otherwise the function will return NULL.",
"arguments": [
{"arg":"expression","description":"the expression which should be run"},
{"arg":"alternative","optional":true,"description":"the result which will be returned if the expression returns an error."}
@@ -2,7 +2,7 @@
"name": "z",
"type": "function",
"groups": ["GeometryGroup"],
"description": "Returns the z coordinate of a point geometry, or Null if the geometry has no z value.",
"description": "Returns the z coordinate of a point geometry, or NULL if the geometry has no z value.",
"arguments": [ {"arg":"geom","description":"a point geometry"}],
"examples": [ { "expression":"z( geom_from_wkt( 'POINTZ(2 5 7)' ) )", "returns":"7"}
]
@@ -2,12 +2,12 @@
"name": "z_max",
"type": "function",
"groups": ["GeometryGroup"],
"description": "Returns the maximum z coordinate of a geometry, or Null if the geometry has no z value.",
"description": "Returns the maximum z coordinate of a geometry, or NULL if the geometry has no z value.",
"arguments": [ {"arg":"geometry","description":"a geometry with z coordinate"}],
"examples": [ { "expression":"z_max( geom_from_wkt( 'POINT ( 0 0 1 )' ) )", "returns":"1"},
{ "expression":"z_max( geom_from_wkt( 'MULTIPOINT ( 0 0 1 , 1 1 3 )' ) )", "returns":"3"},
{ "expression":"z_max( make_line( make_point( 0,0,0 ), make_point( -1,-1,-2 ) ) )", "returns":"0"},
{ "expression":"z_max( geom_from_wkt( 'LINESTRING( 0 0 0, 1 0 2, 1 1 -1 )' ) )", "returns":"2"},
{ "expression":"z_max( geom_from_wkt( 'POINT ( 0 0 )' ) )", "returns":"Null"}
{ "expression":"z_max( geom_from_wkt( 'POINT ( 0 0 )' ) )", "returns":"NULL"}
]
}
@@ -2,12 +2,12 @@
"name": "z_min",
"type": "function",
"groups": ["GeometryGroup"],
"description": "Returns the minimum z coordinate of a geometry, or Null if the geometry has no z value.",
"description": "Returns the minimum z coordinate of a geometry, or NULL if the geometry has no z value.",
"arguments": [ {"arg":"geometry","description":"a geometry with z coordinate"}],
"examples": [ { "expression":"z_min( geom_from_wkt( 'POINT ( 0 0 1 )' ) )", "returns":"1"},
{ "expression":"z_min( geom_from_wkt( 'MULTIPOINT ( 0 0 1 , 1 1 3 )' ) )", "returns":"1"},
{ "expression":"z_min( make_line( make_point( 0,0,0 ), make_point( -1,-1,-2 ) ) )", "returns":"-2"},
{ "expression":"z_min( geom_from_wkt( 'LINESTRING( 0 0 0, 1 0 2, 1 1 -1 )' ) )", "returns":"-1"},
{ "expression":"z_min( geom_from_wkt( 'POINT ( 0 0 )' ) )", "returns":"Null"}
{ "expression":"z_min( geom_from_wkt( 'POINT ( 0 0 )' ) )", "returns":"NULL"}
]
}

0 comments on commit 8d4843d

Please sign in to comment.
You can’t perform that action at this time.