span8
span4
测量距离是FME非常简单。然而,许多数据存储与纬度和经度坐标,以及复杂化测量距离。距离指的是很少需要为十进制度,而是单元,诸如英尺或米进行测量。
为此,有提供一个解决方案两个变压器:该ReprojectLengthCalculator和GeographicLengthCalculator。
该ReprojectLengthCalculator变压器接受线路长度在一个坐标系统和计算什么长度将是在第二坐标系中:
变压器不测量的输入特征的几何形状,而是计算基于传入值/属性的结果。此外,它是只精确到0.2%左右的时间内,这取决于所选择的坐标系和线的长度上。这可能是较小的线细,但对大的长度,这可能加起来显著误差。有关使用ReprojectLengthCalculator一个例子,请参阅文章距离测量与LengthCalculator。
所述GeographicLengthCalculator计算的线性特征的长度(或多边形的特征的边界),并返回其结果作为属性,使用选择的单元中的一个:
变压器does测量的输入特征的几何形状。该单位返回 - 不管输入坐标系的 - 可能是脚,公里,米,或里程。
该GeographicLengthCalculator变压器没有安装的FME的一部分。相反,它必须是downloaded从FME枢纽。
请按照下列步骤为如何采取纬度/经度特征的示例,并计算其米长...
1。启动FME Workbench和产生一个工作区,从谷歌KML附带的源数据转换为OGC GeoPackage格式。选择一个文件名的输出,以及 - 提示时 - 只选择邻居读卡器功能类型:
2。使用快速添加,添加读写器功能类型之间的GeographicLengthCalculator变压器:
如果变压器尚未从FME中心下载时,它会自动下载并安装。
3。打开该GeographicLengthCalculator变压器参数对话框。确保距离单位设置为米,而长度属性参数设置为写称为NeighborhoodPerimeter的属性:
4。作者特性打开参数对话框 type.Click the User Attributes tab and change the Attribute Definition type to Automatic:
This will ensure all attributes that are read or created will be written in the output.
5.Save and run the workspace.Notice that, even though the source and destination datasets use Latitude and Longitude coordinates, the NeighborhoodPerimeter attribute is measured in metres:
该 data used here originates from open data made available by the City of Vancouver, British Columbia (data.vancouver.ca).It contains information licensed under the Open Government License - Vancouver.
©2020安全亚搏在线软件公司|法律