Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Available Functions

Odysseus provides a wide range of functions and operators to be used for data transformation and filtering in a Map, Select, or Join operator.

Mathematic Functions

Cos(X)

Returns the trigonometric cosine of an angle

ACos(X)

Returns the arc cosine of a value

Cosh(X)

Returns the hyperbolic cosine of a double value

Sin(X)

Returns the trigonometric sine of an angle

ASin(X)

Returns the arc sine of a value

Sinh(X)

Returns the hyperbolic sine of a double value

Tan(X)

Returns the trigonometric tangent of an angle

ATan(X)

Returns the arc tangent of a value

ATan2(Y,X)

Returns the angle theta from the conversion of rectangular coordinates (x, y) to polar coordinates (r, theta)

Tanh(X)

Returns the hyperbolic tangent of a double value

Abs(X)

Returns the absolute value of a value

Sqrt(X)

Returns the square root of a value

Ceil(X)

Returns the smallest value that is greater than or equal to the argument and is equal to a mathematical integer.

Floor(X)

Returns the largest value that is less than or equal to the argument and is equal to a mathematical integer.

Round(X)

Returns the closest number to the argument, with ties rounding up

Log(X)

Returns the natural logarithm (base e) of a double value

Exp(X)

Returns Euler's number e raised to the power of a double value

PI()

Returns the double value that is closer than any other to pi.

E()

Returns the double value that is closer than any other to e

ToRadian(X)

Converts an angle measured in degrees to an equivalent angle measured in radians.

ToDegree(X)

Converts an angle measured in radians to an equivalent angle measured in degrees.

String Functions

SubString(String, Begin, End)

Returns a new string that is a substring of the value with given begin and end index

Length(String)

Returns the length of a string.

Upper(String)

Returns the string converted to uppercase.

Lower(String)

Returns the string converted to lowercase.

Date Functions

Year(Date)

Extracts the year part of the date

Month(Date)

Extracts the month part of the date

Week(Date)

Returns the week number of the date

Day(Date)

Extracts the day part of the date

Hour(Date)

Returns the hour of the date

Minute(Date)

Returns the minute of the date

Second(Date)

Returns the second of the date

CurDate()

Return the current system time specific date

Now()

Returns the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC

NanoTime()

Returns the current value of the time source, in nanoseconds.

Datatype Functions

DoubleToShort(X)

Converts the given double value to a short value

DoubleToByte(X)

Converts the given double value to a byte value

DoubleToFloat(X)

Converts the given double value to a float value

DoubleToLong(X)

Converts the given double value to a long value

ToShort(X)

Converts the given value to a short value. This function converts any value to a short value, thus it is more time consuming than the DoubleToShort function for double values.

ToByte(X)

Converts the given value to a byte value. This function converts any value to a byte value, thus it is more time consuming than the DoubleToByte function for double values.

ToFloat(X)

Converts the given value to a float value. This function converts any value to a float value, thus it is more time consuming than the DoubleToFloat function for double values.

ToLong(X)

Converts the given value to a long value. This function converts any value to a long value, thus it is more time consuming than the DoubleToLong function for double values.

Encryption Functions

MD5(String)

Calculates an MD5 checksum for the string.

SHA1(String)

Calculates an SHA-1 checksum for the string.

SHA256(String)

Calculates an SHA-265 checksum for the string.

Miscellaneous Functions

UUID()

Returns a Universal Unique Identifier (UUID).

Optional Functions

The following MEP functions are not part of the Odysseus Core and may be restricted.

Spatial Functions (Spatial Feature)

AsCartesianCoordinates(SpatialPolarCoordinate[])

Transform the list of spatial polar coordinates into a list of Cartesian coordinates

AsGeometry(Geometry)

AsGeometryCollection(Geometry)

AsLineString(Geometry)

AsMultiLineString(Geometry)

AsMultiPoint(Geometry)

AsMultiPolygon(Geometry)

AsPoint(Geometry)

AsPolarCoordinates()

FromWKT()

GetCentroid(Geometry)

