Field Calculator

Function Description: Used for calculating and editing fields in feature classes or tables. It allows users to write simple code to perform various calculations and operations, including calculating field values, updating field values, and calculating geometric properties.

Interface Layout and Corresponding Operations

As shown in the figure, the Field Calculator mainly consists of five parts: 1.Target Field Selection; 2.Expression Type Switching; 3.Field Preview; 4.Function Preview; 5.Expression Editing.

fieldCalculator.png

Target Field Selection

Click the dropdown box to select the field to be calculated. If you need to apply the expression to a new field, you can directly enter the name of the target field in the field dropdown box. If the current field does not exist after editing, a control will pop up to set the type of the new field, as shown:

fieldCalculator_addField.png

Expression Type Switching

You can choose between the Expression Interface or Python Script Interface for editing. The default view is the Expression Interface. The Python Script Interface is shown below:

fieldCalculator_python.png

Use the new button in the lower-left corner to create a new Python script, and use the delete button to remove scripts. After editing the Python expression, click the save button to save the changes to the script.

Field Preview

The list displays all available fields in the current layer. Double-clicking a field will automatically add it to the function editing area. If the currently selected field has valid values in the attribute table, you can select a valid value from the value area below the list, which will be automatically added to the function editing area upon clicking.

fieldCalculator_selectValue.png

Function Preview

The Field Calculator provides several built-in functions. You can enter the function name in the search box, and the required function will be automatically displayed. Click "Show Help" to view the function's usage instructions, methods, and examples. Similar to the Field Preview, double-clicking the function name will add it to the function editing area.

fieldCalculator_selectFun.png

Expression Editing

Expression editing in the Field Calculator supports two calculation methods: using built-in functions and basic operators or custom Python scripts.

Example 1: Modify the Value of a Field

Change the value of field "SCode" to the absolute value of the field "MCode" plus 1. First, select the field "SCode" in the field name section. Then, in the function expression editing area below, write the expression. After completing the expression, if it is valid, click "Apply" to complete the modification after the calculation is done.

fieldCalculator_demo1.png
Example 2: Use Python Expressions for Calculation

1.Write a Python script: This script calculates the sum of two numbers. After completing it, click the save button in the lower-right corner to use it in the Expression Interface.

fieldCalculator_demo1.png

Note: In the first line of the script, group='**Custom**', where Custom is the group name displayed in the function list.

fieldCalculator_demo1.png

2.After editing, it can be used in the Expression Editing page. In this example, use the twoSum function created in Step 1 to add fields T1 and T2, and assign the result to the newly created field T3.

fieldCalculator_demo1.png

Reference Table

