Builtin Functions
A builtin function is a Predicate Value that returns a value calculated from one or more Values.
The following builtin functions can be used within 1Integrate.
Note: You can add your own builtin functions by writing Java classes. For more information see the Builtin Function Programmer Guide.
Note: An additional license is required for 3D support. For more information on 3D in 1Integrate, please see Full 3D Support.
Bit Manipulation
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. 

Classes & Attributes
Function 
Description 
Parameter(s) 

class_get_attributes 
Return a collection of strings containing the attributes on a class. This function returns the attributes from the class based on the Data Store Read and Commit mapping target names. 

class_get_attribute_type 
Return the type of an attribute given an object or a class name and the attribute name. This function should be used in conjunction with functions:


class_get_attribute_value 
Return the value of an attribute of an object 

class_has_attribute 
Checks if the specified class contains the specified user attribute. A third parameter containing the Data Store name can be provided to pinpoint the class. The Data Store name provided must be the full path of the Data Store without the type prefix, for example "Parent Folder/Data Store 1".
Returns true if the specified class contains the specified attribute, otherwise returns false. 

class_is_attribute_null 
Return TRUE if an attribute is NULL, otherwise return FALSE. This function should be used in conjunction with functions:


compare_attributes 
Compare the attributes of the source object with the target object and returns a list of mismatches, or null if the objects are identical. The returned list can be iterated over and the following builtins used to obtain the attribute name, and the value it has in the source and target objects:


compare_attributes_get_value_name 
Returns the attribute name that failed the comparison. Note: This should be used on the elements obtained by running an "Loop over a Collection or Geometry" over the output of compare_attributes. 

compare_attributes_get_value_source 
Returns the attribute value in the source object that failed the comparison. Note: This should be used on elements obtained by running a "Loop over a Collection or Geometry" over the output of compare_attributes. 

compare_attributes_get_target 
Returns the attribute value in the target object that failed the comparison. Note: This should be used on the elements obtained by running a "Loop over a Collection or Geometry" over the output of compare_attributes. 

get_session_class_names 
Returns the names of all classes in the session. An optional parameter can be provided to specify the Data Store that contains the classes to retrieve. 

session_has_class 
Checks whether or not the class has been opened in an Open Data task in the session. A second parameter containing the Data Store name can be provided to pinpoint the class. The Data Store name provided must be the full path of the Data Store without the type prefix, for example "Parent Folder/Data Store 1". Returns true if the specified class is in the session, otherwise returns false. 

Collection
Function 
Description 
Parameter(s) 

count 
Returns the number of elements in a collection. 

Conversion
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. 

Geometric
Function 
Description 
Parameter(s) 

angle 
Returns the angle between line segments. If the line segments intersect, the acute angle between the lines is returned. If the lines join at end points, the smaller of the two angles is returned. If there is an error, a negative value is returned. The result will be an angle in the range [0,pi], or [0,180] if the third parameter is 'true'. 

area 
Returns the area of a geometry in dataset units. If the geometry is a point or a line the result will be 0. If the geometry is a solid, the surface area will be returned. If the geometry is a complex geometry, the result will be the sum of the areas of each simple area in the complex geometry. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

boundary 
Returns the boundary of a geometry


buffer 
Returns a geometry formed by taking a buffer zone around the input geometry at a fixed distance. 

centroid 
Returns a point geometry at the 2D centroid of the supplied geometry. This builtin does not support 3D geometries, use the change_dimension builtin to convert to 2D before passing them in. Does not support multipart geometries made up of different types. Note: The centroid is not guaranteed to be in/on the geometry, unlike the get_point builtin. 

change_dimension 
Allows geometry to be changed from one dimensionality to another. Takes any geometry as input, and changes it to the dimensionality specified (one of 2, 2.5 or 3). The value of Z coordinates in the resulting geometry can be set using an optional argument. This can either be a real, which will be used to set vertices to a constant height, or a secondary geometry defining a plane, which will be used to align the new geometry. When changing to 2D, or from 3D to 3D, this argument is ignored. If this argument is not supplied, the following cases exist:
Measures can be added to the geometry if required  these will be set to NULL unless specified using an optional argument. Trying to add measures when changing to heighted 2D will result in an error. If the input geometry already has measures:


convex_hull 
Returns the smallest convex area geometry that contains the input geometry. The return value will be a simple area geometry with no inner rings. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

