Versions Compared

Key

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

Available Mapping 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

Returns the trigonometric cosine of an angle

ACos

Returns the arc cosine of a value

Cosh

Returns the hyperbolic cosine of a double value

Sin

Returns the trigonometric sine of an angle

ASin

Returns the arc sine of a value

Sinh

Returns the hyperbolic sine of a double value

Tan

Returns the trigonometric tangent of an angle

ATan

Returns the arc tangent of a value

ATan2

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

Tanh

Returns the hyperbolic tangent of a double value

Abs

Returns the absolute value of a value

Ceil

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

Floor

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

Round

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

Log

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

Exp

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

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

ToDegree

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

String Functions

SubString

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

Date Functions

Year

Returns the year

Month

Returns the month

Hour

Returns the hour

Minute

Returns the minute

Second

Returns the second

Datatype Functions

DoubleToShort

Converts the given double value to a short value

DoubleToByte

Converts the given double value to a byte value

DoubleToFloat

Converts the given double value to a float value

DoubleToLong

Converts the given double value to a long value

ToShort

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

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

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

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.

 

Optional MEP functions

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

Spatial Functions (Spatial Feature)

 

Spatial Grid Functions (Spatial Grid Feature)

MoveViewPoint

RotateViewPoint

ToGrid

SubGrid

RotateGrid

SpreadOccupancyGrid

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

MergeOccupancyGrid

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

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

 

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

Table of ContentsmaxLevel3outlinetrue

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.

Children Display