name Description
array_foreach Returns an array with the given expression evaluated on each item.
array_filter Returns an array with only the items for which the expression evaluates to true.
array Returns an array containing all the values passed as parameter.
array_sort Returns the provided array with its elements sorted.
array_length Returns the number of elements of an array.
array_count Counts the number of occurrences of a given value in an array.
array_majority Returns the most common values in an array.
array_max Returns the maximum value of an array.
array_mean Returns the mean of arithmetic values in an array. Non numeric values in the array are ignored.
array_median Returns the median of arithmetic values in an array. Non arithmetic values in the array are ignored.
array_min Returns the minimum value of an array.
array_contains Returns true if an array contains the given value.
array_minority Returns the most no common values in an array.
array_prioritize Returns an array sorted using the ordering specified in another array. Values which are present in the first array but are missing from the second array will be added to the end of the result.
array_replace Returns an array with the supplied value, array, or map of values replaced.
array_sum Returns the sum of arithmetic values in an array. Non numeric values in the array are ignored.
array_all Returns true if an array contains all the values of a given array.
array_find Returns the index (0 for the first one) of a value within an array. Returns -1 if the value is not found.
array_get Returns the Nth value (0 for the first one) of an array.
array_first Returns the first value of an array.
array_last Returns the last value of an array.
array_append Returns an array with the given value added at the end.
array_prepend Returns an array with the given value added at the beginning.
array_insert Returns an array with the given value added at the given position.
array_remove_at Returns an array with the given index removed.
array_remove_all Returns an array with all the entries of the given value removed.
array_cat Returns an array containing all the given arrays concatenated.
array_slice Returns a portion of the array. The slice is defined by the start_pos and end_pos arguments.
array_reverse Returns the given array with array values in reversed order.
array_intersect Returns true if at least one element of array1 exists in array2.
array_distinct Returns an array containing distinct values of the given array.
array_to_string Concatenates array elements into a string separated by a delimiter and using optional string for empty values.
string_to_array Splits string into an array using supplied delimiter and optional string for empty values.
generate_series Creates an array containing a sequence of numbers.
regexp_matches Returns an array of all strings captured by capturing groups, in the order the groups themselves appear in the supplied regular expression against a string.
geometries_to_array Splits a geometry into simpler geometries in an array.
color_rgb Returns a string representation of a color based on its red, green, and blue components.
color_rgba Returns a string representation of a color based on its red, green, blue, and alpha (transparency) components.
color_mix_rgb Returns a string representing a color mixing the red, green, blue, and alpha values of two provided colors based on a given ratio.
color_grayscale_average Applies a grayscale filter and returns a string representation from a provided color.
color_hsl Returns a string representation of a color based on its hue, saturation, and lightness attributes.
color_hsla Returns a string representation of a color based on its hue, saturation, lightness and alpha (transparency) attributes
color_hsv Returns a string representation of a color based on its hue, saturation, and value attributes.
color_hsva Returns a string representation of a color based on its hue, saturation, value and alpha (transparency) attributes.
color_cmyk Returns a string representation of a color based on its cyan, magenta, yellow and black components
color_cmyka Returns a string representation of a color based on its cyan, magenta, yellow, black and alpha (transparency) components
color_part Returns a specific component from a color string, e.g., the red component or alpha component.
darker Returns a darker (or lighter) color string
lighter Returns a lighter (or darker) color string
set_color_part Sets a specific color component for a color string, e.g., the red component or alpha component.
coalesce Returns the first non-NULL value from the expression list.
This function can take any number of arguments.
nullif Returns a null value if value1 equals value2; otherwise it returns value1. This can be used to conditionally substitute values with NULL.
if Tests a condition and returns a different result depending on the conditional check.
try 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.
to_int Converts a string to integer number. Nothing is returned if a value cannot be converted to integer (e.g '123asd' is invalid).
to_real Converts a string to a real number. Nothing is returned if a value cannot be converted to real. Numbers are rounded after saving changes if the precision is smaller than the result of the conversion.
to_string Converts a number to string.
to_datetime Converts a string into a datetime object. An optional format string can be provided to parse the string.
to_date Converts a string into a date object. An optional format string can be provided to parse the string.
to_time Converts a string into a time object. An optional format string can be provided to parse the string.
to_interval Converts a string to a interval type. Can be used to take days, hours, month, etc of a date.
to_dm Convert a coordinate to degree, minute.
to_dms Convert a coordinate to degree, minute, second.
to_decimal Converts a degree, minute, second coordinate to its decimal equivalent.
now Returns the current date and time. The function is static and will return consistent results while evaluating. The time returned is the time when the expression is prepared.
age Returns the difference between two dates or datetimes.
The difference is returned as a Interval and needs to be used with one of the following functions in order to extract useful information:
  • year
  • month
  • week
  • day
  • hour
  • minute
  • second
