斯潘8
斯潘4
空间关系(也称为predicates)定义两个或多个空间要素如何相互作用。
例如,两个功能可能横断彼此(或不是,in which case they are不相交)他们可能touch彼此(在边界相交的地方,but the interiors do not),or one feature might包含a second feature (which itself is therefore在内部第一个功能)。
对FME支持的空间谓词的更完整定义,以及它们的工作方式,可以找到this page of the FME documentation.
在FME中,空间关系是用空间相关器和空间滤波器变压器。
这个空间相关器determines relationships between features,并用定义这些关系的属性标记它们。它将返回现有关系的完整列表。
这个空间滤波器同时确定特征之间的关系;但是,它只测试用户定义的关系列表。Features are then filtered as a pass or fail,取决于它们是否具有所选类型的关系。
The SpatialFilter is the more used of the two transformers because,一般来说,工作区作者知道他们在寻找什么类型的关系,并希望在此基础上加入/过滤数据。
视频即将到来
本例的源数据集是在AutoCADDWG中构建示意图多边形,在ESRI文件地理数据库中构建地址点功能。在FME数据检查器中,如下所示:
This example is a simple QA exercise.Each address ought to fall inside a building and this example builds a workspace to test that spatial relationship and find addresses that are not within a building footprint.
1.启动FME工作台,从一个空画布开始。
从菜单栏中选择“读卡器>添加读卡器”。
将数据格式设置为autodesk autocad dwg/dxf。选择附加的dwg数据作为源数据集。If prompted,仅选择BuildingFootprints层,不是第0层。
2。Again,select Readers > Add Reader from the menubar.
这次将数据格式设置为esri geodatabase(文件geodb open api)。选择附加的地理数据库作为源数据集。提示时,仅选择PostalAddress表,not PostcodeBoundaries.
3.Add a SpatialFilter transformer.
将buildingFootprints连接到spacefilter:filter端口,将postalAddressTable连接到spacefilter:candidate端口。工作区现在将如下所示:
4。打开“空间过滤器参数”对话框。
将要执行参数的测试设置为包含;即我们要检查一个候选(地址点)是否包含在过滤器(构建示意图)中。
将筛选器类型设置为多个过滤器;即有许多建筑足迹需要测试
将通过标准设置为Pass Against One Filter;即each address only has to fall inside a single building,不是所有人!
这些是关键参数;the rest are less important.
5。将检测变压器连接到每个通过和失败的空间滤波器端口。Also connect an Inspector to the BuildingFootprints feature type,所以我们可以在输出中看到。
运行工作区。如果在数据检查器中对通过/失败的功能的样式不同,它们看起来像这样:
We have clearly identified which addresses don't have the correct spatial relationship with building footprints,并且可以通过固定的方式将它们传递给。
?2019安全亚搏在线软件公司|合法的