convex_hull_of_classes 
Returns an approximate convex hull polygon based on the MBRs of the primary geometries for the classes named, or all the classes if none are named. 

count_areas 
Returns the number of areas in a geometry including those that are part of a surface or solid. With a complex geometry, it returns the sum of the area counts over all components. 

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_surfaces 
Returns the total number of surfaces in a geometry. With a complex geometry, returns the sum of the surface counts over each of its components. 

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.


create_geometry_from_wkt 
Creates a geometry from a geometric wellknown text string (WKT). Supported types are:
Empty geometries are supported. Input which specifies its dimension as Z or M is supported and will return a heighted or measured geometry. Input which specifies its dimension as ZM is only supported when the 2nd boolean argument is set to true and will return a 3D geometry. 

difference 
Returns the difference between two geometries; all the parts of the first geometry that are not in the second geometry. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

difference_between_bearings 
Given two bearings (the angle of lines, calculated in degrees, usually using line_get_angle_at_point) then return the difference between them in degrees, ignoring the direction. This is used to work out how parallel two lines are. The result will be an angle in degrees between 0 and 90 where 0 is parallel and 90 is perpendicular. 

difference_by_dimension 
Returns the difference between two geometries, which match the passed in dimensionality. The result will be a geometry consisting of all the parts of the first geometry which are not in the second geometry. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

dimension 
Returns the dimension of the input geometry. The dimension of a point is 0, the dimension of a line is 1, the dimension of an area or surface is 2 and the dimension of a solid is 3. The dimension of a multipart geometry is the largest dimension of any of its parts. 

distance 
Returns the distance between two geometries. This is the smallest distance between any point on the first geometry and any other point on the second geometry. If the two geometries intersect, the distance will be 0. If both the input geometries are 3D, then the result will be calculated in 3D space, otherwise the result will only be calculated in 2D plan view. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

douglas_peucker 
Returns a simplified version of a geometry formed by applying the DouglasPeucker smoothing algorithm to each piece of linework in the geometry. The result will be a geometry which approximates the original geometry using fewer vertices. The linework of the resulting geometry will lie entirely within the specified tolerance of the original geometry's linework. 

drag_vertex 
Returns a geometry formed by moving a specified vertex on a simple line geometry to a new location. The vertex to be moved will be the one closest to the point specified by the second parameter. The third parameter specifies the point to which the vertex will be moved. It uses a scale and rotate algorithm to try to preserve the shape of the geometry on either side of the vertex being moved. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

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. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

extrude 
Extrude a geometry to a given height along the Zaxis. The input geometry will be duplicated at the specified height, with each vertex connected to its counterpart in the original to form a higher dimension shape. Depending on the input, the output geometry will be as follows:
Additionally:


find_duplicates 
Returns a collection of point geometries, representing any duplicate points within a geometry. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

find_kickbacks 
Returns a collection of point geometries, representing the locations of any kickbacks within a geometry. Kickbacks are a type of geometric error where a line segment changes direction twice by approximately 180 degrees (like a z shape) to repeat part of the line. They are usually detected with larger angles than spikes which is why there is a separate builtin to find them. 

find_self_intersections 
Returns a multipoint geometry representing the points at which a line, or the rings of an area, selfintersect. If a section of the line overlaps another section of the line, the points at the start and end of the overlapping line section are returned. If the line has the same start and end point and does not intersect another section of the line at this point, this point is not returned. 

find_small_rings 
Returns a descriptor for the complex line geometry containing small rings. One or more of the following criteria may be used to determine if a ring is to be considered small:
Note: Any heighted 2D geometries will be projected down to 2 dimensions. 
Note: If any of these parameters is negative it is ignored. 
find_spikes 
Returns a descriptor for the point complex geometry containing spike points. A spike is defined to be three consecutive points (A, B, C) such that:


get_geometry_as_wkt 
Returns the given geometry as a WKT string. Note: This function does not currently support arbitrary precision. Only 5 and 15 decimal places are allowed. Requesting more than 15 decimal places will result in the ordinates being returned in rational form (a/b). 

get_job_extent 
Obtains the extent of the current session. Note: This does not calculate the minimum bounding rectangle (MBR) of the loaded data. This is calculated from the following (in order of priority):


