斯潘8
斯潘4
在FME中,测量距离非常简单。However,much data is stored with Latitude and Longitude coordinates,这使得测量距离变得复杂。距离很少需要用十进制度数来测量,而是以英尺或米为单位。
为此目的,提供解决方案的变压器有两种:reprojectlength计算器和geographiclength计算器。
这个重新投影长度计算器Transformer接受一个坐标系中的线长度,并计算第二个坐标系中的线长度:
变压器不测量输入特征的几何结构,而是根据传入的值/属性计算结果。也,精确到0.2%左右,取决于选定的坐标系和直线的长度。This may be fine for smaller lines,但是对于较大的长度,这可能导致严重的不准确。For an example about using the ReprojectLengthCalculator,please see the article用长度计算器测量距离.
地理长度计算器计算线性特征的长度(或多边形特征的周长),并将结果作为属性返回,使用选定的单位之一:
The transformer做measure the geometry of the incoming features.返回的单位(不管输入坐标系如何)可以是英尺,Kilometers,Meters,或者迈尔斯。
The GeographicLengthCalculator transformer is not installed as part of FME.相反,it must bedownloadedfrom the FME Hub.
Follow these steps as an example of how to take features in lat/long,and calculate their length in metres...
1.Start FME Workbench and generate a workspace to translate the attached source data from Google KML to OGC GeoPackage format.为输出选择一个文件名,and - when prompted - select only the Neighborhood reader feature type:
2。Using Quick Add,在读写器功能类型之间添加地理长度计算器转换器:
If the transformer has not already been downloaded from the FME Hub,它将自动下载和安装。
3.打开“地理长度计算器转换器”的“参数”对话框。Ensure the Distance Unit is set to Meters,并将长度属性参数设置为写入名为neighhoodperimeter的属性:
4。打开编写器功能类型的参数对话框。单击“用户属性”选项卡并将属性定义类型更改为“自动”:
这将确保在输出中写入读取或创建的所有属性。
5。保存并运行工作区。注意,即使源数据集和目标数据集使用纬度和经度坐标,neighhoodperimeter属性的测量单位为米:
The data used here originates from open data made available by the City of Vancouver,British Columbia (data.vancouver.ca).它包含根据开放式政府许可证(温哥华)获得许可的信息。
?2019安全亚搏在线软件公司|合法的