span8
span4
Spatial relationships (also known as谓语) define how two or more spatial features interact with each other.
For example,two features mightintersecteach other (or not,如果是这样的话disjoint),they might触摸each other (where the boundaries intersect,但是内部没有,或一个特征可能contain第二个特征(因此withinthe first feature).
A more complete definition of the spatial predicates supported by FME,and how they work,can be found onFME文件的本页.
In FME,spatial relationships are calculated with theSpatialRelatorandSpatialFiltertransformers.
TheSpatialRelator确定功能之间的关系,and tags them with attributes that define those relationships.It will return a full list of relationships that exist.
TheSpatialFilteralso determines relationships between features;however it only tests for a user-defined list of relationships.然后将特征过滤为通过或失败,depending on whether they possess a relationship of the type selected.
空间滤波器更常用于两个变压器,因为,in general,the workspace author knows what type of relationship they are looking for and wants to join/filter data on that basis.
Video to come
The source datasets for this example are building footprint polygons in AutoCAD DWG and address point features in an Esri File Geodatabase.In the FME Data Inspector it looks like this:
这个例子是一个简单的QA练习。每个地址都应该位于一个建筑内,这个示例构建一个工作空间来测试空间关系,并找到不在建筑足迹内的地址。
1。Start FME Workbench and begin with an empty canvas.
Select Readers > Add Reader from the menubar.
Set the data format to Autodesk AutoCAD DWG/DXF.Select the attached DWG data as the source dataset.如果提示,select only the BuildingFootprints layer,not layer 0.
2.再一次,从菜单栏中选择“读卡器>添加读卡器”。
This time set the data format to Esri Geodatabase (File Geodb Open API).Select the attached Geodatabase as the source dataset.When prompted,select only the PostalAddress table,不是后备债券。
三。添加空间滤波器变压器。
Connect the BuildingFootprints to the SpatialFilter:Filter port and the PostalAddressTable to the SpatialFilter:Candidate port.The workspace will now look like this:
4.Open the SpatialFilter parameters dialog.
Set the Tests to Perform parameter toContains;i.e.we want to check if a candidate (the address points) is contained within a filter (building footprints).
Set the Filter Type toMultiple Filters;i.e.there are many building footprints to test against
Set the Pass Criteria to通过一个过滤器;i.e.每个地址只能落在一个建筑物内,not all of them!
Those are the key parameters;剩下的就不那么重要了。
5.Connect an Inspector transformer to each of the SpatialFilter Passed and Failed ports.还可以将检查器连接到BuildingFootprints功能类型,so we can see that in the output.
Run the workspace.If you style the passed/failed features differently in the Data Inspector,they will look like this:
我们已经清楚地确定了哪些地址与建筑足迹之间没有正确的空间关系,and can pass them on to by fixed.
© 2019 亚搏在线Safe Software Inc |Legal