get_point 
Returns a point guaranteed to lie on the specified geometry. The point is not necessarily near to the centre of the geometry, but is guaranteed to lie inside it. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

get_x 
Returns the x coordinate of a point on a simple or complex geometry. For a point geometry the return will be the x coordinate of that geometry. For other types of geometry the return will be the x coordinate of an arbitrary point on the input geometry. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

get_y 
Returns the y coordinate of a point on a simple or complex geometry. For a point geometry the return will be the y coordinate of that geometry. For other types of geometry the return will be the y coordinate of an arbitrary point on the input geometry. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

get_z 
Returns the zcoordinate of a representative point within a geometry. If the input geometry does not contain any height information, null will be returned. If the input geometry is heighted, the return will be the height value of the representative 2d point within its geometry, which may be null. 

has_duplicates 
Tests to see if a geometry has any consecutive coincident vertices. For a heighted 2D geometry, consecutive points must have duplicate heights as well as duplicate plan coordinates to be considered to have duplicate points. Returns a Boolean value, true if the geometry has any consecutive coincident vertices and false if it does not. 

has_kickbacks 
Test whether a geometry has kickbacks. A kickback is defined to be 4 consecutive points (A, B, C, D) such that:
Kickbacks are also known as snapbacks. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

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. One or more of the following criteria may be used to determine if a ring is to be considered small:
Note: Any heighted 2D geometries will be projected down to 2 dimensions. 
Note: If any of these parameters is negative it is ignored. 
has_spikes 
Checks whether a geometry has any spikes. Returns true if the geometry has spikes and false if it does not. A spike is defined to be three consecutive points (A, B, C) such that:
Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

height 
Returns the height of a heighted 2D geometry at a particular point. If the point does not coincide with a vertex on the heighted 2D geometry, then the nearest vertex is chosen. 

inner_rings 
Returns the inner rings of a simple area geometry, or the inner rings of all areas in a complex geometry. If there is only one inner ring, that ring is returned as a simple line. If there are several, they are returned as components of a complex line geometry. Returns null if applied to a null geometry, a nonarea geometry, an area geometry without inner rings or a complex geometry containing areas with no inner rings. The result has the same dimensionality (2D or 2.5D) as the input geometry. 

intersection 
Returns the intersection of two or more geometries  the parts in common between all of them. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

intersection_by_dimension 
Returns the intersection of two or more geometries, which match the passed in dimensionality. All points in the returned geometry will also lie in all of the input geometries. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

is_aligned 
Align function takes two simple lines and returns true if they are aligned. Exact test varies according to input geometries; If both are rings there are aligned if they have the same orientation. If only one is a ring, an ordering test is performed on the points on the ring that are nearest to the start, middle and end of nonring geometry. If neither lines are rings one of three tests are used:
Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

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. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

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. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

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 
Test whether a heighted 2D line geometry is digitised in a downhill direction. 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 tolerance. Returns a boolean value, true if the geometry is a heighted 2D line which slopes downwards and false otherwise. 

is_level 
Test whether a heighted 2D line geometry has a constant height along its length. An optional tolerance may be supplied to 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 tolerance. Returns a boolean value, true if the geometry is a heighted 2D line is level and false otherwise. Returns null if the input geometry is null and throws an exception if the input geometry is not a heighted 2D geometry. 

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. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

is_uphill 
Test whether a heighted 2D line geometry is digitised in an uphill direction. An optional tolerance may be supplied to use when 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. Returns a boolean value, true if the geometry is a heighted 2D line which slopes upwards and false otherwise. 

is_valid 
Tests to see if a geometry is valid. The validity criteria are:
A simplearea geometry is valid if:
Note: Any areas with OGCstyle rings that pointtouch other rings will be converted to or from the Radius Studio format of rings that pointtouch themselves during Open Data, Commit and Copy To tasks.


line 
Returns a line geometry constructed from points supplied in parameters. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

line_bearing_at_point 
Returns the angle of the line at a point between pi and pi, measured in radians anticlockwise from east (positive x axis). 

line_length 
Returns the length of a line.


line_segment 
Returns a segment cut out of a simple line geometry. The start and end points of the segment are specified by distances along the line from its start. With a heighted 2D 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 
Note: Use change_Dimension instead Returns a 2D geometry. If the argument is not valid, then null is returned. 

