Built-in Functions

A built-in function is a Predicate Value that returns a value calculated from one or more Values.

The following built-in functions can be used within 1Integrate.

     Note: You can add your own built-in functions by writing Java classes. For more information see the Built-in 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) Returns

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.

  • An integer value.

  • Another integer value.

The bitwise AND of the two integers.

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.

  • An integer value.

The bitwise complement of the integer.

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.

  • An integer value.

  • Another integer value.

The bitwise OR of the integers.

bit_shift

Returns an integer value computed by shifting the binary bits of the input value.

  • An integer value whose bits are to be shifted.

  • An integer value specifying how far to shift the bits of the first parameter. Positive values shift it to the left and negative values shift it to the right.

The integer formed by shifting the bits of the first parameter as specified by the second parameter.

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.

  • An integer value.

  • Another integer value.

The bitwise XOR of the integers.

Classes and Attributes

Function Description Parameter(s) Returns

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_attributes and class_is_attribute_null.

  • The object or the name of the class containing the attribute.

  • The attribute name.

Return the type of the provided attribute.

class_get_attribute_value

Return the value of an attribute for an object.

  • The object containing the attribute.

  • The name of the attribute to get the value of.

The value of the attribute.

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 input mapping target names.

  • The object from which to build the collection. Alternatively, this can be the name of the class that would be the source of the attributes.

The collection of attribute names.

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

  • The name of the class to check.

  • The name of the attribute to look for.

  • (Optional) The name of the Data Store that should contain the class.

  • (Optional) Error if class not found. Defaults to false, which means that if the specified class is not found then the built-in returns false. If set to true then it throws an exception when the specified class is not found and so alerts the user that the class name input is wrong.

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 class_get_attributes and class_get_attribute_type.

  • The object containing the attribute to test.

  • The name of the attribute to test.

Return TRUE if an attribute is NULL otherwise return FALSE.

compare_attributes

Compares 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 built-ins used to obtain the attribute name, and the value it has in the source and target objects:

  • compare_attributes_get_name
  • compare_attributes_get_value_source
  • compare_attributes_get_value_target
  • The source object to compare.

  • The target object to compare.

  • Attributes to exclude from the comparison.

Returns a list of mismatches, or null values if the objects are identical.

compare_attributes_get_name

Returns the attribute name that failed the comparison.

This should be used on the elements obtained by running a "Loop over a Collection or Geometry" over the output of compare_attributes.

  • An element within the compare_attributes returned list.

An attribute name.

compare_attributes_get_value_source

Returns the attribute value in the source 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.

  • An element within the compare_attributes returned list.

The attribute value in the source object.

compare_attributes_get_value_target

Returns the attribute value in the target object that failed the comparison.

This should be used on the elements obtained by running a "Loop over a Collection or Geometry" over the output of compare_attributes.

  • An element within the compare_attributes returned list.

The attribute value in the target object.

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.

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

  • (Optional) The Data Store that will be the source of the class names.

A collection of class names.

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

  • The name of the class to check.

  • (Optional) The name of the Data Store that should contain the class.

Returns true if the specified class is in the Session, otherwise returns false.

Collection

Function Description Parameter(s) Returns

count

Returns the size of a collection.

  • A collection or array.

The number of elements in the collection.

Conversion

Function Description Parameter(s) Returns

to_degrees

Converts an angle specified in radians to degrees.

  • A numerical value representing an angle in radians.

A numerical value representing the same angle measured in 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.

Timestamp values are returned as the number of milliseconds since 00:00:00 UTC on 1 January 1970.

  • A numerical, boolean, string or timestamp value.

An integer value or null.

to_radians

Converts an angle specified in degrees to radians.

  • A numerical value representing an angle in degrees.

A numerical value representing the same angle measured in radians.

to_real

Converts a numerical, boolean or string value to a real (floating point) number.

     Note: The boolean values true and false are converted into 1.0 and 0.0 respectively.

  • A numerical, boolean or string value.

A floating point number.

to_string

Converts any value to a string.

  • Any value.

A string representation of that value.

Geometric

Function Description Parameter(s) Returns

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

  • A two point line segment.

  • A two point line segment.

  • (Optional) A boolean flag indicating that the function should return an angle in degrees.

A real value in the range [0,pi] ( or [0,180]).

area

Returns the area of a geometry.

  • If the geometry passed is a line or point, then the area returned will be 0.
  • If the geometry is a solid, the surface area will be returned.
  • If it is a complex geometry, the area returned will be the sum of the areas of each valid geometry in the collection.

     Note: Any heighted 2D geometries will be projected down to 2 dimensions.

  • A geometry.

The area of the geometry.

boundary

Returns the boundary of a geometry.

  • For a single or multi point, the boundary is an empty geometry with 0 parts.
  • For a single or multi-line, the boundary is a multi point specifying the line end points. A closed line has no end points and returns an empty geometry with 0 parts.
  • For a single or multi-polygon, the boundary is a single or multi line containing all the inner and outer rings in the polygon geometry.
  • For a polyhedral surface, the boundary is a single or multi-line containing all the inner and outer boundary rings of the surface. A closed surface (e.g the boundary of a solid) has no boundary and returns an empty geometry with 0 parts.
  • For a single or multi-solid the boundary is a single or multi-part polyhedral surface.
  • In general, the boundary of a multi-part geometry is also a multi-part geometry containing the boundary of each separate part.

This function can be used in combination with the polygon() function to correct badly formed areas, as long as the rings do not self-intersect or intersect each other. If the areas may contain duplicate points, kickbacks or small loops, these should be eliminated before extracting the boundary and reforming the polygon.

  • The geometry for which the boundary is required.

A geometry representing the boundary of the input geometry.

buffer

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

  • The geometry to buffer.

  • The distance from the input geometry that the buffer zone will extend to. If this is negative then any 2D or 2.5D areas in the input geometry are buffered inwards; the sign of this parameter is ignored for 3D geometries. If this is smaller than the geometric tolerance a copy of the input geometry is returned, this means the returned geometry is not guaranteed to be an area.

  • (Optional) The length of the line segments to use to build up the buffer zone. Specify this to control how many vertices are added to the rounded corners of the buffer. Use the default or a small value to generate more vertices for more accurate buffers. Use a large value for fewer vertices and faster processing. For example when buffering a point, use buffer_distance/4 to create a circle with 26 vertices.

  • (Optional) The square end proportion to determine how far from the end of the line to create the square end. A negative value produces rounded corners and a positive value produces a buffer with square end. This is not supported for 2.5D geometries.

  • (Optional) The mitre truncation proportion. A negative value produces rounded corners. A zero value produces a true bevel which would cut off the corner with a straight line. A value greater than zero would extend the bevel away from the geometry by a proportion of the buffer distance. A very large value would remove the bevel to create true mitres, which might extend a long way if the angle is very sharp. This is not supported for 2.5D geometries.

A geometry representing the buffer around the input geometry.

centroid

Returns a point geometry at the 2D centroid of the supplied geometry.

Does not support 3D geometries, use the change_dimension built-in to convert to 2D before passing them in. Does not support multi-part geometries made up of different types.

     Note: The centroid is not guaranteed to be in/on the geometry, unlike the get_point builtin.

  • The geometry.

A 2D point geometry at the centroid.

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:

  • When changing from 2D to heighted 2D, the Z coordinates will be set to NULL.
  • When changing from 2D to 3D, an error will occur.
  • When changing from heighted 2D to heighted 2D, existing values will be used.
  • When changing from heighted 2D to 3D, the existing values will be used, but an error will occur if any null values exist.
  • When changing from 3D to heighted 2D, the resulting geometry will be an approximation of the underside of the original geometry.

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:

  • Setting add measures to false will remove them.
  • Setting add measures to true but not providing the optional value will copy them to the new geometry.
  • Setting add measures to true and providing a value will overwrite them.
  • The input geometry.

  • The coordinate dimension to change to (2, 2.5, or 3).

  • (Optional) A boolean flag specifying whether a measure should be added. Defaults to false.

  • (Optional) A real value or planar geometry to set new Z coordinates, or if none is supplied, the value to use for measures.

  • (Optional) The value to use for measures if the 4th argument has been used for setting Z coordinates.

