span8
span4
This article is also part of the tutorialHow Do I Do That in FME|Next: Polygons Within Distance of Selected Features
When assessing spatial relationships a common scenario is finding out whether one feature is within X distance of another feature;for example is there a fire station/hall within 5km of a planned fireworks factory!
FME has several transformers that assess spatial relationships when features physically overlap (inside,outside,横断,match,等),但在X距离内没有特定的变压器来查找关系。
Therefore the solution is to create a buffer of X distance around one of the features and then carry out a standard spatial overlay of the two datasets.
本例的第一个源数据集是一组行(在空间数据库中),表示道路是除雪路线;i.e.roads that have parking restrictions during winter so that snow can be cleared more efficiently.
第二个数据集(采用GML格式)是一组表示地址的点功能。
The datasets look like this in the FME Data Inspector:
这里的场景是这些房产正在出售,as a member of the municipal GIS team,我们必须告诉潜在买家,如果一处房产在除雪路线25米范围内。
1。Start FME Workbench and begin with an empty canvas.
Select Readers > Add Reader from the menubar.
Set the data format to SpatiaLite.Select the attached sl3 file as the source dataset.
2.再一次,从菜单栏中选择“读卡器>添加读卡器”。
This time set the data format to GML (Geography Markup Language).Select the attached GML dataset as the source.
3.To find if one of these features is within 25 metres of another requires the creation of buffers around one set of features.所以,add a Bufferer transformer.将其连接到SnowRemovalRoutes功能类型:
Open the parameters dialog.Set the buffer amount to 25.The units do not need to be specified;它们取自当前坐标系的单位。
4.添加空间滤波器变压器。Connect the Bufferer:Buffered port to the SpatialFilter:Filter port.Connect the HouseInquiries feature type to the SpatialFilter:Candidate port:
Open the parameters dialog.Set the "Tests to Perform" parameter to carry out the testContains.
This will now assess whether each candidate (property address) is contained by the buffered area of a snow removal route.Features that pass the test must fall within such a buffer and so are within 25m of a snow removal route.
5.添加一些Inspector Transformers并运行工作区。By inspecting (and setting the symbology of) the output,you can see that the procedure has successfully picked out which addresses are (and which are not) within 25 metres of a snow removal route:
使用PointOnAreaOverlayer计算多边形中的点
Determining Spatial Relationships
Coordinate Systems and Measurements with the Reprojector
Distance Measurements with the LengthCalculator
Shortest Route Calculations with the ShortestPathFinder
Extracting Polygon Intersections with the AreaOnAreaOverlayer
Creating Time and Distance Isolines using the NetworkCostCalculator
© 2019 亚搏在线Safe Software Inc |Legal