练习2 | 噪声控制立法计划 |
数据 | 地址(文件地理数据库) 区划(MapInfo的TAB) 道路(AutoCAD的DWG) |
总体目标 | 要查找50米范围内的干线公路的所有住宅地址 |
演示 | 有条件的过滤方法 |
启动工作区 | 没有 |
结束工作区 | C:\ FMEData2016 \工作区\ DesktopBasic \变形金刚练习2 - Complete.fmw |
City councillors have voted to amend noise control laws.However, local residents living in a single-family residence within 50 metres of a major highway must be contacted to inform them of these changes.
You have been recommended by your manager to take on the task of finding all affected addresses.There's a tight deadline and at least three city councillors are standing watching you work.The pressure is on and it's up to you to deliver!
1)启动工作台
Start Workbench and create a new empty workspace.
2)新增阅读器(道路数据)
Use Readers > Add Reader to add a Reader for the roads data.The roads data will be used to determine distance from an arterial route.
阅读器格式 | 欧特克AutoCAD的DWG / DXF |
读者数据集 | C:\ FMEData2016 \ DATA \运输\ Roads.dwg |
When prompted, select only the feature type (layer) called Arterial.
3)加入读取器(分区数据)
Use Readers > Add Reader to add a reader for zoning data.The zoning data will be used to determine whether an address is single-family residential or not.
阅读器格式 | MapInfo的TAB(MITAB) |
读者数据集 | C:\ FMEData2016 \ DATA \分区\ Zones.tab |
4)新增阅读器(地址数据)
Use Readers > Add Reader to add a reader for address data:
阅读器格式 | ESRI地理数据库(文件地理数据库API) |
读者数据集 | C:\ FMEData2016 \ DATA \地址\ Addresses.gdb |
阅读器参数 | 表列表:的PostalAddress |
Ensure the feature types on the canvas are laid out in the order Arterial - Zones - PostalAddress;the workspace will now look like this:
Feel free to inspect all of the source data to familiarize yourself with the contents.
5)加入测试仪变压器
Add a Tester transformer to the Zoning feature type.
This Tester will be used to filter residential zones from the other zoning areas.所有的单户住宅区域将会以RS开始,所以测试仪应设置如下:
最重要的是要建立使用“开头是”谓语测试。
矢量小姐说... |
所以...为什么测试?为什么不使用AttributeFilter?你知道吗? |
6)加入SpatialFilter
一个SpatialFilter变压器添加到工作区。这将被用来测试每个地址显示地址是否里面的过滤住宅区的一个下降。
- 过去的输出到SpatialFilter:将测试仪连接器端口
- 要素类型的PostalAddress连接到SpatialFilter:备选端口
7)设置SpatialFilter
打开SpatialFilter参数对话框。设置参数。
要执行的测试应设置为“包含”(即查找地址,该区域包含)。过滤器类型应设置为多个过滤器(因为有多个分区的区域)。然而,通过标准参数应该是“通过打击一个过滤器。”
此参数非常重要。如果没有正确设置它会导致测试失败,作为一个单一的地址不能在所有区域。
8)添加督察
现在让我们来测试一下我们这么远。添加督察既SpatialFilter输出端口,以及测试:已通过端口。
9)保存和运行工作区
保存工作区。运行工作区。检查输出,以证明它曾作为预期。唯一的区域特征将是居民区,并SpatialFilter:合格(地址)功能将落在这些区域内。
10)添加Bufferer
现在,我们可以判断该过滤地址落在50米内动脉途径。
该SpatialFilter没有一个测试为“X距离内”,因此我们必须要集合起来有点不同。一个Bufferer变压器添加到工作区。它连接到动脉roadsdata:
现在打开了Bufferer参数对话框。设置缓冲量为50。
0.1更新 |
在上面的截图中Bufferer变压器获得了
|
小费 |
您也可以选择在Bufferer之后添加的溶解变压器,合并所有的缓冲功能一起。 翻译的结果将是相同的(在选定的地址而言),但该数据会更好看在FME数据检查。 |
11)添加SpatialFilter
添加第二个SpatialFilter变压器。缓冲的动脉航线的滤波器。预过滤地址是考生:
和以前一样,打开参数对话框并更改设置成为“包含”对多个过滤器测试。
12)运行工作空间
附加一些检查变压器向您展示从各种变压器的输出。保存并运行该工作区。输出(在放大)应该是这样的:
的瓷砖礼貌MapQuest的
恭喜 |
通过完成这个练习中,你已经学会了如何:
|