make_3d 
Returns a heighted 2D geometry from any geometry. It can optionally specify three noncollinear 3D points defining the plane for the new geometry. 

max_deflection_angle 
Returns the maximum deflection angle between adjacent line segments in a geometry. Given an arbitrary geometry finds the maximum deflection (change in direction, clockwise or anticlockwise, between adjacent vectors).


max_height 
Returns the maximum height of a heighted 2D geometry. The return value is the maximum z value on any of the vertices of the 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. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

min_height 
Returns the minimum height of a heighted 2D geometry. The return value is the minimum z value on any of the vertices of the geometry. 

min_intersection_angle 
Returns the minimum intersection angle between two geometries. Given any two geometries  not necessarily of the same type  finds the minimum angle at which a vector from one intersects a a vector from the other. A point or a clear geometry is not considered to intersect with anything. Returns 1 if the two geometries do not intersect. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

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. Note: For heighted or measured geometries: If the new point has a height/measure then the height/measure from the point will be applied. If the new location point is 2D then the height/measure value on the original vertex is retained. 

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. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

nearest_vertex 
Returns a point geometry at the nearest vertex on a geometry. Described by the nearest known X, Y or point geometry positions. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

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. For a complex geometry with more than one outer ring, a complex line is returned containing all of the outer rings. 

outer_shell 
Returns the outer shell of a simple solid geometry, as a simple surface geometry. For a complex geometry with more than one outer shell, a complex surface is returned containing all of the outer shells. 

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. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

point 
Builds a 2D point (if passing x and y values) or a 2.5D point (if passing x, y and z values). 

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. For a heighted 2D geometry, the point position is located by applying the proportion to the geometry in plan. The located point has its height calculated by interpolating between vertices. 

point_at_projection 
Returns a 2D point that is the specified bearing and distance from the point passed in. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

point_on_line 
Finds a point on a line geometry, a given distance along it from its start or end point. For a heighted geometry, distance is interpreted as a distance in plan. With a heighted line, the height will be interpolated between vertices. Returns a point geometry, or null if the distance parameter is out of range or if the input geometry is not a simple line. 

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. This can be used to form polygons from existing linework or to correct problems in an existing area geometry. Any duplicate points, spikes, kickbacks and small rings should be corrected before calling this function. It will fail if any of the rings are open, selfintersect or intersect other rings. Returns null if the rings do not form a valid area geometry. 

polygons_from_lines 
A function that takes a simple or multi line geometry and creates a simple or complex polygon formed by the lines. This will form polygons wherever there are areas enclosed by one or more input lines which do not need to form clean rings. To create a polygon from wellformed, nested rings, use the polygon built in instead. If a polygon can be formed within another, then the outer polygon will be created with a hole and a separate polygon formed within the hole. Returns the polygon(s) formed by the lines. Note: If the lines do not form any polygon, then NULL is returned. 

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. For a heighted geometry, the nearest point and its distance are calculated on the line geometry in plan, ignoring zvalues. 

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. A kickback is defined to be 4 consecutive points (A, B, C, D) such that:
For each such kickback, the points B and C will be replaced by a new vertex midway between them. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

remove_small_rings 
Removes any small rings from a geometry. Returns null if all of the rings are too small. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

remove_spikes 
Removes any spikes from a geometry. A spike is defined to be three consecutive points (A, B, C) such that:
Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

report_invalid 
Validates the input geometry and returns a list of problems found or null if no problems found. The returned list can be iterated over and the following builtins used to obtain the invalidity reason and geometry:
Note: The geometry returned by report_invalid_get_geometry may be null for certain types of geometry invalidity. 

report_invalid_get_geometry 
Returns a geometry related to a single invalidity report. This should be used on the elements obtained by running a "Loop over a Collection or Geometry" over the output of report_invalid. 

report_invalid_get_reason 
Returns the string containing a descriptive reason in English for a single invalidity report. This should be used on the elements obtained by running a "Loop over a Collection or Geometry" over the output of report_invalid. Example: Geometry 0 (Solid) is invalid: PolyhedralSurface (shell) 0 is invalid: Polygon 8 is invalid: Ring 0 selfintersects. 

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. 

round_geom 
Returns a copy of the input geometry, rounded to the specified precision. Precision is specified as the number of digits allowed after the decimal point in the coordinates of the returned geometry, with negative values being treated as an instruction to round before the decimal point. 

