FME Feature Functions
FME Feature Functions return a numeric value and can be used in expressions, where supported.
![Closed](http://www.baooytra.com/docs/fme/2016.0/html/FME_Desktop_Documentation/FME_Transformers/Skins/Default/Stylesheets/Images/transparent.gif)
Aborts the translation and outputs a specified message.
This function is the equivalent of theTerminatortransformer.
Syntax
@Abort(<消息>)
Arguments
<信息>
当翻译中止的消息字符串输出。
![Closed](http://www.baooytra.com/docs/fme/2016.0/html/FME_Desktop_Documentation/FME_Transformers/Skins/Default/Stylesheets/Images/transparent.gif)
Calculates the area of a polygonal feature. The function correctly handles both polygonal features and polygonal features with holes. For point and linear features, 0 is returned.
Syntax
@area([[(SLOPED_AREAS | VOLUME),] <乘数>])
Arguments
<乘法器>
By default, the area returned is in coordinate units squared. The multiplier, if specified, can be used to convert to other units. For example,(@Area()*10.764)
could be used to calculate the area of a feature in a coordinate system with meters as the units, to a result in square feet. The default is 1.
Range: Real Number
SLOPED_AREAS
计算平面多边形或面部相对于所述平面的面积。
VOLUME
Calculates the volume of the solid (not the area).
![Closed](http://www.baooytra.com/docs/fme/2016.0/html/FME_Desktop_Documentation/FME_Transformers/Skins/Default/Stylesheets/Images/transparent.gif)
Returns the coordinate system of features.
Syntax
@CoordSys()
![Closed](http://www.baooytra.com/docs/fme/2016.0/html/FME_Desktop_Documentation/FME_Transformers/Skins/Default/Stylesheets/Images/transparent.gif)
Generates unique numbers and assigns them to feature attributes during a translation. Because it outputs the final counts in each of the domains to the log file, this function can also be used to count features that matched the correlation lines. In this case, the log file records the total number of times the function was invoked, even though its result was not stored in any attribute.
Syntax
@count([<域> [,
Arguments
A counter name. Each time @Count is invoked, it returns and increments the count associated with the domain name. This allows many different counters to be used during a single translation. For example, unique line numbers starting at 0 can be assigned to all lines by invoking@count(lineCounter)
。During the same run, unique polygon numbers starting at 0 can be assigned to all polygons by using@Count(polygonCounter)
。如果未指定此参数,假设默认域。
Range: Any String
The starting value of the counter. The counter is incremented from the start value. This is useful for applications where ranges of values have meanings in the problem domain.
Range: Any Integer
<模>
The modulo value of the counter. The counter returns a value between zero and @Lookup
function.
Range: Any Integer
NO_LOG
Prevents FME from logging this domain.
Configuration
The @Count function accepts the following configuration line:
Count MAX_TO_LOG
If this configuration line is not present, a maximum of 50 count domains are logged by default.
<数字>
Integer >= -1
Sets the maximum number of count domains that are logged. If -1 is specified, all count domains are logged.
![Closed](http://www.baooytra.com/docs/fme/2016.0/html/FME_Desktop_Documentation/FME_Transformers/Skins/Default/Stylesheets/Images/transparent.gif)
Returns the dimension of the feature as either 2 or 3. If no parameters are specified, the dimensions of the feature are returned. If 2 or 3 is specified as a parameter, the function forces the feature to that dimension and returns the new dimension of the feature.
Syntax
@Dimension([(<尺寸>)])
Arguments
以该功能将被迫尺寸。
Range: (2|3)
![Closed](http://www.baooytra.com/docs/fme/2016.0/html/FME_Desktop_Documentation/FME_Transformers/Skins/Default/Stylesheets/Images/transparent.gif)
Uses Tcl to evaluate a mathematical expression and returns the result.
Syntax
@Evaluate(
![Closed](http://www.baooytra.com/docs/fme/2016.0/html/FME_Desktop_Documentation/FME_Transformers/Skins/Default/Stylesheets/Images/transparent.gif)
Returns the geometry type of the feature as a string.
Syntax
@GeometryType()
![Closed](http://www.baooytra.com/docs/fme/2016.0/html/FME_Desktop_Documentation/FME_Transformers/Skins/Default/Stylesheets/Images/transparent.gif)
Calculates the length of features. For polygonal features, the length is equal to the sum of its perimeter and the perimeter of any holes within it.
Syntax
@Length([<维度> [,<乘数>]])
@Length(TO_POINT,
@Length(ALL_LENGTHS[,
@Length(ALL_LENGTHS_AS_MEASURES,
[,
Arguments
指定在长度计算的第三尺寸是否被使用。默认值是2,这意味着仅在计算中所使用的x和y坐标。如果指定了3和特征仅具有2个维度,没有错误被标记,并且长度将在2个可用维度来计算。
If the first argument is TO_POINT, this argument is required.
Range: 2|3
<乘法器>
By default, the length returned is in ground units. The multiplier, if specified, can be used to convert to other units. The default is 1.
Range: Real Number
TO_POINT
If the first argument is TO_POINT, the function calculates the length of a feature up to the vertex specified by
的x坐标的顶点到其中长度来计算的。如果使用第一个参数是TO_POINT。
Range: Real Number
的y坐标的顶点到其中长度来计算的。如果使用第一个参数是TO_POINT。
Range: Real Number
The z coordinate for the vertex up to which the length is to be calculated. Used if the first argument is TO_POINT.
Range: Real Number
ALL_LENGTHS
If the first argument is ALL_LENGTHS, the function returns a comma-separated list of values, in which each value is the distance from the start of the feature up to that vertex in the feature.
对于example, a feature has 4 points: A,B,C and D.
AB,BC和CD是连续的两个顶点之间的距离:
If AB = 1, BC = 2, and CD = 3, the value returned by the function is 0,1,3,6.
ALL_LENGTHS_AS_MEASURES
如果第一个参数是ALL_LENGTHS_AS_MEASURES,函数计算值与ALL_LENGTHS选项,但这些被设定为在几何本身的度量。新措施的名称可以由<测量名称>参数进行说明。
Specifies the name of the measure to set. If left blank or omitted, the default measure is set.
范围:字符串
Examples
本实施例中计算特征的一个坐标系中的长度米为单元,以获得在脚的结果:
(@Length()*3.2808)
![Closed](http://www.baooytra.com/docs/fme/2016.0/html/FME_Desktop_Documentation/FME_Transformers/Skins/Default/Stylesheets/Images/transparent.gif)
Returns the number of coordinates that define the feature’s geometry.
Syntax
@NumCoords([FLATTEN_AGGREGATE])
Arguments
FLATTEN_AGGREGATE
In the case of multi-part or aggregate features, this flag ensures that the actual number of coordinates are returned for the aggregate feature, instead of the actual storage used for the feature. (An aggregate feature may use more storage space than the actual coordinates of the feature.)
坐标的数量与FLATTEN_AGGREGATE排除返回的任何内部FME元信息。
![Closed](http://www.baooytra.com/docs/fme/2016.0/html/FME_Desktop_Documentation/FME_Transformers/Skins/Default/Stylesheets/Images/transparent.gif)
Returns the current time in the specified format.
Syntax
@Timestamp(
Arguments
The format in which to return the time.
^a |
The abbreviated weekday name according to the current locale. |
^A |
根据当前语言环境的完整周日名称。 |
^b |
The abbreviated month name according to the current locale. |
^B |
The full month name according to the current locale. |
^c |
优选的日期和时间表示为当前区域。 |
^d |
The day of the month as a decimal number ranging from 00 to 31. Note:需要注意的是,当该月的天小于10,如果你想抑制前导零,输入^#d前导零将被添加。 |
^H |
The hour as a decimal number using a 24-hour clock ranging from |
^I |
时针作为使用12小时时钟从一个十进制数 |
道^ J |
今年的日子as a decimal number ranging from 001 to 366. |
^ M |
月为十进制数从00到12。 Note:注意,当一个月小于10,如果你想抑制前导零,输入^#m的前导零将被添加。 |
^M |
The minute as a decimal number. |
^ p |
无论是上午或下午根据给定的时间值,或对于当前区域对应的字符串。 |
^S |
The second as a decimal number. |
2 -S | Seconds from epoch. |
^U |
The week number of the current year as a decimal number, starting with the first Sunday as the first day of the first week. |
^W |
The week number of the current year as a decimal number, starting with the first Monday as the first day of the first week. |
^ w ^ |
The day of the week as a decimal, with Sunday being 0. |
^ X |
The preferred date representation for the current locale without the time. |
^X |
The preferred time representation for the current locale without the date. |
^ÿ |
The year as a decimal number without a century ranging from 00 to 99. |
^Y |
The year as a decimal number including the century. |
^Z |
The time zone or name or abbreviation. |
![Closed](http://www.baooytra.com/docs/fme/2016.0/html/FME_Desktop_Documentation/FME_Transformers/Skins/Default/Stylesheets/Images/transparent.gif)
Creates and returns a new Universally Unique Identifier (UUID) for the feature.
Syntax
@UUID()
![Closed](http://www.baooytra.com/docs/fme/2016.0/html/FME_Desktop_Documentation/FME_Transformers/Skins/Default/Stylesheets/Images/transparent.gif)
Returns the value of the specified input attributeattr
。
Syntax
@value(STRING ATTR)
![Closed](http://www.baooytra.com/docs/fme/2016.0/html/FME_Desktop_Documentation/FME_Transformers/Skins/Default/Stylesheets/Images/transparent.gif)
这个函数可用于无论是作为特征功能或属性值的功能。当作为特征函数中使用,@XValue存储指定的值作为x的特征的坐标。
When used as an attribute value function, @XValue returns the value of the first x coordinate of the feature. This value is then stored in the attribute.
@XValue()
should generally be used in conjunction with@YValue()
。If@XValue()
is used on its own, it is possible to create a feature with a different number of X and Y values.
Syntax
@XValue([()][, Reset])
Arguments
The value of the x coordinate stored in the feature. When used as a feature function, this parameter must be specified. When used as an attribute value function, this parameter is not specified.
Range: Real Number
包含坐标列表属性的名称将被存储在特征。列表中的所有值都为坐标的功能提供的;每个坐标以相同的方式作为一个单一的值被提供。
Range: attribute name containing {} exactly once.
, Reset
指定的坐标of the feature are cleared before the x value is added. If not specified, then the x value is added to the current feature's geometry, either extending a line if the feature was linear or creating a Point-In-Polygon feature out of a polygonal feature.
![Closed](http://www.baooytra.com/docs/fme/2016.0/html/FME_Desktop_Documentation/FME_Transformers/Skins/Default/Stylesheets/Images/transparent.gif)
这个函数可用于无论是作为特征功能或属性值的功能。When used as a feature function, @YValue stores the specified value as the y coordinate of the feature.
当作为一个属性值函数中使用,@YValue返回第一y的值的特征的坐标。然后,该值被存储在所述属性。
@YValue()
should generally be used in conjunction with@XValue()
。If@YValue()
is used on its own, it is possible to create a feature with a different number of X and Y values.
Syntax
@YValue([()])
Arguments
在y坐标的值存储在特征。当作为一个功能函数中使用,这个参数必须指定。当作为一个属性值函数所使用的,未指定该参数。
Range: Real Number
包含坐标列表属性的名称将被存储在特征。列表中的所有值都为坐标的功能提供的;每个坐标以相同的方式作为一个单一的值被提供。
Range: attribute name containing {} exactly once.
![Closed](http://www.baooytra.com/docs/fme/2016.0/html/FME_Desktop_Documentation/FME_Transformers/Skins/Default/Stylesheets/Images/transparent.gif)
这个函数可用于无论是作为特征功能或属性值的功能。当作为特征函数中使用,@ZValue存储指定的值作为z中的特征的坐标。如果该功能包含多个坐标,那么所有的坐标设置为指定的Z值。
When used as an attribute value function, @ZValue returns the value of the first z coordinate of the feature. This value is then stored in the attribute.
@ZValue()
should generally be used in conjunction with@XValue
and@YValue()
。If@ZValue()
对自己使用,也可以创建一个功能,以不同数量的X,Y和Z值的。
Syntax
@ZValue([(
Arguments
The value of the z coordinate stored in the feature. When used as a feature function, this parameter must be specified. When used as an attribute value function, this parameter is not specified.
Range: Real Number
包含坐标列表属性的名称将被存储在特征。All the values in the list are supplied as successive coordinates to the feature.
Range: attribute name containing {} exactly once.