Built-in Functions
The following Built-in functions can be used within 1Integrate.
Function | Description | Parameter(s) |
---|---|---|
angle |
Angles are calculated between two line segments, which do not need to converge or touch. Returns an acute angle in either degrees or radians. A negative value is returned for errors. |
|
area | Returns the area of a geometry in dataset units. |
|
boundary |
Returns the boundary of a line or area.
This function supports 3D and 2D geometries. For point geometries, a Null value is returned. |
|
buffer |
Returns an area geometry representing a buffer zone of a fixed distance from the boundary of a geometry. The square end proportion determines how far from the end of the line to create the square end. |
|
convex_hull | Returns the smallest convex area geometry that contains the input geometry. |
|
count_inner_rings |
Counts the clockwise digitised rings of a simple or complex geometry.
|
|
count_parts |
Returns the number of parts in a geometry.
|
|
count_vertices |
Returns the total number of vertices in a simple or complex geometry. The number of points in a ring does not include a duplicate point that closes the ring.
|
|
difference |
Returns the difference between two geometries; all the parts of the first geometry that are not in the second geometry. |
|
difference_between_bearings | Returns an angle in degrees between 0 and 90, representing the difference between two bearings. |
|
difference_by_dimension | A geometry equal to geometry1 AND NOT geometry2. |
|
dimension | Returns the dimension of the input geometry (0 to 2) or -1 if input is null. |
|
distance |
Returns the distance in dataset units at the closest point of approach of two geometries. |
|
douglas_peucker |
Returns a simplified version of a geometry formed by applying the Douglas-Peucker smoothing algorithm to each piece of line-work in the geometry. The result will be a geometry which approximates the original geometry using fewer vertices. The line-work of the resulting geometry will lie entirely within the specified tolerance of the original geometry's line-work. |
|
drag_vertex |
Returns a geometry formed by moving a specified vertex on a simple line geometry to a new location. It uses a scale and rotate algorithm to try to preserve the shape of the geometry on either side of the vertex being moved. |
|
end_of | Returns a point geometry at the location of the end of a simple line geometry. |
|
ends_of |
Returns the endpoints of a simple line geometry. If the line is closed, the result will be a simple point geometry. Otherwise the result will be a complex geometry containing two points. |
|
find_small_rings | Returns a descriptor for the complex line geometry containing small rings. |
|
find_spikes | Returns a descriptor for the point complex geometry containing spike points. |
|
get_point |
Returns a point guaranteed to lie on the specified geometry. Note that the point is not necessarily near to the centre of the geometry, but is guaranteed to lie inside it. |
|
get_x |
Returns the x co-ordinate of a point on a simple or complex geometry. For a point geometry the return will be the x co-ordinate of that geometry. For other types of geometry the return will be the x co-ordinate of an arbitrary point on the input geometry. |
|
get_y |
Returns the y co-ordinate of a point on a simple or complex geometry. For a point geometry the return will be the y co-ordinate of that geometry. For other types of geometry the return will be the y co-ordinate of an arbitrary point on the input geometry. |
|
has_duplicates |
Tests to see if a geometry has any consecutive coincident vertices. Returns a Boolean value, true if the geometry has any consecutive coincident vertices and false if it does not. |
|
has_kickbacks |
Checks whether a geometry has any kickbacks (a type of geometric error where a line segment changes direction twice by approximately 180 degrees to repeat part of the line). Kickbacks are also known as snap-backs. |
|
has_small_rings |
Checks whether a geometry has any small rings (pig tails). Returns true if the geometry has small rings and false if it does not. |
|
has_spikes |
Checks whether a geometry has any spikes. Returns true if the geometry has spikes and false if it does not. |
|
height |
Returns the height of the nearest vertex for a 3-D geometry. |
|
intersection | Returns the intersection of two or more geometries - the parts in common between all of them. |
|
intersection_by_dimension | Returns a geometry equal to the intersection of all the input geometries, or null if the intersection is empty. |
|
is_aligned |
Tests whether two line geometries are aligned. Returns true if the geometries are aligned and false otherwise. |
|
is_boundary_left |
Tests whether a point, line or area geometry is to the left of a line geometry with respect to the direction of the line geometry. Returns true if the boundary left relationship holds and false otherwise. |
|
is_boundary_right |
Tests whether a point, line or area geometry is to the right of a line geometry with respect to the direction of the line geometry. Returns true if the boundary right relationship holds and false otherwise. |
|
is_closed | Tests whether a geometry is closed. Returns true if the geometry is a simple area or if it is a simple line with coincident end points. |
|
is_downhill |
Tests whether a 3D line geometry is digitised in a downhill direction. Returns a Boolean value, true if the geometry is a 3D line that slopes downwards and false otherwise. Returns null if parameter 1 is not a 3D simple line geometry. An optional tolerance may be supplied to use when comparing the heights of vertices on the line. The line is considered to be downhill if each vertex is lower than all the preceding vertices, to within the specified tolerance. |
|
is_level |
Tests whether a 3D line geometry has a constant height along its length. Returns a Boolean value, true if the geometry is a 3D line is level and false otherwise. Returns null if parameter 1 is not a 3D simple line geometry. An optional tolerance may be supplied for use when comparing the heights of vertices on the line. The line is considered to be level if the maximum height minus the minimum height along the line is less than or equal to the specified tolerance. |
|
is_noded |
Tests if two line geometries intersect at common vertices. Returns true if the geometries are noded and false otherwise. |
|
is_simple |
Tests to see if a geometry is simple according to the OGC definition. Returns a Boolean value, true if the geometry is simple according to the OGC definition and false if it is not. |
|
is_uphill |
Returns true if a 3-D line slopes upwards, with an optional tolerance for comparing the heights of vertices on the line. The line is considered to be uphill if each vertex is higher than all the preceding vertices, to within tolerance. |
|
is_valid |
Tests to see if a geometry is valid according to the OGC definition. Returns a Boolean value, true if the geometry is valid according to the OGC definition and false if it is not. |
|
line |
Returns a line geometry constructed from points supplied in parameters. Any 3D geometries will be converted to 2D. |
|
line_bearing_at_point | Returns the angle of the line at a point between -pi and pi, measured in radians anti-clockwise from east (positive x axis). |
|
line_length |
Returns the length of a geometry in dataset units. The length of a point or an area is 0. The length of a complex geometry is the sum of the lengths of its component simple line geometries. |
|
line_segment |
Returns a segment cut out of a simple line geometry, or null if the distance parameters are out of range. The start and end points of the segment are specified by distances along the line, measured from its start. A negative value indicates a distance from the line end instead of the start. With a 3D line geometry, distances are in plan; if the start or end of the segment is between two vertices with height values, the segment endvertex is given an interpolated height. |
|
make_2d |
Returns a 2D geometry. If the argument is not valid, then null is returned. |
|
make_3d |
Returns a 3D geometry. If the argument is not valid, then null is returned. |
|
max_deflection_angle | Returns the maximum deflection angle (in degrees) between adjacent line segments in a geometry. |
|
max_height | Returns the maximum height of a 3-D geometry. |
|
mbr |
Returns the minimum bounding rectangle (MBR) of one or more geometries. The result is the smallest rectangle, with sides parallel to the X and Y axes, that contains all the input geometries. |
|
min_height | Returns the minimum height of a 3-D geometry. |
|
min_intersection_angle |
Returns the minimum intersection angle between two geometries. Returns -1 if the two geometries do not intersect. |
|
move_vertex |
Returns a geometry formed by moving a vertex on a simple line geometry. This function will only move one vertex on the geometry and so may leave a spike. For smoother results, consider the drag_vertex function. |
|
nearest_point |
Returns a geometry representing the nearest point(s) on a provided geometry from an originating point geometry. This will be complex if multiple points are equally close to the originating point. If neither parameter is a geometry an exception is thrown. |
|
nearest_vertex | Returns a point geometry at the nearest vertex on a geometry, described by the nearest known X and Y positions. |
|
offset | Offsets (translates) a geometry by a fixed distance without changing its shape, size or orientation. |
|
outer_ring | Returns the outer ring of a simple area geometry. The result will be a closed simple line geometry. |
|
perimeter |
Returns the perimeter of an area geometry. If the geometry is a point or a line, the result will be 0. If the geometry is a complex geometry, the result will be the sum of the perimeters of each simple area geometry in the complex geometry. |
|
point_along_line |
Returns a point on a line geometry at a distance along it expressed as a proportion of the total length of the line. |
|
point_at_projection | Returns a new point, the specified bearing and distance from the origin point. |
|
point_on_line |
Finds a point on a line geometry, a given distance along it from its start or end point. Returns null if the distance parameter is out of range. With a 3D line, the height will be interpolated between vertices. |
|
polygon |
Forms an area geometry from a simple closed line geometry, a complex line geometry containing one or more rings, a simple area, or a complex area geometry. Returns null if the rings do not form a valid area geometry. |
|
proportion_along_line |
Finds the nearest position on a line to a given point, and calculates its distance along the line, expressed as a proportion of the total length of the line (a real number in the range between 0 and 1). |
|
remove_duplicates |
Removes any duplicate vertices from a geometry. Any occurrence of consecutive, coincident vertices is replaced with a single vertex at the same location. |
|
remove_kickbacks | Removes any kickbacks from a geometry. |
|
remove_small_rings |
Removes any small rings from a geometry. Returns null if all of the rings are too small. |
|
remove_spikes | Removes any spikes from a geometry. |
|
round_geom | Returns a rounded geometry. |
|
reverse_line |
Reverses the order of the vertices in a simple line geometry. Returns a copy of the line geometry, with the same vertices but running in the opposite direction. Returns null if parameter is not a simple line geometry. |
|
rule_hotspot_geometry |
A collection geometry containing the hotspots from this feature for the triggering Rule, or null. If an optional default is provided, will return the default instead of null. |
|
scale_and_rotate | Returns a 2-D copy of the input geometry scaled and rotated. |
|
segment |
Returns a segment from a line as two consecutive vertices. Note: 3-D geometries are projected to 2-D. |
|
segments |
Obtains the segments from a geometry, returning as a Complex Line. If no segments are present, this geometry will be clear. |
|
start_of | Returns a point geometry at the location of the start of a simple line geometry. |
|
symmetric_difference | Returns a geometry equal to geometry1 XOR geometry2. |
|
symmetric_difference_by_dimension | Returns a geometry equal to geometry1 XOR geometry2. |
|
true_distance | Returns the distance along the surface of the earth between the 2 points. |
|
union | Returns the union of two or more geometries. |
|
union_by_dimension | Returns a geometry equal to the union of all the input geometries. |
|
vertices |
Obtains the vertices of a geometry, returned as a Complex Point. If no vertices are present, this geometry will be clear. |
|
Function | Description | Parameter(s) |
---|---|---|
to_degrees | Converts an angle specified in radians to degrees. |
|
to_integer |
Converts a numerical, boolean or string value to an integer. Any decimal digits present in the number after the decimal point are removed. The boolean values true and false are converted into 1 and 0 respectively. |
|
to_radians | Converts an angle specified in degrees to radians. |
|
to_real | Converts a numerical, boolean or string value to a real (floating point) number. |
|
to_string | Converts any value to a string. |
|
Function | Description | Parameter(s) |
---|---|---|
abs |
Returns the absolute value of the input parameter. If the parameter is negative, it is returned with its sign reversed so that it becomes positive. Otherwise it is returned unchanged. |
|
acos | Returns the inverse cosine in radians (0.0 to pi). |
|
asin | Returns the inverse sine in radians. The result will be an angle in the range between -pi/2 and pi/2. |
|
atan | Returns the inverse tangent in radians. The result will be an angle in the range between –pi/2 and pi/2. |
|
atan2 |
Converts Cartesian x and y co-ordinates to polar co-ordinates and returns the polar angle, measured counter-clockwise from the positive x-axis. The result will be an angle in radians in the range between -pi and pi. |
|
ceil | Rounds a numerical value up to the nearest integer value greater than or equal to the input value. |
|
cos | Returns the cosine of an angle in radians (in the range [-1,1]). |
|
exp | Returns the inverse natural logarithm of a number (i.e Euler's number raised to the power of the input parameter, ex). |
|
floor | Rounds a numerical value down to the nearest integer value less than or equal to the input value. |
|
is_infinite |
Tests if a number is infinite in magnitude. Returns true if the number is positive or negative infinity, and false otherwise. |
|
is_NaN |
The special numerical value "not a number" results from certain mathematical operations such as dividing 0.0 by 0.0, which cannot be computed. Returns true if the number has the special value "not a number" and false if it is a valid (finite or infinite) number. |
|
log | Returns the natural logarithm (base e) of a number. |
|
log10 | Returns the logarithm to base 10 of a number. |
|
max | Returns the largest of 2 or more values. |
|
min | Returns the smallest of 2 or more values. |
|
pow | Returns the value of one number raised to the power of another number (ab). |
|
round | Returns a number rounded to the nearest integer value. |
|
sin | Returns the sine of an angle in radians (in the range [-1,1]). |
|
sqrt | Returns the (positive) square root of a number. |
|
tan | Returns the tangent of an angle (specified in radians). |
|
Function | Description | Parameter(s) |
---|---|---|
bit_and |
Returns the bitwise AND of two integers. Each bit in the binary expansion of the result will only be set if both of the corresponding bits in the two input numbers are also set. |
|
bit_not |
Returns the bitwise complement of an integer. Each bit in the binary expansion of the result will be the opposite of the corresponding bit in the input number. |
|
bit_or |
Returns the bitwise OR of two integers. Each bit in the binary expansion of the result will be set if either of the corresponding bits in the two input numbers is set. |
|
bit_shift | Returns an integer value computed by shifting the binary bits of the input value. Note: Positive values shift it to the left and negative values shift it to the right. |
|
bit_xor |
Returns the bitwise XOR of two integers. Each bit in the binary expansion of the result will be set if the corresponding bits in the two input numbers are different from one another. |
|
Function | Description | Parameter(s) |
---|---|---|
index_of |
Searches in a string for occurrences of another string and returns the index of the first match found (where the first character is at index 0). Returns -1 if the string could not be found. |
|
jaro_winkler_similarity | Returns a double value representing the Jaro-Winkler similarity score between two words. |
|
length | Returns the length of a string (number of characters). |
|
levenshtein_distance | Returns an integer for the difference, 0 if identical. |
|
re_search |
Performs a regular expression search for a Java-style regular expression inside a string. If a match is found, the matching string (a substring of the first string) is returned. Otherwise null is returned. |
|
re_subs_all | Replaces all occurrences of patterns matching a Java-style regular expression in a string with the specified replacement string. |
|
re_subs_first | Replaces the first occurrence of a pattern matching a Java-style regular expression in a string with the specified replacement string. |
|
soundex | Returns the soundex code for the word, or null if the word cannot be mapped to a soundex. |
|
substring | Returns substring of the input string between the specified character indexes (where the first character is at index 0). |
|
to_uppercase | Converts a string to upper case (capital letters). |
|
to_lowercase | Converts a string to lower case. |
|
trim | Returns a trimmed String, or null if a null object was passed in . |
|
Function | Description | Parameter(s) |
---|---|---|
count | Returns the number of elements in a collection. |
|
Function | Description | Parameter(s) |
---|---|---|
read_sequence | Returns the next value in the sequence (as an integer). |
|
Function | Description | Parameter(s) |
---|---|---|
shift_geometry |
A shifted version of the geometry (see Positional Data Shifting). This will be a geometry of the same type as the input geometry with the same number of vertices. Note: Ensure that the name used for the register_shift_vector built-in operation is used here. |
|
Note: The tsort_* functions are used to implement iterating through objects in dependency order. Please contact 1Spatial Support for further guidance on their use.
Function | Parameter(s) |
---|---|
tsort_blocked_objects |
|
tsort_blocked_predecessors |
|
tsort_blocked_successors |
|
tsort_ordered_objects |
|
Function | Description | Parameter(s) |
---|---|---|
add_date |
Adds a date and time in the TIMESTAMP date format yyyy-MM-dd HH:mm:ss.SSS. Note: Some data stores may not hold the same precision levels for time data as the TIMESTAMP. For example, if the TIMESTAMP value is exported to a data store with less accurate time, the TIMESTAMP value in will reflect that in the target data store. |
|
current_datetime | Returns the current date and time as a string. |
|
get_current_date |
Returns the current date and time in the TIMESTAMP date format yyyy-MM-dd HH:mm:ss.SSS. |
None |
Function | Description | Parameter(s) |
---|---|---|
is_structured |
Tests if an object is topologically structured. Returns true if the object is structured and false otherwise. |
|