scale_and_rotate 
Returns a 2D copy of the input geometry scaled and rotated. 

segment 
Returns a segment from a line as two consecutive vertices. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

segments 
Obtains the segments from a geometry as a Complex Line. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

solid 
Creates a solid from a surface geometry by using it as the outer shell. With a complex geometry, nonsurface geometries are ignored. If the geometry contains more than one surface, returns null. If the resulting solid is invalid, returns null unless the optional "check validity" parameter is set to false. 

split_geometry 
Returns a geometry created by splitting the first geometry, using the second geometry. Either geometry can be single or multipart.
If the second geometry does not split the first, then the original geometry is returned unsplit. Returns a geometry of the same type as the first geometry, split into multiple parts where possible. 

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. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

symmetric_difference_by_dimension 
Returns a geometry equal to geometry1 XOR geometry2. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

true_distance 
Returns the distance along the surface of the earth between the 2 points. Note: The distance will be returned in metres. 

union 
Returns the union of two or more geometries. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

union_by_dimension 
Returns a geometry equal to the union of all the input geometries. Note: Any heighted 2D geometries will be projected down to 2 dimensions. 

vertices 
Obtains the vertices of a geometry, returned as a Complex Point. If no vertices are present, this geometry will be clear. Note: This function does not currently fully support measured geometries. Any measured geometries will be projected down to 2 dimensions. 

volume 
Returns the volume of a geometry.


Identity
Function 
Description 
Parameter(s) 

generate_uuid 
Generates a (version 4) random UUID string in lowercase 844412 hexadecimal format (e.g. 125d4167c85b43d4b416523625244020). 
None 
object_source_data_store 
Returns the name of the Data Store that loaded the object, or the full path if the second input parameter is set to true. Will return null if the object was not read from a data store. 

read_sequence 
Returns the next value in the sequence (as an integer). 

rule_name 
Returns the name (and optionally the path) of the currently running rule, or of the rule which triggered the current action if running an action map. Note: Paths are returned without a type prefix, for example: 

Lookup
Function 
Description 
Parameter(s) 

get_session_parameter_value 
Returns the value of a named parameter in a session. Note: If you try and use a session parameter that has not been defined on a session then you get an error. 
Name of the parameter to retrieve. 
metadata_store_lookup 
Looks up the value of a key in a specific table within in a metadata store. The query will match all keys in the table that equals the input value. If there are multiple matches, the first value found in the table is returned. Note: The returned value is the same as a Lookup Value using the same metadata store, table and key. Note: This builtin function is the reverse of 

metadata_store_reverse_lookup 
Look up the key of a value in a specific table within in a metadata store. The query will match all values in the table that equals the input value. If there are multiple matches, the first key found in the table is returned. Note: This builtin function is the reverse of 

Mathematical
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 coordinates to polar coordinates and returns the polar angle, measured counterclockwise from the positive xaxis. 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, e^{x}). 

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 (a^{b}). 

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). 

Measured Geometry
Function 
Description 
Parameter(s) 

get_measure_maximum 
Returns the maximum measure value of a geometry. The maximum value may not necessarily be found at the start/end of the geometry. Measures can be null so the maximum may be null. If the input parameter is null, the value returned will be null. If the input geometry is not a measured geometry, an exception will be thrown. 

get_measure_minimum 
Returns the minimum measure value of a geometry. The minimum value may not necessarily be found at the start/end of the geometry. Measures can be null so the minimum may be null. If the input parameter is null, the value returned will be null. If the input geometry is not a measured geometry, an exception will be thrown. 

is_measured_line_monotonic_increasing 
Returns a boolean to indicate if the input measured geometry is a simple line and measured with values increasing in the digitised direction along its length. If the input geometry is not a simple measured line, an exception will be thrown. 

line_segment_from_measures 
Returns the segment of linework between 2 particular measure values. The returned line geometry will be in direction based on the order of the specified measure values, rather than the geometric order of the input line. 

measure_from_point 
Returns the measure value located at the nearest position on the input line to the point geometry. Linear interpolation between stored measure values (located at vertices) will be used to identify the exact measure value along the input line where the nearest location (in 2D plan form) to the point is found. If the measure value at the specified vertex is null or if either of the measure values adjacent to the point geometry are null, the return value will be null. If the input geometry is not a simple measured line, an exception will be thrown. 