A new geometry with the specified dimension.

convex_hull

Returns the convex hull of the input geometry, which is the smallest convex geometry that contains the input geometry.

The return value will be a simple area geometry with no inner rings.

     Note: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

  • Any geometry.

The convex hull of that geometry.

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.

  • (Optional) A comma separated list of classes to include (omit, or null, for all).

  • (Optional) A comma separated list of classes to exclude (omit, or null, for none).

The approximate convex hull polygon of the geometries.

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.

  • The input geometry.

The number of areas.

count_inner_rings

Counts the clockwise digitised rings of a simple or complex geometry:

  • For a simple area this is the number of inner rings.
  • For a complex geometry this is the sum of inner ring counts for all the simple area components.
  • For a point or line geometry this is 0.
  • If the object passed was not a geometry, returns null.
  • The input geometry.

The number of inner rings.

count_parts

Returns the number of parts in a geometry.

  • For a clear geometry this is 0.
  • For a simple geometry this is 1.
  • A complex geometry will have one or more parts.
  • If the object passed was not a geometry, returns null.
  • The input geometry.

The number of parts in the 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.

  • The input geometry.

The number of surfaces.

count_vertices

Returns the total number of vertices in a geometry:

  • With an area geometry, returns the sum of the vertex counts for each of its rings. The start/end vertex in a ring is counted only once.
  • With a surface geometry, returns the sum of the vertex counts for each of its areas.
  • With a solid geometry, returns the sum of the vertex counts for each of its surfaces.
  • With a complex geometry, returns the sum of the vertex counts for each of its components.
  • The input geometry.

The number of vertices.

create_geometry_from_wkt

Creates a geometry from a geometric Well-known text String.

  • A geometric WKT String. Supported types are:

    • POINT
    • LINESTRING
    • POLYGON
    • MULTIPOINT
    • MULTILINESTRING
    • MULTIPOLYGON
    • GEOMETRYCOLLECTION
    • POLYHEDRALSURFACE (For 3D output only)
    • SOLID (For 3D output only)
    • MULTISOLID (For 3D output only)
    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.
  • A boolean to indicate if the output should be a 3D Geometry

A geometry created from the provided WKT.

difference

Returns the difference between two geometries.

The result will be a geometry consisting of all the parts of the first geometry which are not in the second geometry.

     Note: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

  • The first geometry.

  • The second geometry (to be subtracted from the first geometry).

A geometry equal to geometry1 AND NOT geometry2.

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.

  • The first bearing: An angle in radians between -pi and pi.

  • The second bearing: An angle in radians between -pi and pi.

An angle in degrees between 0 and 90.

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: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

  • The required dimensionality of the result.

    • 0 - for GeomCombineResultType.POINTS
    • 1 - for GeomCombineResultType.LINES
    • 2 - for GeomCombineResultType.AREAS
  • The first geometry.

  • The second geometry (to be subtracted from the first geometry).

A geometry equal to geometry1 AND NOT geometry2.

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 multi-part geometry is the largest dimension of any of its parts.

  • A geometry.

The dimension of the input geometry (0 to 2) or -1 if input is null.

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: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

  • A geometry.

  • Another geometry.

The minimum distance between the 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 (hopefully) fewer vertices. The line-work of the resulting geometry will lie entirely within the specified tolerance of the original geometry's line-work.

  • The geometry to simplify.

  • The required tolerance (must be a positive number).

The simplified geometry.

drag_vertex

Returns a geometry formed by moving a vertex on a simple line geometry.

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.

This function uses a scale and rotate algorithm to try to preserve the shape of the geometry on either side of the vertex being moved.

     Note: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

  • A simple line geometry.

  • A simple point geometry identifying the vertex on the line to be moved.

  • A simple point geometry identifying the new location for the vertex.

The resulting simple line geometry after the vertex has been moved to the specified location.

end_of

Returns the end point of a simple line geometry.

  • A simple line geometry.

A simple point geometry located at the end of the line.

ends_of

Returns the end points 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.

  • A simple line geometry.

A simple or complex point geometry containing the start and end of the line.

extrude

Extrude a geometry to a given height along the Z-axis

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:

  • For points, the output is a vertical line with length equal to the input height.
  • For lines, the output is a vertical surface with the specified height following the path of the line.
  • For areas, the output is a solid of the specified height with a footprint of the input geometry.
  • For complex geometries, the result will be a complex geometry containing extruded versions of all its components.
  • For solids, an error will occur.

Additional information:

  • A negative height value will result in the geometry being extruded downwards instead of upwards.
  • For 2D geometries, the Z coordinates of the input geometry will be set to 0.
  • For heighted 2D geometries, the initial Z coordinates will be retained; however, any NULL heights will result in an error.
  • If a non-planar heighted 2D area is used, the footprint of the resulting solid will be arbitrary.
  • For 3D geometries, the initial Z coordinates will be retained.
  • Any measures on the input geometry are discarded.
  • The geometry to extrude.

  • The distance to extrude by.

A new 3D geometry of the extrusion.

find_duplicates

Find duplicates in a given geometry within a given tolerance.

     Note: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

  • The geometry to test for duplicate points.

  • (Optional) The tolerance level to be used (in dataset units). If not specified uses the default geometric tolerance.

A multi-part point geometry representing the locations of duplicate points or null if there are no duplicate vertices.

find_kickbacks

Find the locations of 'kickbacks' within a geometry.

Kickbacks are z-shapes on a line with a short segment in between. They are usually detected with larger angles than spikes which is why there is a separate built-in to find them. A kickback is defined to be 4 consecutive points (A, B, C, D) such that:

  1. The distance BC is less than the distances AB and CD.
  2. The sines of the angles ABC and BCD are both less than a maximum valuewhich may be specified by the second parameter.
  3. (Optionally) the distances from B to the line CD and from C to the line AB are both less than a maximum "width" value specified by the third parameter.
  • The geometry to test.

  • (Optional) The maximum value for the sine of the angles in the kickback. If omitted, this defaults to the sine of 1 degree.

  • (Optional) The maximum width of the kickback. If omitted, kickbacks with any width will be returned.

A multi-point geometry representing the location(s) of the kickback(s), or null if there are no kickbacks.

find_self_intersections

Finds the intersection points at which a line, or the rings of an area, self-intersect.

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.

  • The line or area geometry to locate self-intersections. A heighted or measured line or area will be projected down to 2 dimensions before finding any self-intersections.

A multi-part point geometry showing the location of each self-intersection points, or null if there are no self-intersections.

find_small_rings

Find small rings in an area geometry.

One or more of the following criteria may be used to determine if a ring is to be considered small:

  1. The length of the diagonal if the ring's MBR.
  2. The area of the ring.
  3. The ratio of the ring's area to the square of its perimeter. This is always less than 1/4pi and is actually independent of the size of the ring but will be small if its shape is irregular.

If any of these parameters is negative it is ignored.

     Note: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

  • The geometry to test.

  • The maximum MBR diagonal length.

  • (Optional) The maximum ring area.

  • (Optional) The maximum area to square perimeter ratio.

Descriptor for the complex line geometry containing small rings.

find_spikes

Find locations of 'spikes' in the line-work of a geometry.

A spike is defined to be 3 consecutive points (A, B, C) such that:

  1. The distance AC is less than the distance AB.
  2. The sine of the angle ABC is less than a maximum value which may be specified by the second parameter.
  3. (Optionally) the distance AB is less than a maximum "length" value specified by the third parameter.

     Note: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

  • The geometry to test.

  • (Optional) The maximum value for the sine of the angle in the spike (a real number in the range [0, 1]). If omitted, this defaults to the sine of 1 degree (approximately 0.017).

  • (Optional) The maximum length of the spike.

