span8
span4
A duplicate feature (in spatial terms) is one whose geometry is an exact match for that of another feature in the 亚搏在线workflow.当同一个功能意外提交两次到数据库时,可能会发生这种情况,或者当两个(或更多)重叠的数据集合并在一起时。
许多FME变压器可以识别重复的特征,but some transformers - or combinations of transformers - will be much more efficient than others.
一般来说,crcCalculator更高效(因为比较只在两个不同的数字字符串之间进行,not full geometry) especially when CRC values are stored with the data and so don't need recreating each time.
然而,匹配器更适合更复杂的几何体(如具有纹理的几何体)。为了比较坐标系,以及以不同方式匹配空属性或缺少的属性。
In these two examples,我们将首先使用matcher转换器来识别重复的特性,然后将crcCalculator与matcher结合使用。
Duplicate Features 2: Workspace as a Template
源数据是一个mapinfo选项卡文件,包含温哥华市内的公园:
地图瓦片 Stamen Design,在下面 CC-BY3.0.Data by OpenStreetMap,在下面 CC-BY-SA.
Let's assume there are duplicate park features (with the same,rather than a different ID number) and we need to find,count,并删除重复项。
Follow these steps to learn how to locate duplicate features with a Matcher transformer.
1。Start FME Workbench and begin with an empty canvas.Select Readers > Add Reader from the menubar.
将数据格式设置为“地图信息”选项卡(MITAB)。Select the attached MapInfo dataset as the source and click OK to add the reader.
2.Add a Matcher transformer and connect it to reader feature type.In the Matcher transformer parameters,set:
Optionally also set:
三。Connect Inspector transformers to each of the Matcher output ports:
Run the workspace.
Features without a match will exit from the NotMatched port.
Features that exit the SingleMatched port are a single instance of duplicate records.退出匹配端口的功能是重复记录的所有实例。
If the Attribute Matching parameters are set,那么复制将是ID和几何体,otherwise it will only be matching geometry.
4.在匹配器的匹配输出端口中添加一个统计计算器转换器。Set the parameters to:
To simply get a number of duplicate features,connect the Summary output port to the Inspector.To keep all duplicate features for inspection,connect the Complete output port.
5.Run the workspace.Inspect the different outputs,一定要查找NumberOfDuplicates属性。This attribute denotes how many duplicate features exist in the dataset.
6。The usual fix for duplicate features is to simply discard the duplicates,keeping one copy of them.With the Matcher transformer this means keeping the NotMatched and SingleMatched outputs.
所以,也可以选择将一个编写器以您选择的格式添加到工作区。Connect the NotMatched and SingleMatched outputs to a writer feature type,while leaving the Matched port unconnected,or connected only to an Inspector or Logger transformer:
Follow these steps to learn how to locate duplicate features with a Matcher transformer.
1。Start FME Workbench and begin with an empty canvas.Select Readers > Add Reader from the menubar.
将数据格式设置为“地图信息”选项卡(MITAB)。Select the attached MapInfo dataset as the source and click OK to add the reader.
2.添加一个CrcCalculator转换器并将其连接到读卡器功能类型。In the CRCCalculator transformer parameters,set:
Optionally add an Inspector transformer and run the workspace.检查每个特征的计算CRC值。
三。Add a Matcher transformer and connect it to CRCCalculator output port:
In the Matcher transformer parameters,set:
将inspector transformers连接到每个matcher输出端口并运行工作区。
As before,features without a match will exit from the NotMatched port.
Features that exit the SingleMatched port are a single instance of duplicate records.退出匹配端口的功能是重复记录的所有实例。
4.在匹配器的匹配输出端口中添加一个统计计算器转换器。Set the parameters to:
To simply get a number of duplicate features,connect the Summary output port to the Inspector.To keep all duplicate features for inspection,connect the Complete output port.
5.Run the workspace.Inspect the different outputs,一定要查找NumberOfDuplicates属性。This attribute denotes how many duplicate features exist in the dataset.
6。The usual fix for duplicate features is to simply discard the duplicates,keeping one copy of them.With the Matcher transformer this means keeping the NotMatched and SingleMatched outputs.
所以,也可以选择将一个编写器以您选择的格式添加到工作区。Connect the NotMatched and SingleMatched outputs to a writer feature type,while leaving the Matched port unconnected,or connected only to an Inspector or Logger transformer:
这里使用的数据来源于温哥华市提供的开放数据,不列颠哥伦比亚(数据.couver.ca)It contains information licensed under the Open Government License - Vancouver.
Data QA: Identifying Self-Intersections with FME
Data QA: Identifying Duplicate Attribute Values
Data QA: Identifying Spikes and Outliers with FME
Data QA: Identifying Bad Topology in Linear Networks
Data QA: Identifying Non-Consecutive Duplicate Vertices with FME
Data QA: Identifying Small Polygon Features
Data QA: Identifying Consecutive Duplicate Vertices with FME
Data QA: Identifying Features Closer than a Minimum Distance
© 2019 亚搏在线Safe Software Inc |Legal