measured_point 
Builds a measured point from x, y and m values. 

point_from_measure 
Returns a point geometry located at the first position on the input line where the measure value is found. Linear interpolation between stored measure values (located at vertices) will be used to identify the exact position along the line where the specified measure value is found. If the input geometry is not a simple measured line, an exception will be thrown. If the measure value is not found in the input geometry, an exception will be thrown. 

set_measure 
Returns a copy of the input geometry with a measure set at the specified location. Note: This will overwrite any existing measure value at that location. Setting a null measure value is supported. 

Placekey
Function 
Description 
Parameter(s) 

get_placekey_from_address 
Returns the Placekey (https://www.placekey.io/) for a location defined by an address and optionally a POI name. Returns null if there was no match. Note: Looks up the placekey.io online API so requires external web access. If some parameters passed in are null or empty string then an attempt to fuzzily match will be made 

get_placekey_from_point 
Returns the Placekey (https://www.placekey.io/) for a location defined by either a point geometry, or x and y values in WGS84 lon/lat coordinates. Returns null if there was no match. If a point geometry, then it can be 2D or heighted 2D (Z values are ignored). Note: Looks up the placekey.io online API so requires external web access. 

Shifting
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 

Sorting
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 

String
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 JaroWinkler similarity score between two words. If both strings are null or empty then they are considered an exact match. 

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 Javastyle 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 Javastyle regular expression in a string with the specified replacement string. 

re_subs_first 
Replaces the first occurrence of a pattern matching a Javastyle 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. 

split_string 
Split a string into parts based on a delimiter. If an index is provided, then this will return the element at that index.<br><br> NOTE: Start, end, or double delimiters will return empty strings (e.g the first two elements for ',,A,B' delimited by ',' will be empty strings). 

substring 
Returns substring of the input string between the specified character indexes (where the first character is at index 0). 

to_lowercase 
Converts a string to lower case. 

to_uppercase 
Converts a string to upper case (capital letters). 

trim 
Returns a trimmed String, or null if a null object was passed in. 

Timestamp
Function 
Description 
Parameter(s) 

add_date 
Adds a date and time in the TIMESTAMP date format yyyyMMdd 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 yyyyMMdd HH:mm:ss.SSS. 
None 
to_timestamp 
Converts a date/time formatted string, or time in milliseconds, into a timestamp datatype. The default date/time format is "yyyyMMdd hh:mm:ss.SSS z". The default format allows just the date with no time to be specified. For example 20170317 14:25:03 GMT or 20170317. The time specified in milliseconds is from January 1, 1970, 00:00:00 GMT. Note: For more information about the format rules, refer to the Oracle documentation. 

timestamp_to_millis 
Converts the provided timestamp to millis since the epoch. 

Topology
Function 
Description 
Parameter(s) 

is_structured 
Tests if an object is topologically structured. Returns true if the object is structured and false otherwise. 

Validation
Function 
Description 
Parameter(s) 

rule_hotspot_attributes 
Only relevant when used in an Action within an ActionMap. Returns the list of the names of the attributes that caused the nonconformance. For geometry checks this is the name of the geometry and for attribute checks it is the names of the attribute(s) that were implicated. 

rule_hotspot_geometry 
Only relevant when used in an Action within an ActionMap. Returns the hotspots from the rule that triggers this action. Hotspots are the locations of nonconformances, inferred from the rule. e.g. If a rule checks that geometries should not intersect, then a nonconformance hotspot geometry will be the geometry of the intersection. Not all rules will be able to infer a hotspot geometry so there is an optional parameter to provide the geometry to report when there is no hotspot, typically set to the original object's geometry. 

Web Services
Function  Description  Parameter(s) 

base64_decode 
Decode a string from base64. 
The encoded string to decode. 
base64_encode 
Encode a string as base64. 
The string to encode. 
http_request 
Execute HTTP request. Returns the request response. Use the 

http_request_get_response_body 
Returns the body of the HTTP response. 
The response returned by HTTP request. 
http_request_get_response_header 
Returns the header of the HTTP response. 
The response returned by http_request. The header to retrieve the value from. 
http_request_get_response_status_code 
Returns the status code of the HTTP response. 
The response returned by http_request. 
json_read 
Extract a value from a JSON array or object. Returns the JSON value indicated by the provided path through the JSON structure. 
