Matcher
检测彼此匹配的功能。在具有匹配的几何形状,匹配属性值或两者匹配时,将声明要匹配。也可以指定必须在要素之间不同的属性列表。
典型的用途
- 改变检测
- 基于几何形状的特征合并(数据加工)
它是如何工作的?
匹配器可以接收任何数量的输入要素流。将所有功能与所有其他功能进行比较,并根据定义的参数识别匹配。
匹配选项包括几何和/或属性,您还可以定义必须不同的属性。
All features that find a match are output via theMatched端口(即,如果两个特征互相匹配,则它们都在此处输出)。每组匹配都是给出一个新的数字匹配ID属性,可用于将它们标识为匹配组。
每组匹配功能的单个副本被发送到单疫园港口。这些功能的属性被合并到一个输出功能。使用此端口,匹配器能够使用几何作为键进行多重功能合并。这补充了这一点featuremerger.,只接受属性,而不是几何形状,作为键。
找不到匹配的功能通过毫透明港口。
In this example, we have two copies of a zoning dataset. One of them has been updated, with changes made to some zone attributes. The polygons do not have a unique ID that could be used to do a comparison to find the updated zones, so we need to use geometry matching.
Both the original and updated datasets are routed into a Matcher.
Match Geometry被设定为2D(默认设置),和Attribute Matching Strategy是匹配所选属性。We selectZonecategory.as the attribute to compare. This will find polygons that have matching geometry, and check whether or not the attribute has been changed.
匹配的多边形的一个副本通过该多边形输出单疫园输出端口。这些是未更改的记录,如下所示。
Records that were altered would not encounter a match - though the geometry is the same, the attribute we specified is not. These features are output via the毫透明port, shown here in red.
Usage Notes
- The换档板提供一种替代(但较少的一般)方法,对某些应用可能更方便。
- 在仅基于属性的匹配项时,请考虑FeatureJoiner或者featuremerger.为了更好的性能。
Choosing a Feature Joining Method
许多变形金刚基于匹配属性,表达式和/或几何来执行数据加入。选择一个特定的加入任务时,考虑因素包括连接,数据格式,索引,冲突处理和期望结果的复杂性。一些变形金刚使用SQL语法,并直接访问外部数据库。他们可能会或可能不支持列表属性reading and creation.
通常,选择最专用于您需要完成的任务的那个将提供最佳性能结果。如果有多种方式来做(通常是这种情况),则在性能测试备用方法上花费的时间可能是值得的。性能可能会因读取外部表而存在的密钥索引(而不是在工作区中的功能)时变化。
Transformer |
搭配 |
Uses SQL Statements |
Can Create List |
输入类型 |
不table |
Description |
---|---|---|---|---|---|---|
FeatureJoiner | 属性 | 不 | 不 | Features |
|
通过基于公共密钥属性值组合特征的属性和/或几何来连接功能。执行相当于内部,左和完整的SQL连接。 |
featuremerger. | 属性 | 不 | Yes | Features |
|
将一组功能的属性和/或几何合并到另一组特征上,基于匹配的密钥属性值和表达式。 |
listbasedfeaturemerger. | List Attribute to Single Attribute | 不 | Yes | Features |
|
Merges the attributes and/or geometry of one set of features onto another set of features, based on matching列表属性values with key attribute values and expressions. |
inlinequerier | SQL查询 | Yes | 不 | Features |
|
从传入功能创建一组SQLite数据库表,对它们执行SQL查询,并将结果作为特征输出。 |
SQLCreator. | SQL查询 | Yes | 不 | 外部DB. |
|
生成FME功能,从对数据库执行一次SQL查询的结果。为SQL查询结果的每行创建一个FME功能。 |
SQLExecutor. | SQL查询 | Yes | 不 | 外部DB. |
|
针对数据库执行SQL查询。为进入变压器的每个发起功能发出一个查询。查询的启动功能和结果都可以作为特征输出。 |
databasejoiner. | 属性 | 不 | Yes | 外部DB和功能 |
|
基于公共密钥或键,将外部表中的属性从外部表加入到工作区中的功能。不需要SQL知识。非阻塞变压器。 |
Matcher | 几何和/或属性 | 不 | Yes | Features |
|
检测彼此匹配的功能。在具有匹配的几何形状,匹配属性值或两者匹配时,将声明要匹配。也可以指定必须在要素之间不同的属性列表。 如果matching on attributes only (not geometry), using the FeatureMerger or another method will give better performance. |
配置
输入端口
匹配的功能。所有功能都与所有其他功能进行比较。
输出端口
匹配另一个功能的所有功能都将输出到Matched港口。
每组匹配功能的单个副本被发送到单疫园港口。The attributes on these features will be merged onto the single output feature.
所有非匹配功能都被发送到毫透明港口。
Parameters
Match Geometry | Controls whether2D或者3d(或否)几何在声明匹配之前必须相同。FULL确保3D,措施和几何特征所有匹配。 比较光栅几何形状:
When comparing surface and solid geometries:2Dbehaves the same way as3d, that is, Z values will also be compared. When comparing point cloud geometries:
|
Attribute Matching Strategy | In conjunction withSelected Attributes, this parameter controls which attributes of input features must have the same value before a match is declared.
|
Selected Attributes | Applicable whenAttribute Matching Strategy被设定为匹配所选属性或者匹配除选定属性之外的所有属性,并指定要匹配的属性或从匹配中排除的属性,具体取决于所选的匹配策略。 |
必须不同的属性 | 在声明匹配之前,控制输入功能的一部分的属性必须具有不同的值。与正则表达式匹配的所有属性的值都会连接在一起,并与确定匹配相比。 |
Differentiate Empty, Missing, and Null Attributes | 不:空,丢失和空属性将被视为等效。 是的:空,丢失和空属性将被视为成对不同。此参数适用于属性以及几何特征。 |
宽度几何匹配 | 如果Yes, then the order of points in line and area features will be ignored. 将忽略路径和线路之间的构成差异。真正的弧和椭圆与他们的抚摸多边形等同物将忽略聚集体,多边形,甜瓜,路径和所有其他Multis中。比较光栅几何形状时,只比较范围。 |
内部顶点可容差 | 此参数确定内部顶点必须靠近的内容,以便它们被声明匹配。请注意,功能的开始和结束点应小于参数值。也就是说,如果两个顶点分开2米,则参数设置为2,它们将不匹配。此值是可选的。 |
Extra Vertex Tolerance | When geometry is being matched,Extra Vertex Tolerancecan allow for extra vertices along line segments. A value of 0 means that no such extra vertices are permitted. A nonzero value controls how close any extra vertices must be to the line connecting the adjoining matching vertices. |
笔记:For surface and solid geometries,内部顶点可容差和Extra Vertex Tolerance被忽略并假设为0.0。如果如果是,则该变压器不支持输入中的表面或固体宽度几何匹配被设定为Yes。
Match ID Output Attribute | An ID is added to each set of matched features so that it is possible to build a relationship between them if required. |
Match Count Attribute on SingleMatched Output | 如果provided, an attribute with this name will be added to each单疫园output, set to the number of contributing input features. |
Generate List(SingleMatched Only)
When enabled, adds a列表属性to each单疫园output feature, composed of attributes from all matching features.
笔记:List attributesare not accessible from the output schema in Workbench unless they are first processed using a transformer that operates on them, such aslist exploder.或者ListConcateator。所有列表属性转换器都显示在变压器帮助的内容窗格中Lists。Alternatively,attributeexposer.can be used.
单型输出上的列表名称 | Enter a name for the list attribute. |
Add To List | 所有属性:所有属性都将添加到输出功能。 Selected Attributes:Enables the Selected Attributes parameter, where specific attributes may be chosen for inclusion. |
Selected Attributes | 启用时Add To List被设定为Selected Attributes。Specify the attributes you wish to be included. |
Editing Transformer Parameters
使用一组菜单选项,可以通过引用工作区中的其他元素来分配变压器参数。一些变压器也可提供更高级的功能,例如高级编辑器和算术编辑器。要访问这些选项的菜单,请单击除适用的参数旁边。有关更多信息,请参阅Transformer Parameter Menu Options。
定义值
There are several ways to define a value for use in a Transformer. The simplest is to simply type in a value or string, which can include functions of various types such as attribute references, math and string functions, and workspace parameters. There are a number of tools and shortcuts that can assist in constructing values, generally available from the drop-down context menu adjacent to the value field.
Using the Text Editor
文本编辑器提供了一种方便的方法来构建来自各种数据源的文本字符串(包括正则表达式),例如属性,参数和常量,其中结果直接在参数内使用。
使用算术编辑器
算术编辑器提供了一种方便的方法来构建来自各种数据源的数学表达式,例如属性,参数和特征函数,其中结果直接在参数内使用。
条件值
Set values depending on one or more test conditions that either pass or fail.
Parameter Condition Definition Dialog
内容
表达式和字符串可以包括许多函数,字符,参数等 - 是否直接在参数中输入或使用其中一个编辑器构造。
These functions manipulate and format strings. | |
A set of control characters is available in the Text Editor. | |
两个编辑器都有数学函数。 | |
这些运算符可在算术编辑器中使用。 | |
这些主要feature-specific返回值。 | |
FME and workspace-specific parameters may be used. | |
Working with User Parameters | 创建自己的可编辑参数。 |
Reference
Processing Behavior |
|
Feature Holding |
Yes |
Dependencies | 不ne |
FME Licensing Level | FME基本版及以上 |
别名 | |
历史 | |
类别 |
FME Knowledge Center
The FME Knowledge Center is the place for demos, how-tos, articles, FAQs, and more. Get answers to your questions, learn from other users, and suggest, vote, and comment on new features.
搜索all results about the Matcher在FME知识中心。
Examples may contain information licensed under the Open Government Licence – Vancouver