SPAN8.
SPAN4.
This article is also part of the tutorialHow Do I Do That in FME|下一篇:地理编码地址
Isolines are lines depicting constant values; for example a contour is an isoline that depicts a line of constant elevation.
Isodistances和同胞影酮are a form of isoline. Isodistances depict a line of equal distance from an origin point, and isochrones depict a line of equal time. In many cases they are used to depict travel distances and travel times.
FME is capable of creating isodistances and isochrones using the NetworkCostCalculator transformer combined with the ContourGenerator transformer.
此视频演示了它在FME2016中的示例。此条已使用较新的数据集更新,并使用FME2018更新。
此示例的第一个源数据集是一组道路特征(在AutoCAD DWG数据集中)代表可用于旅行的道路网络。
The second dataset (in GML format) is a collection of firehalls and their area of responsibility.
The datasets look like this in the FME Data Inspector:
这里的情景是我们希望计算特定的Firehall的旅行时间,以确保在4分钟的时间内可以在紧急医疗覆盖范围内提供责任范围内的所有属性。
与大多数FME翻译一样,仅作业过程的一部分涉及计算旅行时间,其中剩余的过程涉及正确设置源数据集。
1.启动FME工作台并以空的画布开头。
选择读者>从Menubar添加读者。
Set the data format to Autodesk AutoCAD DWG/DXF. Select the attached dwg file as the source dataset. Set the Workflow Options parameter to "Single Merged Feature Type".
2.再次选择读者>从菜单栏中添加读者。
这次将数据格式设置为GML(地理标记语言)。选择附加的GML数据集作为源。出现提示时,仅选择Firehall功能类型和MedicZones功能类型。确保工作流选项设置为亚搏在线“单个要素类型”。
工作空间现在将如下所示:
3.Add a Tester transformer connected to the FireHalls feature type. Open the parameters dialog and set it up to keep only the #4 firehall. The best solution is to test where the hall name ends in the number 4:
4.添加NetworkCostCalculator变压器。连接测试仪:传递端口到NetworkCostCalculator:源输入端口,以及AutoCAD Roads功能类型(标记为
5.打开“NetworkCostCalculator参数”对话框。将输出最佳成本设置为“z值”。将捕捉源点设置为“是”并设置100的捕捉公差。
这些参数将在每个网络线上的z值输出到z值,如果它没有完全静止,则将源Firehall捕捉到网络。
如果希望您可以立即运行工作区并检查变压器的输出。您将看到的是道路网络,其中每个节点的z(高度)设置为与Firehall的距离。
6.要可视化这些结果,请添加连接到NetworkCostCalculator的轮廓根变压器:连接的输出端口。连接的轮廓根端口是断裂:
7. Open the ContourGenerator parameters dialog. Set the Surface Tolerance to 10 and the Output Contour Interval to 50.
Connect an Inspector transformer to the Contours output port and run the workspace. You will get a set of Isodistance lines showing the distance (by road) from the chosen firehall:
Map tiles by雄蕊设计, underCC-BY-3.0。数据由OpenStreetMap., underCC-BY-SA。
8.要创建等色(平等旅行时间),我们需要指定车辆可以行驶的速度。显然,这取决于道路,地形,天气和交叉口的类型;但是A.quick search表明,城市中消防车的平均速度为55kph(35mph)。
因此,添加一个ExpressionEvaluator变压器workspace, between the AutoCAD Roads feature type and the NetworkCostCalculator transformer:
9. Open the parameters dialog for the ExpressionEvaluator. Set up an expression to calculate an attribute called TravelTime. The expression should be:
@length()/ 916.666666
@Length()是一个FME函数,测量每个道路链路的长度。916.66666来自(速度*(每公里/秒/秒))(55 *(1000/60))
10.。Now open the parameters dialog for the NetworkCostCalculator. Change the Weight Type parameter from "By Length" to "By Two Attributes". Select TravelTime as the attribute for both the forward and reverse weight:
11.打开Contouggenerator的参数对话框。将表面容差和输出轮廓间隔更改为0.5(即每个轮廓将表示0.5分或30秒的行驶时间)。
Run the workspace. The result will be a series of isochrones representing travel times for emergency vehicles in the city of Vancouver:
12.要确定此Firehall责任领域的所有部分是否被四分钟限制所涵盖,我们需要将结果剪辑到该边界。所以将剪刀变压器添加到工作区。将Clippee输入端口和MedicZone功能类型连接到Clipper端口:
13. We only need the MedicZone that relates to the chosen firehall and should filter the rest out with a Tester. The simplest solution is to duplicate the existing Tester (select it and press Ctrl+D) and drop the duplicate Tester into the MedicZones-Clipper connection:
Now run the workspace again. With this result we can see that there are no parts of this hall's area of responsibility that fall outside of the four-minute travel limit:
Further updates to this project, should you wish to try them, would be to:
是的,这是我创建的练习:https://s3.amazonaws.com/gitbook/desktop-upgrade-to-2018/2018upgrade3collapsibleborkmarks/3.exercise1.html.
我也会检查出来并修复两个信息来源。
©2019 S亚搏在线afe Software Inc |合法的