year Extracts the year part from a date, or the number of years from an interval.
month Extracts the month part from a date, or the number of months from an interval.
week Extracts the week number from a date, or the number of weeks from an interval.
day Extracts the day from a date, or the number of days from an interval.
hour Extracts the hour part from a datetime or time, or the number of hours from an interval.
minute Extracts the minutes part from a datetime or time, or the number of minutes from an interval.
second Extracts the seconds part from a datetime or time, or the number of seconds from an interval.
epoch Returns the interval in milliseconds between the unix epoch and a given date value.
datetime_from_epoch Returns a datetime whose date and time are the number of milliseconds.
day_of_week Returns the day of the week for a specified date or datetime. The returned value ranges from 0 to 6, where 0 corresponds to a Sunday and 6 to a Saturday.
make_date Creates a date value from year, month and day numbers.
make_time Creates a time value from hour, minute and second numbers.
make_datetime Creates a datetime value from year, month, day, hour, minute and second numbers.
make_interval Creates an interval value from year, month, weeks, days, hours, minute and seconds values.
base_file_name Returns the base name of the file without the directory or file suffix.
file_suffix Returns the file suffix (extension) from a file path.
file_exists Returns true if a file path exists.
file_name Returns the name of a file (including the file extension), excluding the directory.
is_file Returns true if a path corresponds to a file.
is_directory Returns true if a path corresponds to a directory.
file_path Returns the directory component of a file path. This does not include the file name.
file_size Returns the size (in bytes) of a file.
levenshtein Returns the Levenshtein edit distance between two strings. This equates to the minimum number of character edits (insertions, deletions or substitutions) required to change one string to another.
The Levenshtein distance is a measure of the similarity between two strings. Smaller distances mean the strings are more similar, and larger distances indicate more different strings. The distance is case sensitive.
longest_common_substring Returns the longest common substring between two strings. This substring is the longest string that is a substring of the two input strings. For example, the longest common substring of "ABABC" and "BABCA" is "ABC". The substring is case sensitive.
hamming_distance Returns the Hamming distance between two strings. This equates to the number of characters at corresponding positions within the input strings where the characters are different. The input strings must be the same length, and the comparison is case-sensitive.
soundex Returns the Soundex representation of a string. Soundex is a phonetic matching algorithm, so strings with similar sounds should be represented by the same Soundex code.
with_variable This function sets a variable for any expression code that will be provided as 3rd argument. This is only useful for complicated expressions, where the same calculated value needs to be used in different places.
env 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.
var Returns the value stored within a specified variable.
eval Evaluates an expression which is passed in a string. Useful to expand dynamic parameters passed as context variables or fields.
$geometry Returns the geometry of the current feature. Can be used for processing with other functions.
$area Returns the area of the current feature. The area calculated by this function respects both the current project's ellipsoid setting and area unit settings. For example, if an ellipsoid has been set for the project then the calculated area will be ellipsoidal, and if no ellipsoid is set then the calculated area will be planimetric.
$length Calculate the planar length of geometric line objects.
$perimeter Returns the perimeter length of the current feature. The perimeter calculated by this function respects both the current project's ellipsoid setting and distance unit settings. For example, if an ellipsoid has been set for the project then the calculated perimeter will be ellipsoidal, and if no ellipsoid is set then the calculated perimeter will be planimetric.
$x Returns the x-axis coordinate of a point feature. If the feature is a multi-point feature, the x-axis coordinate of the first point will be returned.
$y Returns the y-axis coordinate of a point feature. If the feature is a multi-point feature, the y-axis coordinate of the first point will be returned.
$z Returns the z-axis coordinate of a point feature. If the feature is a multi-point feature, the z-axis coordinate of the first point will be returned.
$m Return the elevation value of the current point feature.
$x_at Retrieves a x coordinate of the current feature's geometry.
$y_at Retrieves a y coordinate of the current feature's geometry.
azimuth_angle An attribute that stores the start-end bearing of each line feature segment will be added. Values range from 0 to 360, where 0 is north, 90 is east, 180 is south, 270 is west, and so on.
number_of_curves Obtain the attribute of the number of curves in each element
z_ac Retrieves a z coordinate of the geometry, or NULL if the geometry has no z value.
x_ac Retrieves a x coordinate of the geometry.
y_ac Retrieves a y coordinate of the geometry.
m_ac Retrieves a m coordinate of the geometry, or NULL if the geometry has no m value.
move_geometry Moving geometry.
area Returns the area of a geometry polygon object. Calculations are always planimetric in the Spatial Reference System (SRS) of this geometry, and the units of the returned area will match the units for the SRS. This differs from the calculations performed by the $area function, which will perform ellipsoidal calculations based on the project's ellipsoid and area unit settings.
perimeter Returns the perimeter of a geometry polygon object. Calculations are always planimetric in the Spatial Reference System (SRS) of this geometry, and the units of the returned perimeter will match the units for the SRS. This differs from the calculations performed by the $perimeter function, which will perform ellipsoidal calculations based on the project's ellipsoid and distance unit settings.
is_valid Returns true if a geometry is valid; if it is well-formed in 2D according to the OGC rules.
x Returns the x coordinate of a point geometry, or the x-coordinate of the centroid for a non-point geometry.
y Returns the y coordinate of a point geometry, or the y-coordinate of the centroid for a non-point geometry.
z Returns the z coordinate of a point geometry.
m Returns the m value of a point geometry.
point_n Returns a specific node from a geometry.
start_point Returns the first node from a geometry.
end_point Returns the last node from a geometry.
segments_to_lines Returns a multi line geometry consisting of a line for every segment in the input geometry.
make_point Creates a point geometry from an x and y (and optional z and m) value.
make_line Creates a line geometry from a series of point geometries.
make_polygon Creates a polygon geometry from an outer ring and optional series of inner ring geometries.
make_triangle Creates a triangle polygon.
make_circle Creates a circular polygon.
make_ellipse Creates an elliptical polygon.
make_regular_polygon Creates a regular polygon.
make_square Creates a square from a diagonal.
make_rectangle_3points Creates a rectangle from 3 points.
x_min Returns the minimum x coordinate of a geometry. Calculations are in the spatial reference system of this geometry.
x_max Returns the maximum x coordinate of a geometry. Calculations are in the spatial reference system of this geometry.
y_min Returns the minimum y coordinate of a geometry. Calculations are in the spatial reference system of this geometry.
y_max Returns the maximum y coordinate of a geometry. Calculations are in the spatial reference system of this geometry.
geom_from_wkt Returns a geometry created from a Well-Known Text (WKT) representation.
geom_from_wkb Returns a geometry created from a Well-Known Binary (WKB) representation.
flip_coordinates Returns a copy of the geometry with the x and y coordinates swapped. Useful for repairing geometries which have had their latitude and longitude values reversed.
intersects_bbox 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.
disjoint Tests whether geometries do not spatially intersect. Returns true if the geometries do not share any space together.
intersects Tests whether a geometry intersects another. Returns true if the geometries spatially intersect (share any portion of space) and false if they do not.
touches Tests whether a geometry touches another. Returns true if the geometries have at least one point in common, but their interiors do not intersect.
crosses Tests whether a geometry crosses another. Returns true if the supplied geometries have some, but not all, interior points in common.
contains Tests whether a geometry contains another. Returns true if and only if no points of geometry b lie in the exterior of geometry a, and at least one point of the interior of b lies in the interior of a.
overlaps 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.
within Tests whether a geometry is within another. Returns true if the geometry a is completely within geometry b.
buffer 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.
single_sided_buffer Returns a geometry formed by buffering out just one side of a linestring geometry. Distances are in the Spatial Reference System of this geometry.
extend Extends the start and end of a linestring geometry by a specified amount. Lines are extended using the bearing of the first and last segment in the line. Distances are in the Spatial Reference System of this geometry.
centroid Returns the geometric center of a geometry.
point_on_surface Returns a point guaranteed to lie on the surface of a geometry.
reverse Reverses the direction of a line string by reversing the order of its vertices.
exterior_ring 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.
interior_ring_n Returns a specific interior ring from a polygon geometry, or null if the geometry is not a polygon.
geometry_n Returns a specific geometry from a geometry collection, or null if the input geometry is not a collection.
boundary 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.
bounds Returns a geometry which represents the bounding box of an input geometry. Calculations are in the Spatial Reference System of this geometry.
simplify Simplifies a geometry by removing nodes using a distance based threshold (ie, the Douglas Peucker algorithm). The algorithm preserves large deviations in geometries and reduces the number of vertices in nearly straight segments.
smooth Smooths a geometry by adding extra nodes which round off corners in the geometry. If input geometries contain Z or M values, these will also be smoothed and the output geometry will retain the same dimensionality as the input geometry.
project Returns a point projected from a start point using a distance, a bearing (azimuth) and an elevation in radians.
num_points Returns the number of vertices in a geometry.
num_interior_rings Returns the number of interior rings in a polygon or geometry collection, or null if the input geometry is not a polygon or collection.
num_rings 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.
num_geometries Returns the number of geometries in a geometry collection, or null if the input geometry is not a collection.
bounds_width Returns the width of the bounding box of a geometry. Calculations are in the Spatial Reference System of this geometry.
bounds_height Returns the height of the bounding box of a geometry. Calculations are in the Spatial Reference System of this geometry.
is_closed 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.
close_line 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.
is_empty 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.
is_empty_or_null 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)'
convex_hull Returns the convex hull of a geometry. It represents the minimum convex geometry that encloses all geometries within the set.
oriented_bbox Returns a geometry which represents the minimal oriented bounding box of an input geometry.
minimal_circle Returns the minimal enclosing circle of a geometry. It represents the minimum circle that encloses all geometries within the set.
difference Returns a geometry that represents that part of geometry_a that does not intersect with geometry_b.
distance Returns the minimum distance (based on spatial ref) between two geometries in projected units.
intersection Returns a geometry that represents the shared portion of two geometries.
sym_difference Returns a geometry that represents the portions of two geometries that do not intersect.
combine Returns the combination of two geometries.
union Returns a geometry that represents the point set union of the geometries.
geom_to_wkt Returns the Well-Known Text (WKT) representation of the geometry without SRID metadata.
geom_to_wkb Returns the Well-Known Binary (WKB) representation of a geometry
geometry Returns a feature's geometry.
is_multipart Returns true if the geometry is of Multi type.
z_max Returns the maximum z coordinate of a geometry.
z_min Returns the minimum z coordinate of a geometry.
m_max Returns the maximum m (measure) value of a geometry.
m_min Returns the minimum m (measure) value of a geometry.
closest_point Returns the point on geometry1 that is closest to geometry2.
shortest_line Returns the shortest line joining geometry1 to geometry2. The resultant line will start at geometry1 and end at geometry2.
line_interpolate_point Returns the point interpolated by a specified distance along a linestring geometry.
angle_at_vertex Returns the bisector angle (average angle) to the geometry for a specified vertex on a linestring geometry. Angles are in degrees clockwise from north.
distance_to_vertex Returns the distance along the geometry to a specified vertex.
line_substring Returns the portion of a line (or curve) geometry which falls between the specified start and end distances (measured from the beginning of the line). Z and M values are linearly interpolated from existing values.
ellipseArea Returns the area of a geometry polygon object. Calculations are always planimetric in the Spatial Reference System (SRS) of this geometry, and the units of the returned area will match the units for the SRS. This differs from the calculations performed by the $area function, which will perform ellipsoidal calculations based on the project's ellipsoid and area unit settings.
geometrylength Calculate the planar length of geometric line objects.
straight_distance_2d Returns the direct/euclidean distance between the first and last vertex of a geometry. The geometry must be a curve (circularstring, linestring).
sinuosity Returns the sinuosity of a curve, which is the ratio of the curve length to the straight (2D) distance between its endpoints.
relate Tests the Dimensional Extended 9 Intersection Model (DE-9IM) representation of the relationship between two geometries.
pole_of_inaccessibility Calculates the approximate pole of inaccessibility for a surface, which is the most distant internal point from the boundary of the surface. This function uses the 'polylabel' algorithm (Vladimir Agafonkin, 2016), which is an iterative approach guaranteed to find the true pole of inaccessibility within a specified tolerance. More precise tolerances require more iterations and will take longer to calculate.
offset_curve Returns a geometry formed by offsetting a linestring geometry to the side. Distances are in the Spatial Reference System of this geometry.
hausdorff_distance Returns the Hausdorff distance between two geometries. This is basically a measure of how similar or dissimilar 2 geometries are, with a lower distance indicating more similar geometries.
The function can be executed with an optional densify fraction argument. If not specified, an approximation to the standard Hausdorff distance is used. This approximation is exact or close enough for a large subset of useful cases. Examples of these are:

  • computing distance between Linestrings that are roughly parallel to each other, and roughly equal in length. This occurs in matching linear networks.
  • Testing similarity of geometries.


  • If the default approximate provided by this method is insufficient, specify the optional densify fraction argument. Specifying this argument performs a segment densification before computing the discrete Hausdorff distance. The parameter sets the fraction by which to densify each segment. Each segment will be split into a number of equal-length subsegments, whose fraction of the total length is closest to the given fraction. Decreasing the densify fraction parameter will make the distance returned approach the true Hausdorff distance for the geometries.
    line_merge 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.
    make_valid Returns a valid geometry or an empty geometry if the geometry could not be made valid.
    make_point_m Creates a point geometry from an x, y coordinate and m value.
    roundness 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.
    geometry_type Returns a string value describing the type of a geometry (Point, Line or Polygon)
    shared_paths Returns a collection containing paths shared by the two input geometries. Those going in the same direction are in the first element of the collection, those going in the opposite direction are in the second element. The paths themselves are given in the direction of the first geometry.
    line_locate_point Returns the distance along a linestring corresponding to the closest position the linestring comes to a specified point geometry.
    inclination Returns the inclination measured from the zenith (0) to the nadir (180) on point_a to point_b.
    azimuth Returns the north-based azimuth as the angle in radians measured clockwise from the vertical on point_a to point_b.
    densify_by_count Takes a polygon or line layer geometry and generates a new one in which the geometries have a larger number of vertices than the original one.
    densify_by_distance Takes a polygon or line layer geometry and generates a new one in which the geometries are densified by adding additional vertices on edges that have a maximum distance of the specified interval distance.
    affine_transform Returns the geometry after an affine transformation. Calculations are in the Spatial Reference System of this geometry. The operations are performed in a scale, rotation, translation order. If there is a Z or M offset but the coordinate is not present in the geometry, it will be added.
    wedge_buffer Returns a wedge shaped buffer originating from a point geometry.
    wave_randomized Constructs randomized curved (sine-like) waves along the boundary of a geometry.
    wave Constructs rounded (sine-like) waves along the boundary of a geometry.
    triangular_wave_randomized Constructs randomized triangular waves along the boundary of a geometry.
    triangular_wave Constructs triangular waves along the boundary of a geometry.
    translate Returns a translated version of a geometry. Calculations are in the Spatial Reference System of this geometry.
    transform Returns the geometry transformed from a source CRS to a destination CRS.
    tapered_buffer Creates a buffer along a line geometry where the buffer diameter varies evenly over the length of the line.
    square_wave_randomized Constructs randomized square/rectangular waves along the boundary of a geometry.
    square_wave Constructs square/rectangular waves along the boundary of a geometry.
    simplify_vw Simplifies a geometry by removing nodes using an area based threshold (ie, the Visvalingam-Whyatt algorithm). The algorithm removes vertices which create small areas in geometries, e.g., narrow spikes or nearly straight segments.
    collect_geometries Collects a set of geometries into a multi-part geometry object.
    scale Returns a scaled version of a geometry. Calculations are in the Spatial Reference System of this geometry.
    rotate Returns a rotated version of a geometry. Calculations are in the Spatial Reference System of this geometry.
    order_parts Orders the parts of a MultiGeometry by a given criteria
    main_angle Returns the angle of the long axis (clockwise, in degrees from North) of the oriented minimal bounding rectangle, which completely covers the geometry.
    extrude Returns an extruded version of the input (Multi-)Curve or (Multi-)Linestring geometry with an extension specified by x and y.
    concave_hull Returns a possibly concave polygon that contains all the points in the geometry.
    buffer_by_m Creates a buffer along a line geometry where the buffer diameter varies according to the m-values at the line vertices.
    apply_dash_pattern Applies a dash pattern to a geometry, returning a MultiLineString geometry which is the input geometry stroked along each line/ring with the specified pattern.
    line_interpolate_angle Returns the angle parallel to the geometry at a specified distance along a linestring geometry. Angles are in degrees clockwise from north.
    nodes_to_points Returns a multipoint geometry consisting of every node in the input geometry.
    force_rhr Forces a geometry to respect the Right-Hand-Rule, in which the area that is bounded by a polygon is to the right of the boundary. In particular, the exterior ring is oriented in a clockwise direction and the interior rings in a counter-clockwise direction.
    force_polygon_cw Forces a geometry to respect the convention where exterior rings are clockwise, interior rings are counter-clockwise.
    force_polygon_ccw Forces a geometry to respect the convention where exterior rings are counter-clockwise, interior rings are clockwise.
    short_edge_length Obtain the length of the shortest geometric edge.
    long_edge_length Obtain the length of the longest geometric edge.
    $length3d Calculate the three-dimensional length of line or polygon geometry.
    $length_z Calculate the length in the Z direction of line or polygon geometry.
    geometrylength_3d Calculate the three-dimensional length of line or polygon geometry.
    geometrylength_z Calculate the length in the Z direction of line or polygon geometry.
    json_to_map Creates a map from a json-formatted string.
    from_json Loads a JSON formatted string.
    map_to_json Merge map elements into a json-formatted string.
    to_json Create a JSON formatted string from a map, array or other value.
    hstore_to_map Creates a map from a hstore-formatted string.
    map_to_hstore Merge map elements into a hstore-formatted string.
    map Returns a map containing all the keys and values passed as pair of parameters.
    map_get Returns the value of a map, given it's key.
    map_exist Returns true if the given key exists in the map.
    map_delete Returns a map with the given key and its corresponding value deleted.
    map_insert Returns a map with an added key/value.
    map_concat Returns a map containing all the entries of the given maps. If two maps contain the same key, the value of the second map is taken.
    map_akeys Returns all the keys of a map as an array.
    map_avals Returns all the values of a map as an array.
    map_prefix_keys Returns a map with all keys prefixed by a given string.
    sqrt Returns square root of a value.
    radians Converts from degrees to radians.
    degrees Converts from radians to degrees.
    abs Returns the absolute value of a number.
    cos Returns cosine of an angle.
    sin Returns the sine of an angle.
    tan Returns the tangent of an angle.
    asin Returns the inverse sine of a value in radians.
    acos Returns the inverse cosine of a value in radians.
    atan Returns the inverse tangent of a value in radians.
    atan2 Returns the inverse tangent of dy/dx by using the signs of the two arguments to determine the quadrant of the result.
    exp Returns exponential of an value.
    ln Returns the natural logarithm of a value.
    log10 Returns the value of the base 10 logarithm of the passed expression.
    log Returns the value of the logarithm of the passed value and base.
    round Rounds a number to number of decimal places.
    rand 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.
    randf 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.
    max Returns the largest value in a set of values.
    min Returns the smallest value in a set of values.
    clamp Restricts an input value to a specified range.
    scale_linear Transforms a given value from an input domain to an output range using linear interpolation.
    scale_exp 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 of the specified output range.
    scale_polynomial Transforms a given value from an input domain to an output range using a polynomial curve. This function can be used to ease values in or out of the specified output range.
    floor Rounds a number downwards.
    ceil Rounds a number upwards.
    pi Returns value of pi for calculations.
    $id Returns the feature id of the current row.
    $currentfeature Returns the current feature being evaluated. This can be used with the 'attribute' function to evaluate attribute values from the current feature.
    uuid Generate a universally unique identifier (UUID) for each row.
    feature_id Returns a feature's unique ID, or NULL if the feature is not valid.
    autoFill Automatically accumulate the given field based on the input starting value and step size.
    accumulation Calculate the cumulative value of data.
    attribute Returns an attribute from a feature.
    lower Converts a string to lower case letters.
    textInsert Insert specified characters between strings.
    textCenter Center string text with padding on both sides.
    upper Converts a string to upper case letters.
    title Converts all words of a string to title case (all words lower case with leading capital letter).
    trim Removes all leading and trailing whitespace (spaces, tabs, etc) from a string.
    char Returns the character associated with a unicode code.
    ascii Returns the unicode code associated with the first character of a string.
    wordwrap Returns a string wrapped to a maximum/minimum number of characters.
    length Returns the number of characters in a string or the length of a geometry linestring.
    replace Returns a string with the supplied string, array, or map of strings replaced.
    regexp_replace Returns a string with the supplied regular expression replaced.
    regexp_substr Returns the portion of a string which matches a supplied regular expression.
    substr Returns a part of a string.
    concat Concatenates several strings to one. NULL values are converted to empty strings. Other values (like numbers) are converted to strings.
    strpos Return the first matching position of a substring within another string, or 0 if the substring is not found.
    left Returns a substring that contains the n leftmost characters of the string.
    right Returns a substring that contains the n rightmost characters of the string.
    rpad Returns a string padded on the right to the specified width, using a fill character. If the target width is smaller than the string's length, the string is truncated.
    lpad Returns a string padded on the left to the specified width, using a fill character. If the target width is smaller than the string's length, the string is truncated.
    format Format a string using supplied arguments.
    format_number Returns a number formatted with the locale separator for thousands. Also truncates the decimal places to the number of supplied places.
    regexp_match Return the first matching position matching a regular expression within a string, or 0 if the substring is not found.
    format_date Formats a date type or string into a custom string format. Uses Qt date/time format strings.
    ltrim Removes the longest string containing only the specified characters (a space by default) from the start of string.
    rtrim Removes the longest string containing only the specified characters (a space by default) from the end of string.

    results matching ""

      No results matching ""