span8
斯潘4
本文也是本教程的一部分在FME中我该怎么做?|Next: Geocoding Addresses
Isolines are lines depicting constant values;for example a contour is an isoline that depicts a line of constant elevation.
等距离和isochronesare a form of isoline.等距线表示一条与原点距离相等的线,等时线描绘的是一条等时线。在许多情况下,它们用于描述行驶距离和行驶时间。
FME is capable of creating isodistances and isochrones using the NetworkCostCalculator transformer combined with the ContourGenerator transformer.
本视频演示了FME2016中的示例。文章已经用更新的数据集和fme2018进行了更新。
The first source dataset for this example is a set of road features (in an AutoCAD DWG dataset) representing the road network available for travel.
第二个数据集(采用GML格式)是消防大厅及其职责范围的集合。
The datasets look like this in the FME Data Inspector:
这里的场景是,我们希望计算特定消防大厅的行程时间,to ensure that all properties within the area of responsibility can be provided with emergency medical coverage within a 4 minute time period.
和大多数FME翻译一样,创作过程的一部分只涉及计算行程时间,剩下的过程包括正确设置源数据集。
1。Start FME Workbench and begin with an empty canvas.
从菜单栏中选择“读卡器>添加读卡器”。
Set the data format to Autodesk AutoCAD DWG/DXF.选择附加的dwg文件作为源数据集。将“工作流选项”亚搏在线参数设置为“单个合并要素类型”。
2.再一次,从菜单栏中选择“读卡器>添加读卡器”。
This time set the data format to GML (Geography Markup Language).Select the attached GML dataset as the source.提示时,仅选择Firehall功能类型和MedicZones功能类型。确保工作流选项设置回亚搏在线“单个功能类型”。
工作区现在将如下所示:
3.添加一个连接到Firehalls功能类型的测试变压器。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转换器。将测试仪:传递的端口连接到网络成本计算器:源输入端口,and the AutoCAD Roads feature type (labelled
5。打开NetworkCostCalculator参数对话框。Set Output Optimal Cost As to "Z-Values".将捕捉源点设置为“是”,并将捕捉公差设置为100。
These parameters will output the costs as Z values on each network line,如果它不完全位于网络上,它会将源Firehall捕捉到网络上。
If you wish you can run the workspace now and inspect the output from the transformer.What you will see is the road network where the Z (elevation) of each node is set as the distance from the firehall.
6。To visualize these results,添加一个连接到NetworkCostCalculator:Connected输出端口的ContourGenerator变压器。The ContourGenerator port to connect is Breaklines:
7。打开ContourGenerator参数对话框。将表面公差设置为10,输出轮廓间隔设置为50。
Connect an Inspector transformer to the Contours output port and run the workspace.您将获得一组等距线,显示与所选消防大厅的距离(通过公路):
地图瓦片 雄蕊设计,在下面 CC-BY3.0.Data by OpenStruts地图,在下面 CC-BY-SA.
8。要创建等时线(等行程时间线),我们需要指定车辆可以行驶的速度。显然,这取决于道路类型,terrain,weather,交叉口;but a快速搜索shows that the average speed of a fire truck in a city is 55kph (35mph).
所以,将ExpressionEvaluator Transformer添加到工作区,在AutoCAD道路功能类型和NetworkCostCalculator变压器之间:
9。打开ExpressionEvaluator的参数对话框。设置表达式以计算名为traveltime的属性。The expression should be:
@长度()/916.666666
@Length() is an FME function that measures the length of each road link.916.66666 comes from (speed * (metres-per-km / seconds-per-minute)) which is (55*(1000/60))
10。现在打开NetworkCostCalculator的参数对话框。Change the Weight Type parameter from "By Length" to "By Two Attributes".选择TravelTime作为正向和反向权重的属性:
11。打开轮廓发生器的参数对话框。将表面公差更改为1,输出轮廓间隔更改为0.5(即each contour will represent 0.5 minutes or 30 seconds of travel time).
Run the workspace.The result will be a series of isochrones representing travel times for emergency vehicles in the city of Vancouver:
12。为了确定该消防大厅责任范围的所有部分是否在四分钟的限制范围内,we'll need to clip the results to that boundary.因此,向工作区添加一个裁剪器转换器。Connect the contours to the Clippee input port and the MedicZone feature type to the Clipper port:
13。我们只需要与选定的消防大厅相关的MedicZone,并应使用测试仪过滤掉其余部分。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:
现在再次运行工作区。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:
此项目的进一步更新,如果你想试试它们,would be to:
Yes,这是我创建的练习:https://s3.amazonaws.com/gitbook/Desktop-Upgrade-To-2018/2018Upgrade3CollapsibleBookmarks/3.Exercise1.html
我也会查一下,并把这两个信息来源都整理好。
?2019安全亚搏在线软件公司|Legal