点云表达式评估器
输入端口
此转换器只接受点云功能。
输出端口
计算表达式后的点云。
参数
Specifies the component to be set by the corresponding expression.
指定输出点云中组件的类型。Valid types are Real64,区域32,uint64,UInt32,uint16,UInt8,英特64IT32IM16IT8Auto and Preserve.Auto means that the output type should be automatically determined based on the types used to perform the calculations.保留意味着组件应该与输入点云保持相同的类型。如果输入点云中不存在组件,preserve等同于auto。
描述如何计算相应组件的值的表达式。有关表达式结构的描述,请参阅下面的表达式语法部分。
Expression Syntax
表达式由操作数组合而成,操作员,和括号。例如,一个简单的表达式可能是:
(@component(x)+@component(y)+@component(z))/3.0
此表达式计算X的平均值,y,和Z分量。
操作数之间可以使用空格,操作员,and parentheses as it is ignored by the expression processor.
操作数可以是以下任意一种:
- A component from an input point cloud,例如@分量(Z).请注意,如果组件具有比例/偏移,表达式中将使用组件的“应用”值。
- 一个数值常量,整数或浮点。如果可能的话,数字常量被解释为整数值;otherwise,操作数将被视为浮点数。浮点数可以通过符合ANSI的C编译器接受的任何方式指定,except that "f",“F”"l",大多数安装中不允许使用“L”后缀。例如,以下都是有效的浮点数:2.1,三。,6e4,7.91E+16。
- 属性的值,使用@Value()notation.
- A function whose arguments have any of the above forms for operands,such as@sin(@分量(z)).See the Functions section for a list of defined functions.
下面列出的有效运算符按优先级降序分组:
Function |
说明 |
---|---|
-+~! |
一元减,一元加上,一点也不明智,逻辑不是。 Bit-wise NOT is valid for integer operands only. |
* / % |
Multiply,divide,余款。 Remainder is valid for integer operands only.余数总是与除数具有相同的符号,并且绝对值小于除数。 |
+ - |
加减法。 |
< > |
左、右换档。 仅对整数操作数有效。 |
<><=>= |
无布尔值,更大的,less than or equal,大于或等于。 Each operator produces 1 if the condition is true,否则为0。 |
=!= |
布尔值等于或不等于。 Each operator produces 1 if the condition is true,否则为0。 |
& |
位操作。 仅对整数操作数有效。 |
^ |
位明智的排他或。 仅对整数操作数有效。 |
γ |
有点聪明。 仅对整数操作数有效。 |
& & |
逻辑与。 如果两个操作数都为非零,则生成1结果,否则为0。 |
γ |
逻辑或。 如果两个操作数都为零,则生成0结果,1否则。 |
以下函数可用于表达式。注意,数学函数调用同名的C数学库函数。有关这些函数的作用和参数有效性的详细信息,请参阅库函数的C手册条目。
Function |
说明 |
---|---|
abs(参数) |
Returns the absolute value of arg. |
acos(arg) |
返回arg的弧余弦,在[0,pi]弧度范围内。arg应在范围[-1,1]内。 |
asin(参数) |
返回arg的arc sine,在范围内[-pi/2,pi/2]弧度。arg应在范围[-1,1]内。 |
atan(arg) |
Returns the arc tangent of arg,在范围内[-pi/2,pi/2]弧度。 |
atan2(Y,X) |
返回y/x的反正切值,in the range [-pi,pi] radians.x和y不能都是0。 |
CEIL(参数) |
Returns the smallest integer value not less than arg. |
cos(参数) |
返回arg的余弦值,measured in radians. |
COSH(精氨酸) |
返回arg的双曲余弦。如果结果会导致溢出,返回错误。 |
exp(arg) |
返回arg的指数,defined as e**arg.如果结果会导致溢出,返回错误。 |
floor(arg) |
返回不大于arg的最大整数值。 |
fmod(x,y) |
Returns the floating-point remainder of the division of x by y.如果y为0,返回错误。 |
if(c,x,y) |
如果c为0,则返回x,否则。 |
索引() |
返回点索引。The first point in the point cloud is index 0,the second is index 1,等。 |
日志(arg) |
返回arg的自然对数。Arg must be a positive value. |
log10(参数) |
返回以10为底的arg对数。Arg must be a positive value. |
功率(x,y) |
计算x的值提高到y的幂。如果x为负,y must be an integer value. |
RAND() |
返回介于0和1之间的随机值。 |
罪(arg) |
返回arg的正弦值,measured in radians. |
sinh(arg) |
返回arg的双曲正弦值。如果结果会导致溢出,返回错误。 |
sqrt(参数) |
返回arg的平方根。Arg must be non-negative. |
棕褐色(arg) |
Returns the tangent of arg,measured in radians. |
塔恩(arg) |
Returns the hyperbolic tangent of arg. |
类型和溢出
This transformer attempts to avoid overflows by changing data types through the course of evaluating an expression.例如,如果将两个uint8值相加,内部计算将使用uint16类型进行;这将确保不会溢出。
In general,对整数类型执行算术运算将生成整数类型。除法是一个例外:它总是产生一个浮点结果。Performing an arithmetic operation on floating-point types will always produce a floating-point type.
注意,在不同数据类型之间转换时,a Bounded Cast is used.As a result,when a calculated value does not fit in the destination data type,the corresponding destination value will either be set to the minimum or maximum value possible in the destination data type.
编辑变压器参数
Using a set of menu options,可以通过引用工作区中的其他元素来指定变压器参数。更高级的功能,such as an advanced editor and an arithmetic editor,在一些变压器中也有。To access a menu of these options,click在适用参数旁边。更多信息,看见变压器参数菜单选项.
变压器类别
FME Licensing Level
FME Professional edition and above
FME知识中心搜索:
Search for samples and information about this transformer on theFME知识中心.