Descriptor for the point complex geometry containing spike points.

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 decimals places will result in the ordinates being returned in rational form (a/b).

  • A geometry.

  • (Optional) The number of decimal places to use for coordinates.

    • Pass 5 (or less) to use 5 decimal places.
    • Pass 6 to 15 to use 15 decimal places.
    • Pass 16 (or more) to use the rational coordinate form.

A string containing the WKT encoding of the geometry.

get_job_extent

Obtain the extent of the current Session. From highest priority to lowest, this is calculated as:

  • If the Session is partitioned, the extent of the partition.
  • If an extent such as a Bounding Box has been specified for a Session, the specified extent.
  • If there are any extents present in the spatial metadata for the loaded data, the MBR of all such extents.
  • A default extent, which may not be useful.

     Note: This does not calculate the MBR of the loaded data.

The Session extent.

get_point

Returns a representative point guaranteed to lie on the specified geometry. The returned point will be of the same dimension as the input geometry.

     Note: The point is not necessarily near to the centre of the geometry, but is guaranteed to lie inside it.

  • Any geometry.

A simple point geometry inside the input geometry.

get_x

Returns the x-coordinate of a representative point within a geometry.

  • The input geometry.

The x-coordinate of a representative point within the geometry (or null).

get_y

Returns the y-coordinate of a representative point within a geometry.

  • The input geometry.

The y-coordinate of a representative point within the geometry (or null).

get_z

Returns the z-coordinate 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.

  • The input geometry.