Returns the centroid of the given geometry

SpatialBuffer(Geometry, Double)

Creates a buffer of the given size around the given geometry

SpatialContains(Geometry, Geometry)

Checks whether the first geometry contains the second geometry.

SpatialConvexHull(Geometry)

Computes the smallest convex spatial polygon that contains all the points in the geometry

SpatialCoveredBy(Geometry, Geometry)

SpatialCovers(Geometry, Geometry)

SpatialCrosses(Geometry, Geometry)

SpatialDisjoint(Geometry, Geometry)

SpatialEquals(Geometry, Geometry)

SpatialIntersection(Geometry, Geometry)

SpatialIsLine(Geometry)

SpatialIsPolygon(Geometry)

SpatialIsWithinDistance(Geometry, Double)

SpatialTouches(Geometry, Geometry)

SpatialUnion(Geometry, Geometry)

SpatialUnionBuffer(Geometry, Geometry, Geometry)

SpatialWithin(Geometry, Geometry)

ST_SetSRID(Geometry, Integer)

ST_Transform(Geometry, Integer)

ToCartesianCoordinate(SpatialPolarCoordinate)

Transforms the given spatial polar coordinate into a spatial Cartesian coordinate.

ToPolarCoordinate(SpatialCoordinate)

Transforms the given spatial Cartesian coordinate into a polar coordinate

Spatial Grid Functions (Spatial Grid Feature)

MoveViewPoint(Geometry, Coordinate)

 The MoveViewPoint has 2 parameter: A geometry and the new origin of the new view point.

RotateViewPoint(Geometry, Double)

 The RotateViewPoint has 2 parameter: A geometry and the rotation angle in radians for the new view point.

ToGrid(Geometry, Coordinate, Integer, Integer, Double)

The ToGrid function has 5 parameter: A geometry defining the free  and occupied area, the origin of the grid, the width and height of the grid in cells, and the size of a cell.

SubGrid(Grid, Coordinate)

RotateGrid(Grid, Double)

 The RotateGrid has 2 parameter: A grid and the rotation angle in radians. The result is the rotated grid.

SpreadOccupancyGrid(Grid, Timestamp, Timestamp, Double)

The SpreadOccupancyGrid function takes 4 parameters: A cartesian grid, the timestamp of the grid, the current timestamp, and the velocity of objects in the environment.

MergeOccupancyGrid(Grid, PolarCoordinate[], Origin, Double, Double, Integer)

The MergOccupancyGrid function takes 6 parameters: A cartesian grid, the polar coordinates, the origin, the transform angle, the polar radius, and the polar cellsize.

 

Probabilistic Functions (Probabilistic Feature)

MVN(Distribution, Lower Limit, Upper Limit)

Estimates the multivariate normal distribution probability with lower and upper integration limit.

 

Most function descriptions on this page are copied from the openjdk documentation.

your query statements. In Odysseus-Studio there is a view MEP Functions View, that lists all current available operators and functions.

Attentation: For most numeric operators the result is a floating value. This will be fixed in future versions.

Basic Operators

Mathematical Operators; +,-,/,*, % (modulo), ^ (power)

Logical Operators: && (and), || (or), !(not), xor

Compare Operators: !=, = or ==, <=, >=

Functions and operators in CQL

If you prefer CQL you can use these functions and operators in your Select clause for data transformation or in the Where clause for filtering:

Code Block
languagesql
titleExample
SELECT tan(x) FROM stream WHERE sqrt(y)>3

Functions and operators in PQL

If you prefer PQL you can use these functions and operators in the MAP, JOIN, and SELECT operator. In addition, functions and operators can be used in other operators that are not part of the set of relational operators.

Code Block
languagejs
titleExample
output = MAP({expressions = ['tan(x)']}, SELECT({predicate = RelationalPredicate('sqrt(y)>3')}, stream))


Some of the functions and operators are part of the Odysseus Core and some are available in additional features. On the following child pages you find all currently available functions and operators with their description and examples.

true
Children Display
Table of Contents
maxLevel3
outline