The z-coordinate of a representative point within the geometry (or 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 co-ordinates to be considered to have duplicate points.

  • The input geometry.

A boolean value. True if the geometry has any consecutive coincident vertices.

has_kickbacks

Test whether a geometry has kickbacks.

A kickback is defined to be 4 consecutive points (A, B, C, D) such that:

  1. The distance BC is less than the distances AB and CD.
  2. The sines of the angles ABC and BCD are both less than a maximum value which may be specified by the second parameter.
  3. (Optionally) the distances from B to the line CD and from C to the line AB are both less than a maximum "width" value specified by the third parameter.

     Note: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

  • The geometry to test.

  • (Optional) The maximum value for the sine of the angles in the kickback. If omitted, this defaults to the sine of 1 degree.

  • (Optional) The maximum width of the kickback.

A boolean value, true if the geometry has kickbacks and false if it does not.

has_small_rings

Test whether a geometry has small rings.

One or more of the following criteria may be used to determine if a ring is to be considered small:

  1. The length of the diagonal if the ring's MBR.
  2. The area of the ring.
  3. The ratio of the ring's area to the square of its perimeter. This is always less than 1/4pi and is actually independent of the size of the ring but will be small if its shape is irregular.

If any of these parameters is negative it is ignored.

     Note: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

  • The geometry to test.

  • The maximum MBR diagonal length.

  • (Optional) The maximum ring area.

  • (Optional) The maximum area to square perimeter ratio.

A boolean value, true if the geometry has small rings and false if it does not.

has_spikes

Checks whether a geometry has spikes.

A spike is defined to be 3 consecutive points (A, B, C) such that:

  1. The distance AC is less than the distance AB.
  2. The sine of the angle ABC is less than a maximum value which may be specified by the second parameter.
  3. (Optionally) the distance AB is less than a maximum "length" value specified by the third parameter.

     Note: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

  • The geometry to test.

  • (Optional) The maximum value for the sine of the angle (in radians) in the spike (a real number in the range [0, 1]). If omitted, this defaults to the sine of 1 degree (approximately 0.017).

  • (Optional) The maximum length of the spike.

A boolean value, true if the geometry has spikes and false if it does not.

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.

  • A heighted 2D geometry.

  • (Optional) A 2D geometry specifying the point on the heighted 2D geometry whose height is to be returned. If this parameter is omitted, then a vertex on the heighted 2D geometry is chosen at random.

The height of the nearest vertex on the heighted 2D geometry.

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.

It returns null if applied to a null geometry, a non-area geometry, an area without inner rings or complex geometry containing areas with no inner rings. The result has the same dimensionality (2D or 3D) as the input geometry.

  • A simple or complex 2D or heighted 2D geometry.

A simple line if there is only one inner ring, a complex line containing all of the inner rings or null.

intersection

Returns the intersection of two or more geometries (the parts in common between all of them).

All points in the returned geometry will also lie in all of the input geometries.

     Note: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

  • Any geometry.

  • Another geometry to intersect with the first.

  • (Optional) Additional geometries to intersect.

A geometry equal to the intersection of all the input geometries, or null if the intersection is empty.

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: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

  • The required dimensionality of the result.

    • 0 - for GeomCombineResultType.POINTS
    • 1 - for GeomCombineResultType.LINES
    • 2 - for GeomCombineResultType.AREAS
    • 3 - for GeomCombineResultType.VOLUMES
  • Any geometry.

  • Another geometry to intersect with the first.

  • (Optional) Additional geometries to intersect.

A geometry equal to the intersection of all the input geometries, or null if the intersection is empty.

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 they 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 non-ring geometry.
  • If neither line is a ring, one of three tests are used.
    • If their ends touch this is used to determine alignment.
    • If their ends do not touch, and one line is more than one and a half times the length of the other, then an order test is performed on the points on the longer line that are nearest the start and end of the shorter line.
    • If neither line is 1.5 times the length of the other, a distance test is performed between the start and end points of the lines.

     Note: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

  • First simple line geometry (must not be null).

  • Second simple line geometry (must not be null).

True if and only if the geometries are aligned.

is_boundary_left

Test whether a line and an area have the boundary left relationship.

That is, the area is on the left of the line, and the line is contained in the boundary of the area.

     Note: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

  • The line geometry.

  • The area geometry.

A boolean value, true if the boundary left relationship holds and false otherwise.

is_boundary_right

Test whether a line and an area have the boundary right relationship.

That is, the area is on the right of the line, and the line is contained in the boundary of the area.

     Note: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

  • The line geometry.

  • The area geometry.

A boolean value, true if the boundary right relationship holds and false otherwise.

is_closed

Test whether a geometry is closed.

  • The geometry to test.

A boolean value, true if the geometry is a simple area or a simple line whose end points are coincident and false otherwise.

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.

  • A heighted 2D line geometry to test.

  • (Optional) A numerical value specifying the tolerance to apply to the line's z values.

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.

  • A heighted 2D line geometry to test.

  • (Optional) A numerical value specifying the tolerance to apply to the line's z values.

A boolean value, true if the geometry is a heighted 2D line that 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

Test if two line geometries intersect at common vertices.

If both geometries are heighted 2D, also test whether the heights at the vertices are equal.

If there are no points of intersection then the geometries are considered to pass the test.

The optional third parameter can be set to false to indicate that the check on z values for heighted 2D geometries should not be made.

  • The first line geometry.

  • The second line geometry.

  • (Optional) An optional boolean value indicating for heighted 2D geometries whether or not to check z values at intersections (defaults to true).

A boolean value, true if the geometries are noded and false otherwise.

is_simple

Determines whether a geometry is simple according to the criteria in "OpenGIS(r) Implementation Specification for Geographic information Simple feature access - Part 1: Common architecture". For heighted 2D geometries, only the 2D part is considered. The criteria applied are:

  • Clear geometries are not OGC-simple.
  • Any geometry that is not valid as defined by the is_valid builtin function is not OGC-simple.
  • A simple-point geometry is OGC-simple.
  • A simple-line geometry is OGC-simple if it has no self-intersection or self-touch points. Exception: an open line with coincident start and end points is OGC-simple if it has no other self-intersection or self-touch points.
  • A simple-area geometry is OGC-simple.
  • A complex point geometry is OGC-simple if it has no coincident component simple point geometries.
  • A complex line geometry is OGC-simple if all of its component simple line geometries are OGC-simple and components do not intersect or touch except at open line start/end points.
  • A complex area is OGC-simple if no component crosses or line-touches any other component. Point-touches are acceptable.
  • A complex geometry of mixed type is not OGC-simple.

     Note: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

  • The input geometry.

A boolean value. True if the geometry is simple according to the OGC definition.

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.

  • A heighted 2D line geometry to test.

  • (Optional) A numerical value specifying the tolerance to apply to the line's z values.

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:

  • Empty geometries are invalid (no geometric data).
  • A simple-point or complex-point geometry is valid.
  • A simple-line geometry is valid if it has at least two points and no adjacent duplicate vertices.
  • A simple-area geometry is valid if:
    • It has an outer ring.
    • The outer ring encloses any inner rings.
    • No ring crosses itself or any other ring (a point-touch is acceptable).
    • No ring has a line-touch with itself or any other ring.
    • Each ring is a valid closed simple-line geometry.
    • The outer ring is digitised in an anti-clockwise direction.
    • Any inner rings are digitised in a clockwise direction.

     Note: Any areas with OGC-style rings that point-touch other rings will be converted to or from the Radius Studio format of rings that point-touch themselves during Open Data, Commit and Copy To tasks.

  • 3D geometries are currently validated using SFCGAL rules.
  • A complex geometry of a single or mixed type is valid if each component is valid.
    • The input geometry.

    • (Optional) A double value representing the maximum deviation value to be used for validation. This controls the maximum distance at which certain geometric irregularities (e.g. deviation of the rings of a 3D area from strict coplanarity) will be ignored. This value is only guaranteed to be used if the input geometry is a 3D geometry, otherwise it may be ignored and substituted by the geometry tolerance. A negative value may be passed to use the default geometry tolerance.

    • (Optional) A double value representing the linear resolution to be used for validation. This controls the minimum distance at which two points are not considered to be unique, and small geometries may degenerate. This value is only guaranteed to be used if the input geometry is a 3D geometry, otherwise it will be ignored and substituted by the geometry tolerance. A negative value may be passed to use the default geometry tolerance.

    A boolean value. True if the geometry is valid.

    line

    Returns a simple line geometry constructed from the points supplied by the parameters.

         Note: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

    • The start of the line as a simple point geometry.

    • The second vertex of the line as a simple point geometry.

    • (Optional) Subsequent vertices in the line as simple point geometries.

    A simple line geometry based on the input parameters, or null if not successful.

    line_bearing_at_point

    Built-in function that gets the angle of a line at the point specified.

    Angle is +/- pi in radians anti-clockwise from east (x axis).

    If the point is not on the line the it uses the nearest point that is on the line.

    • The line geometry for which to measure the angle.

    • The geometry for the point that is on or near the point on the line at which the angle is to be measured.

    The angle of the line at this point between -pi and pi, measured in radians anti-clockwise from east (positive x axis).

    line_length

    Returns the length of a line.

    • If the geometry passed is not a line, then the length returned will be 0.
    • If it is a complex geometry, the length returned will be the sum of the lengths of each simple line in the complex geometry.

         Note: Any heighted 2D geometries will be projected down to 2 dimensions.

    • A geometry.

    The length of the geometry.

    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 end-vertex is given an interpolated height.

    • The input geometry.

    • Distance along the line for the segment start point. A negative value indicates a distance from the line end instead of the start.

    • Distance along the line for the segment end point. A negative value indicates a distance from the line end instead of the start.

    The line segment geometry, or null if the distance parameters are out of range.

    make_2d

    DEPRECATED: please use change_dimension instead.

    • The geometry to convert to 2d.

    A 2d geometry. The object is always a newly created object that will have to be freed by the caller. If the argument is not valid, then null is returned.

    make_3d

    DEPRECATED: please use change_dimension instead.

    • The geometry to convert to heighted 2D.

    • (Optional) The x-coordinate value for the first 3D point.

    • (Optional) The y-coordinate value for the first 3D point.

    • (Optional) The z-coordinate value for the first 3D point.

    • (Optional) The x-coordinate value for the second 3D point.

    • (Optional) The y-coordinate value for the second 3D point.

    • (Optional) The z-coordinate value for the second 3D point.

    • (Optional) The x-coordinate value for the third 3D point.

    • (Optional) The y-coordinate value for the third 3D point.

    • (Optional) The z-coordinate value for the third 3D point.

    A heighted 2D 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 anti-clockwise, between adjacent vectors).

    • For a point this is always 0.
    • For an area it is the maximum deflection in any of its rings.
    • For a complex geometry it is the maximum deflection in any of its simple parts.
    • For heighted 2D geometries, the heights are ignored.
    • For Measured geometries, the measures are ignored.
    • The input geometry.

    The maximum deflection angle in degrees.

    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.

    • A heighted 2D geometry.

    The maximum height of the geometry.

    mbr

    Returns the MBR (minimum bounding rectangle) of one or more geometries.

    The result is the smallest rectangle, with sides parallel to the x and y axes, containing the input geometries.

         Note: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

    • Any geometry.

    • (Optional) Additional geometries.

    A geometry equal to the MBR of the input geometries.

    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.

    • A heighted 2D geometry.

    The minimum height 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 vector from the other.

    A point or a clear geometry is not considered to intersect with anything.

         Note: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

    • First input geometry.

    • Second input geometry.

    The minimum intersection angle in degrees (-1 if the two geometries do not intersect).

    move_vertex

    Returns a geometry formed by moving a vertex on a point or line geometry.

    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.

    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.

    • A point or line geometry.

    • A simple point geometry identifying the vertex on the line to be moved.

    • A simple point geometry identifying the new location for the vertex.

    The resulting point or line geometry after the vertex has been moved to the specified location.

    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 geomtry an exception will be thrown.

         Note: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

    • An originating point.

    • A destination geometry, either point, line, area, or complex whose nearest point(s) to parameter 1 are returned.

    • (Optional) boolean. True to return an arbitrary single nearest point. False to return all nearest points as a complex geometry. Default value is false.

    A geometry representing the closest point(s). (This will be complex if multiple points are equally close to the originating point).

    nearest_vertex

    Return a point geometry representing the position of the nearest vertex on the input geometry.

         Note: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

    • The geometry to find the vertex on.

    • The nearest known X position, or a point geometry.

    • The nearest known Y position. Only used if arg_1 is not a point geometry.

    A point geometry which has the same X, Y as the nearest vertex on the input geometry.

    offset

    Offset (translate) a geometry by a fixed distance without changing its shape, size or orientation.

    • The geometry to offset.

    • The distance to move the geometry in the x direction.

    • The distance to move the geometry in the y direction.

    • (Optional) The distance to move the geometry in the z direction. If a z offset is specified with a 2D geometry, the result will be a Heighted geometry with all heights set to the z offset value.

    The resulting translated geometry.

    outer_ring

    Returns the outer ring of a simple area geometry, as 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.

    • A simple or complex area geometry.

    The out ring geometry if there is only one, or a complex geometry 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.

    • A simple or complex solid geometry.

    The outer shell geometry if there is only one, otherwise a complex geometry 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: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

    • Any geometry.

    The total length of the inner and outer rings of the geometry.

    point

    Builds a 2D point if passing x and y values, or a heighted 2D point if passing x, y and z.

    • The x-coordinate value of the point.

    • The y-coordinate value of the point.

    • (Optional)The z-coordinate value of the point.

    A point geometry.

    point_along_line

    Returns a point on a line geometry at a distance along it expressed as a proportion of the 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.

    • A line geometry.

    • Proportional distance along the line, a real number in the range [0,1].

      • A value <= 0 locates the start point of the line.
      • A value >= 1 locates the end point of the line.
      • A value between 0 and 1 locates a point within the line.

    A point geometry. Null if the first argument supplied is not a simple line geometry, or if the second argument is not a numeric value.

    point_at_projection

    Returns a 2D point that is the specified bearing and distance from the point passed in.

         Note: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

    • The origin point geometry from which to measure the location of the new point.

    • An angle (in degrees anti-clockwise from east) representing the bearing to the new point from the origin point.

    • A distance from the origin point (in dataset units) at which to create the new point.

    A new 2D point, the specified bearing and distance from the origin point.

    point_on_line

    Finds a point on a line geometry at 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.

    • The input geometry.

    • Distance from the start of the line. A negative value indicates distance from the end of the line.

    A point geometry, or null if the distance parameter is out of range, or if the input geometry is not a simple line.

    polygon

    Attempts to form a valid geometry from a 2D or heighted 2D line or area geometry.

    Calculates which are inner and outer rings, and if necessary reverses the direction of digitising.

    This can be used to form polygons from existing line-work 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, self-intersect or intersect other rings.

    • A simple closed line geometry, a complex line geometry containing one or more rings, a simple area or a complex area geometry.

    An area geometry, possibly complex, or 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 well-formed, 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.

         Note: If the lines do not form any polygon, then NULL is returned.

    • A simple or multi line geometry to create a simple or complex polygon from.

    The polygon(s) formed by the lines.

    If the lines do not form any polygon then NULL is returned.

    proportion_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 geometry, the nearest point and its distance are calculated on the line geometry in plan, ignoring z-values.

    • A line geometry.

    • A point geometry.

    Proportional distance along the line, a real number in the range [0,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.

         Note: For heighted 2D geometries, both the plan co-ordinates and the height must be equivalent (within geometric tolerance) to be considered duplicate.

    • Any geometry.

    A copy of the geometry with all duplicate vertices removed.

    remove_kickbacks

    Removes any kickbacks from a geometry.

    A kickback is defined to be 4 consecutive points (A, B, C, D) such that:

    1. The distance BC is less than the distances AB and CD.
    2. The sines of the angles ABC and BCD are both less than a maximum value which may be specified by the second parameter.
    3. (Optionally) the distances from B to the line CD and from C to the line AB are both less than a maximum "width" value specified by the third parameter.

    For each such kickback, the points B and C will be replaced by a new vertex midway between them.

         Note: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

    • The input geometry.

    • (Optional) The maximum value for the sine of the angles in the kickback. If omitted, this defaults to the sine of 1 degree.

    • (Optional) The maximum width of the kickback.

    The resulting geometry with kickbacks removed.

    remove_small_rings

    Removes any small rings from a geometry.

    One or more of the following criteria may be used to determine if a ring is to be considered small:

    1. The length of the diagonal of the ring's MBR.
    2. The area of the ring.
    3. The ratio of the ring's area to the square of its perimeter. This is always less than 1/4pi and is actually independent of the size of the ring but will be small if its shape is irregular.

    If any of these parameters is negative it is ignored.

         Note: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

    • The input geometry.

    • The maximum MBR diagonal length.

    • (Optional) The maximum ring area.

    • (Optional) The maximum area to square perimeter ratio.

    The resulting geometry with small rings removed, or null if all of the rings are too small.

    remove_spikes

    Removes any spikes from a geometry.

    A spike is defined to be 3 consecutive points (A, B, C) such that:

    1. The distance AB is less than the distance BC.
    2. The sine of the angle ABC is less than a maximum value which may be specified by the second parameter.
    3. (Optionally) The distance AB is less than a maximum "length" value specified by the third parameter.

    For each such spike, the vertex B will be removed.

         Note: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

    • The input geometry.

    • (Optional) The maximum value for the sine of the angle in the spike. If omitted, this defaults to the sine of 1 degree.

    • (Optional) The maximum length of the spike.

    The resulting geometry with spikes removed.

    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 built-ins used to obtain the invalidity reason and geometry:

    • report_invalid_get_reason
    • report_invalid_get_geometry.

    An example Action to use this might look like:

    • For all elements <report_element> in report_invalid(Class.geometry)
      • Create object error_report
        • set error_report.geometry=report_invalid_get_geometry(<report element>)
        • set error_report.reason=report_invalid_get_reason(<report element>)

         Note: The geometry returned by report_invalid_get_geometry may be null for certain types of geometry invalidity.

    • A geometry.

    • (Optional) A double value representing the maximum deviation value to be used for validation. This controls the maximum distance at which certain geometric irregularities - e.g. deviation of the rings of a 3D area from strict coplanarity will be ignored. This value is only guaranteed to be used if the input geometry is a 3D geometry, otherwise it may be ignored and substituted by the geometry tolerance. A negative value may be passed to use the default geometry tolerance.

    • (Optional) A double value representing the linear resolution to be used for validation. This controls the minimum distance at which two points are not considered to be unique, and small geometries may degenerate. This value is only guaranteed to be used if the input geometry is a 3D geometry, otherwise it will be ignored and substituted by the geometry tolerance. A negative value may be passed to use the default geometry tolerance.

    A list of validity problems found with the input geometry or null if no geometric problems are found.

    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.

    • An element within the report_invalid returned list.

    A geometry related to the invalidity, or null if no geometry present.

    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 self-intersects.

    • An element within the report_invalid returned list.

    A string description of the invalidity.

    reverse_line

    Reverses the order of the vertices of a simple line geometry.

    • Any simple line geometry.

    A copy of the line geometry, with the same vertices but running in the opposite direction.

    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.

    • A geometry to round.

    • Precision to round to, as an integer.

    • (Optional) Whether or not to check if the geometry is valid after rounding. Default is true.

    The rounded geometry.

    scale_and_rotate

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

    • The geometry to scale and rotate. It can be 2D or heighted 2D, of any type.

    • The Point geometry to scale and rotate about, must be a 2D or heighted 2D simple point.

    • The scale factor to use.

    • The angle to rotate the object, in radians.

    A 2D copy of the input geometry scaled and rotated.

    segment

    Returns a segment from a line geometry as a simple line geometry.

         Note: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

    • The line geometry from which to take the segment.

    • The index of the line segment to return (1-based). The zero index will return the last segment. A negative index will return the segment counting from the last segment. So -1 will return the segment before the last one. Out of bounds indices are not allowed.

    A simple line segment based on two consecutive vertices.

    segments

    Obtains the segments from a geometry as a Complex Line.

         Note: This function does not currently fully support measured geometries. Any measured geometries will be projected down to 2 dimensions.

    • The geometry to take the segments from, can be of any type.

    The segments of the geometry returned as a Complex Line, if no segments are present this geometry will be clear.

    solid

    Creates a solid from a surface geometry by using it as the outer shell.

    With a complex geometry, non-surface 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.

    • A geometry.

    • (Optional) A boolean specifying whether to check for validity on the resulting solid. Default is true.

    A simple solid with the given surface as its outer shell.

    split_geometry

    Returns a geometry created by splitting the first geometry using the second geometry. Either geometry can be single or multi-part.

    • An area can be split by lines that cross it.
    • A line can be split by lines where they intersect it.
    • A line can be split by points where they intersect it.
    • A closed ring, such as a polygon boundary is only split into parts if there is more than one split point. If there is only a single split point for a closed ring then the split point becomes the new start/end location and the ring is marked as 'open', which allows either end to be moved independently to each other.

    If the second geometry does not split the first, then the original geometry is returned unsplit.

    • The geometry to split.

    • The geometry that the first geometry should be split by.

    A geometry of the same type as the first geometry, split into multiple parts where possible.

    start_of

    Returns the start point of a simple line geometry.

    • A simple line geometry.

    A simple point geometry located at the start of the line.

    symmetric_difference

    Returns the symmetric difference between two geometries.

    This means any part of the geometries that are in one geometry, but not in both geometries.

    If both geometries are null or both geometries are equal then returns null. If only one geometry is null then returns the non-null geometry.

         Note: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

    • The first geometry.

    • The second geometry (to be XOR'd with the first geometry).

    A geometry equal to geometry1 XOR geometry2.

    symmetric_difference_by_dimension

    Returns the symmetric difference between two geometries, which match the passed in dimensionality.

    This means any part of the geometries that are in one or other geometry but not in both geometries.

    If both geometries are null or both geometries are equal then returns null.

    If only one geometry is null then returns the non-null geometry.

         Note: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

    • The required dimensionality of the result.

      0 - for GeomCombineResultType.POINTS

      1 - for GeomCombineResultType.LINES

      2 - for GeomCombineResultType.AREAS

    • The first geometry.

    • The second geometry (to be XOR'd with the first geometry).

    A geometry equal to geometry1 XOR geometry2.

    true_distance

    Calculates the distance along the surface of the earth between 2 points, taking into account the fact that the earth is not perfectly spherical.

    • The longitude of point 1 in degrees.

    • The latitude of point 1 in degrees.

    • The longitude of point 2 in degrees.

    • The latitude of point 2 in degrees.

    • The earth spheroid model to use. Allowed values are: 1: WGS-84 2: GRS-80 3: Airy (1830) 4: Int'l 1924 5: Clarke (1880) 6: GRS-67.

    The distance along the surface of the earth between the 2 points.

    union

    Returns the union of two or more geometries.

    Any point which lies in any of the input geometries will also lie in the returned geometry.

         Note: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

    • Any geometry.

    • Another geometry to combine with the first.

    • (Optional) Additional geometries to add to the union.

    A geometry equal to the union of all the input geometries.

    union_by_dimension

    Returns the union of two or more geometries, which match the passed in dimensionality.

    Any point which lies in any of the input geometries will also lie in the returned geometry.

         Note: This function does not currently fully support heighted or measured 2D geometries. Any such geometries will be projected down to 2 dimensions.

    • The required dimensionality of the result:

      0 - for GeomCombineResultType.POINTS

      1 - for GeomCombineResultType.LINES

      2 - for GeomCombineResultType.AREAS

    • Any geometry.

    • Another geometry to combine with the first.

    • (Optional) Additional geometries to add to the union.

    A geometry equal to the union of all the input geometries.

    vertices

    Obtains the vertices of a geometry as a Complex Point.

         Note: This function does not currently fully support measured geometries. Any measured geometries will be projected down to 2 dimensions.

    • The geometry to take the vertices from, can be of any type.

    The vertices of the geometry returned as Complex Point, if no vertices are present this geometry will be clear.

    volume

    Returns the volume of a geometry.

    • If the geometry passed is not a solid, then the volume returned will be 0.
    • If it is a complex geometry, the volume returned will be the sum of the volumes of each simple solid in the complex geometry.
    • A geometry.

    The volume of the geometry.

    Identity

    Function Description Parameter(s) Returns

    generate_uuid

    Generates a (version 4) random UUID string in lower-case 8-4-4-4-12 hexadecimal format.

         Example: 125d4167-c85b-43d4-b416-523625244020

    A randomly generated UUID as a String.

    object_source_data_store

    Get the name of the Data store that loaded the object.

    • Input Object

    • (Optional) If true then return the full path and name of the Data Store, if false then just the name of the Data Store.

    String. Null if the object was not read from a Data Store (i.e. it was created by an Action), otherwise the name of the Data Store, or the full path if the second input parameter is true.

    read_sequence

    Read the next value from a sequence in a database. Currently only Oracle databases are supported by this built-in.

    • The database to read the sequence from, specified by a JNDI location (as a string).

    • The sequence name (as a string).

    • (Optional) The schema name, if different from the default (as a string).

    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.

    Paths are returned without a type prefix, for example: "/Production/Mandatory/Water Network/Pipe pressure must match the valve"

    • (Optional) If true, returns the full path and name of the Rule. Otherwise returns the name only.

    The name (default) or path of the Rule.

    Lookup

    Function Description Parameter(s) Returns

    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.

    The value set for the parameter for this Session.

    Mathematical

    Function Description Parameter(s) Returns

    abs

    Returns the absolute value of the parameter passed in.

    If the parameter is negative, it is returned with its sign reversed so that it becomes positive. Otherwise it is returned unchanged.

    • Numerical value to take the absolute value of.

    Absolute value of the parameter - numerical value in the range [0,infinity).

    acos

    Returns the inverse cosine of the parameter passed in in radians.

    The result will be an angle in the range between 0 and pi.

    • A numerical value in the range [-1,1].

    A real value in the range [0,pi].

    asin

    Returns the inverse sine of the parameter passed in.

    The result will be an angle in the range between -pi/2 and pi/2.

    • A numerical value in the range [-1,1].

    A real value in the range [-pi/2,pi/2].

    atan

    Returns the inverse tangent of the parameter passed in.

    The result will be an angle in the range between -pi/2 and pi/2.

    • Any numerical value.

    A real value in the range (-pi/2,pi/2).

    atan2

    Converts Cartesian x and y coordinates to polar coordinates and returns the polar angle, measured counter-clockwise from the positive x-axis.

    The result will be an angle in the range between -pi and pi.

    • The x-coordinate value.

    • The y-coordinate value.

    The resulting angle relative to the x-axis, in the range (-pi,pi].

    ceil

    Rounds a numerical value up to the nearest integer value greater than or equal to the input value.

    • A numerical value.

    The smallest integer value that is not less than the input parameter.

    cos

    Returns the cosine of an angle.

    • A numerical value representing an angle in radians.

    A numerical value in the range [-1,1].

    exp

    Returns the inverse natural logarithm of a number.

    • Any numerical value.

    Euler's number e raised to the power of the input parameter.

    floor

    Rounds a numerical value down to the nearest integer value less than or equal to the input value.

    • A numerical value.

    The largest integer value that is not greater than the input parameter.

    is_NaN

    Test whether a number has the special value "not a number".

    The special numerical value "not a number" results from certain mathematical operations such as dividing 0.0 by 0.0, which cannot be computed.

    • A numerical value to test.

    A boolean value, true if the number has the special value "not a number" and false if it is a valid (finite or infinite) number.

    is_infinite

    Test whether a number is infinite in magnitude.

    • A numerical value to test.

    A boolean value, true if the number is positive or negative infinity and false otherwise.

    log

    Returns the natural logarithm (base e) of a number.

    • A numerical value greater than 0.

    The natural logarithm of that number - a real number in the range (-infinity,infinity).

    log10

    Returns the logarithm to base 10 of a number.

    • A numerical value greater than 0.

    The log to base 10 of that number - a real number in the range (-infinity,infinity).

    max

    Returns the largest of two or more values.

    The values may be either numerical values, booleans or strings. Boolean values are regarded as being equal to either 1 for true or 0 for false. Strings are compared lexicographically. If numbers are compared to strings, they are converted to strings before being compared.

    • A numerical, boolean or string value.

    • Another numerical, boolean or string value.

    • (Optional) Additional numerical, boolean or string values.

    The largest of all the parameters.

    min

    Returns the smallest of two or more values.

    The values may be either numerical, booleans or strings. Boolean values are regarded as being equal to either 1 for true or 0 for false. Strings are compared lexicographically. If numbers are compared to strings, they are converted to strings before being compared.

    • A numerical, boolean or string value.

    • Another numerical, boolean or string value.

    • (Optional) Additional numerical, boolean or string values.

    The smallest of all the parameters.

    pow

    Returns the value of one number, raised to the power of another number.

    • Any numerical value (a).

    • Any numerical value (b).

    The first parameter raised to the power of the second (ab).

    round

    Returns a number rounded to the nearest integer value or to a specified number of decimal places.

    Numbers halfway between two rounding values are rounded up. For example, 23.5 rounds up to 24.

    • A numerical value (a).

    • (0ptional) Number of decimal places to round to (b). If omitted, rounding is to the nearest integer.

    A number equal to floor(a+0.5) or (floor(a*10^b + 0.5))/10^b.

    sin

    Returns the sine of an angle.

    • A numerical value representing an angle in radians.

    A numerical value in the range [-1,1].

    sqrt

    Returns the (positive) square root of a number.

    • A numerical value in the range [0,infinity).

    A numerical value in the range [0,infinity).

    tan

    Returns the tangent of an angle.

    • A numerical value representing an angle in radians.

    A (possibly infinite) numerical value.

    Measured

    Function Description Parameter(s) Returns

    get_measure_maximum

    Returns the maximum measure value of a geometry.

    Measures can be null, so the maximum may be null.

    The maximum value may not necessarily be found at the start/end of the geometry.

    If the argument passed in is null, the value returned will be null.

         Note: If the argument passed in is not a measured geometry, an exception will be thrown.

    • A measured geometry.

    The maximum measure value in the geometry.

    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 argument passed in is null, the value returned will be null.

    If the argument passed in is not a measured geometry, an exception will be thrown.

    • A measured geometry.

    The minimum measure value in the geometry.

    is_measured_line_monotonic_increasing

    If the input geometry is a measured simple line, returns a boolean to indicate whether the measure values are increasing in the digitised direction along its length.

    If the input geometry is a measured complex line, returns a boolean to indicate whether the measured values are increasing across all of the parts in order, as well as whether the values are increasing along the length of each of the parts.

    If the input geometry is not a measured line, an exception will be thrown.

    • A measured line geometry.

    • (Optional) A boolean to indicate if null measure values should be ignored. By default this is set to False and measured values are not ignored.

    A boolean to indicate if the monotonic test passed.

    line_segment_from_measures

    Returns the segment of linework between 2 particular measure values.

    The returned line geometry will be in the direction based on the order of the specified measure values, rather than the geometric order of the input line.

    The start and end of the line segment are located using the same approach as point_from_measure.

    For each point:

    • 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.
    • The tolerance is useful when measure attributes are stored to a different precision than the measures and a measure at the start or end of a line may be evaluate to being off the line by a tiny amount.
    • If the measure value is within tolerance but smaller than the minimum measure, the point with the minimum measure will be returned.
    • If the measure value is within tolerance but greater than the maximum measure, the point with the maximum measure will be returned.
    • If the input geometry is not a measured line, an exception will be thrown.
    • If no vertex on the line has a measure value within tolerance of the provided measure and the measure value lies between two vertices where one or both has a null measure, an exception will be thrown.
    • The measured line geometry.

    • The value of the measure to signify the start point for the output segment.

    • The value of the measure to signify the end point for the output segment.

    • (Optional) The tolerance for measures outside the range . This tolerance is in measurement units. If not specified then the horizontal spatial tolerance will be used, which may not be applicable for the units of the measures.

    A measured line geometry.

    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 input geometry is not a measured line, an exception will be thrown.

    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.

    • A measured line geometry.

    • The location from which the measure will be retrieved. If the input geometry is a simple measured line, the location can be defined as either the nearest point on the line to the specified point or as the 1-based integer index of the vertex within the line. If the input geometry is a complex measured line, the location must be defined as the nearest point on the line.

    The found measure value (double).

    measured_point

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

    • The x-coordinate value of the point.

    • The y-coordinate value of the point.

    • The measure value of the point. May be null.

    A measured point geometry.

    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.

    The tolerance is useful when measure attributes are stored to a different precision than the measures and a measure at the start or end of a line may be evaluated as being off the line by a tiny amount.

    Additional information:

    • If the measure value is within tolerance, but smaller than the minimum measure, the point with the minimum measure will be returned.
    • If the measure value is within tolerance, but greater than the maximum measure, the point with the maximum measure will be returned.
    • If the input geometry is not a measured line, an exception will be thrown.
    • If no vertex on the line has a measure value within tolerance of the provided measure and the measure value lies between two vertices where one or both has a null measure, an exception will be thrown.
    • A measured line geometry.

    • The measure value to find (double)

    • (Optional) The tolerance for the measure being outside the range of measures on the line. This tolerance is in measure units. If not specified then the horizontal spatial tolerance will be used which may not be applicable for the units of the measures.

    A measured point geometry.

    set_measure

    Returns a copy of the input geometry with the measure value set at the specified location.

    This will overwrite any existing measure value at that location.

    Setting a null measure value is supported.

    If the input geometry is not a measured line, an exception will be thrown.

    • A measured geometry.

    • The vertex at which to set the measure. If the input geometry is a simple measured line, the vertex can be defined as either the nearest vertex to the specified point or as the 1-based integer index of the vertex within the line. If the input geometry is a complex measured line, the vertex must be defined by the nearest vertex to the specified point.

    • The measure value to set (double).

    A copy of the input geometry with the measure value set at the specified vertex.

    Placekey

    Function Description Parameter(s) Returns

    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. If some parameters passed in are null or empty string then an attempt to fuzzily match will be made.

         Note: Looks up the placekey.io online API so requires external web access.

    • The Placekey api key to allow access via your Placekey account.

    • An ISO country code as a string, e.g. "US".

    • A postal or zip code e.g. "94102".

    • A Region e.g. "CA".

    • A City e.g. "San Francisco".

    • A Street Address e.g. "1 Dr Carlton B Goodlett Pl".

    • (Optional) A POI or Location name e.g. "San Francisco City Hall".

    The Placekey for a location or null if no match.

    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 a 2D or a 3D point (z values are ignored).

         Note: Looks up the placekey.io online API so requires external web access.

    • The Placekey api key to allow access via your Placekey account.

    • Either: 1) A 2D or 3D point geometry with WGS84 coordinates in lat/lon or 2) the WGS84 longitude (x) as a double value.

    • If parameter 2 is a longitude double value then this parameter must be the latitude (y) as a double value.

    The Placekey for a location or null if no match.

    Shifting

         Note: Shift operations are used to perform Positional Data Shifting (see Positional Data Shifting).

    Function Description Parameter(s) Returns

    shift_geometry

    Shifts a given geometry using the named set of shift vectors.

    A shift vector is a place with a known shift that has already been registered with the named set using the register_shift_vector built-in operation.

    This function must only be called after all of the required shift vectors have been registered with the shift vector set.

    This function will error if the geometry to be shifted is outside of the triangulation created by the shift vectors.

    The output geometry will have the same number of vertices as the input geometry. Only the x and y values of the vertices are affected by the shift, any heights on the vertices will be unchanged.

    • A name to identify a set of shift vectors. Ensure that the name used for the register_shift_vector built-in operation is used here.

    • The geometry to be shifted, can be of any type.

    • (Optional) True to allow vertices within geometric tolerance of the previous vertex to be discarded.

    A shifted version of the geometry. This will be a geometry of the same type as the input geometry with the same number of vertices.

    Sorting

         Note: The tsort_* operations are used to implement iterating through objects in dependency order. Please contact 1Spatial Support for further guidance on their use.

    Function Description Parameter(s) Returns

    tsort_blocked_objects

    List of all the objects added to the topological sort that were blocked (normally because of cyclic dependency constraints).

    • The name of the topological sort. If not provided, or null, the default topological sort will be used.

    List of blocked objects in meaningless, but deterministic, order.

    tsort_blocked_predecessors

    Set of all of the predecessors in a topological sort that are blocked.

    This is normally because they are involved in a cyclic dependency.

    • The successor.

    • The name of the topological sort. If not provided, or null, the default topological sort will be used.

    List of blocked predecessors.

    tsort_blocked_successors

    Set of a topological sort's blocked object's (the predecessor) successors. The successors are also all blocked.

    • The blocked predecessor.

    • The name of the topological sort. If not provided, or null, the default topological sort will be used.

    List of blocked successors.

    tsort_ordered_objects

    List of all the objects added to the topological sort in an order that satisfies the supplied dependency constraints.

    • The name of the topological sort. If not provided, or null, the default topological sort will be used.

    List of objects in order. Will not contain any objects that were blocked (normally because of cyclic dependency constraints).

    String

    Function Description Parameter(s) Returns

    index_of

    Searches in a string for occurrences of another string and returns the 0-based index of the first match found.

    • The string to search.

    • The string to search for.

    • (Optional) The 0-based index in the first string to start the search from. If omitted, the search starts from the beginning of the first string.

    The 0-based index of the start of the first match found or -1 if the string could not be found.

    jaro_winkler_similarity

    Calculates the Jaro-Winkler similarity score between two words.

    It doesn't consider character-specific information, but makes assumptions about typical lengths and the significance of initial matches. It is best suited for short strings such as names.

    The score is normalised such that 0.0 equates to no similarity and 1.0 is an exact match. If both strings are null or empty then they are considered an exact match.

    • Test->Test=1.0
    • Test->Tesst=0.9533333333333333
    • Test->Best=0.8333333333333334
    • Test->Ball=0.0
    • null->""=1.0
    • The first word to compare.

    • The second word to compare.

    • (Optional) Ignore case. If true (default), words are converted to upper case before comparison.

    • (Optional) Length of maximum common prefix in the range 0 to 4. If null default 4 is used.

    • (Optional) Scaling factor in the range 0 to 0.25 indicating how much the score is adjusted upwards for having common prefixes. If null, default 0.1 is used.

    • (Optional) Boost threshold to adjust the Jaro distance with the Winkler modification to give emphasis to common prefixes. If null default 0.7 is used.

    A double representing the Jaro-Winkler similarity score between two words.

    length

    Returns the length of a string.

    • Any string.

    The number of characters in the string.

    levenshtein_distance

    Returns the Levenshtein distance

    (i.e. the difference as an integer) between two strings.

    • The first string.

    • The second string.

    Integer for the difference, 0 if identical.

    re_search

    Performs a regular expression search for a Java-style regular expression inside a string.

    If matches are found, the first matching string (a substring of the first string) is returned. Otherwise null is returned.

    • The string to search in.

    • A string containing the regular expression to search for.

    The matching substring found, or null.

    re_subs_all

    Replaces all occurrences of patterns matching a Java-style regular expression in a string with the specified replacement string.

    • The string to search and replace in.

    • A string containing the regular expression to search for.

    • The replacement string, for each match found for the regular expression.

    The resulting string with all matches for the regular expression replaced with the 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.

    • The string to search and replace in.

    • A string containing the regular expression to search for.

    • The replacement string, for the first match found for the regular expression.

    The resulting string with the first match for the regular expression replaced with the replacement string.

    soundex

    Calculates the soundex code for a given word. The Soundex code was developed to help negate the effects of all the spelling variations that can occur for similar sounding names (Meyer, Meier, Mire, and Smith, Smithe, Smythe, etc.).

    This way, indexers can index records based on a Soundex code (how a surname sounds) and *not* by how it is spelled.

    • The word.

    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.

         Note: Start, end, or double delimiters will return empty strings.

         Example: Tthe central element for 'A,,B' delimited by ',' will be an empty string.

    • The string to be split.

    • The delimiter to use to split the string.

    • (Optional) The zero-based index of the element.

    A collection of strings generated from splitting the string with the delimiter.

    substring

    Returns substring of the input string between the specified character indexes.

    The substring begins at the character specified by the 0-based start index.

    If an end index is specified, the substring ends at the character immediately before this end index. Thus the length of the substring is endIndex-startIndex. If the end index is omitted, the substring goes to the end of the input string.

    • The input string.

    • The 0-based start index specifying where the substring should start.

    • (Optional) The 0-based end index specifying where the substring should end.

    A substring of the input string.

    to_lowercase

    Converts a string to lowercase.

    • The input string.

    A copy of the input string with all characters converted to lowercase.

    to_uppercase

    Converts a string to uppercase.

    • The input string.

    A copy of the input string with all characters converted to capitals.

    trim

    Trim a String of leading and trailing white spaces.

    • (String) - The String to trim, may be null.

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

    Timestamp

    Function Description Parameter(s) Returns

    add_date

    Adds a number of milliseconds to a Timestamp.

    • The Timestamp to increment.

    • The number of milliseconds to add to the Timestamp.

    A new Timestamp.

    current_datetime

    Return the current date and time (Default format is yyyyMMdd). In the following formatting examples the date and time is 20th April 2009 at 12:11:

    • yyyyMMdd will give 20090420
    • yyyy/MM/dd will give 2009/04/20
    • dd/MM/yyyy will give 20/04/2009
    • h:mm a will give 12:11 PM

    The default time zone is always used.

    • (Optional) A string parameter containing the date format.

    The current date and time as a string.

    get_current_date

    Returns the current date and time as a timestamp.

    The current date in the format format yyyy-MM-dd HH:mm:ss.SSS.

    timestamp_to_millis

    Converts the provided timestamp to milliseconds since the epoch.

    • The timestamp to convert to milliseconds.

    Long value representing the milliseconds since the epoch.

    to_timestamp

    Converts a date/time formatted string, or time in milliseconds, into a Timestamp datatype.

    The default date/time format is "yyyy-MM-dd HH:mm:ss.SSS z". For example 2017-03-17 14:25:03 GMT. For more information about the format rules, refer to https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/text/SimpleDateFormat.html.

    The time specified in milliseconds is from January 1, 1970, 00:00:00 GMT.

    • The date/time formatted (String), or time in milliseconds (Long).

    • (Optional) Format of the date/time string. If not specified the default format is used.

    Timestamp datatype.

    Topology

    Function Description Parameter(s) Returns

    is_structured

    Tests whether an object is topologically structured.

    • The object to be tested.

    A boolean value, true if the object is structured and false otherwise.

    Validation

    Function Description Parameter(s) Returns

    rule_hotspot_attributes

         Note: Only relevant when used in an Action within an ActionMap.

    Returns the list of the names of the attributes that caused the non-conformance.

    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.

    A collection of attributes names implicated in the non-conformances of the triggering Rule.

    rule_hotspot_geometry

         Note: 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 non-conformances, inferred from the Rule.

         Example: If a Rule checks that geometries should not intersect, then a non-conformance 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.

    • (Optional) A default value if no hotspots are found. The default value must be geometric.

    A geometry collection 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.

    Web Services

    Function Description Parameter(s) Returns

    base64_decode

    Decode a string from base64.

    • The encoded string to decode.

    A string decoded from base64.

    base64_encode

    Encode a string as base64.

    • The string to encode.

    A string encoded as base64.

    http_request

    Execute HTTP request.

    • The HTTP method to use. Must be one of GET, POST, PUT, or DELETE.

    • The URL to execute the request against.

    • The authorisation for the service or null if no authorisation needed. This sets the value in the 'Authorization' header of the request. For example, "Bearer <token>".

    • A string containing the request body to send. Only used for POST and PUT. Set to null for no body.

    • A string containing the 'Content-Type' to set for the body. Must only be set when a body is also set. Set to null to use the default of 'application/json'.

    • (Optional) Any additional headers to set on the request, of the form KEY=VALUE.

    The request response. Use the http_request_status_code and http_request_body builtins to extract parts of the response.

    http_request_get_response_body

    Returns the body of the HTTP response.

    • The response returned by http_request.

    The body of the HTTP response.

    http_request_get_response_header

    Returns the header value of the HTTP response.

    • The response returned by http_request.

    • The header to retrieve the value from.

    The header value of the HTTP response.

    http_request_get_response_status_code

    Returns the status code of the HTTP response.

    • The response returned by http_request.

    The status code of the HTTP response.

    json_read

    Extract a value from a JSON array or object.

    • The JSON as a string.

    • The key or index to use to extract a value from the JSON structure.

    • (Optional) Any extra keys or indexes to use to further navigate through the JSON structure.

    The JSON value indicated by the provided path through the JSON structure.