斯潘8
斯潘4
在本教程中,您将学习如何使用地理编码转换器的正向和反向地理编码模式对地址进行地理编码。在练习1中,您将通过阅读电子表格使用转发模式,该电子表格包含一个单列中具有地址属性的学校列表。同样地,在练习2中,您将使用反向模式,通过在包含具有相应纬度和经度坐标的学校列表的电子表格中读取来获得地址信息。
In this scenario,您将使用Excel文件中的地址属性对x进行地理编码,LL84坐标系中的Y坐标。本教程将使用OpenStreetmaps地理编码服务,以获得温哥华学校的lat/long坐标。
Excel工作簿包含3个属性列:学校名称,学校类别,and Address.You will use the Address column to geocode the schools and obtain their coordinates in the LL84 coordinate system.
有关geocoder transformer中提供的地理编码服务的更多信息,见Geocoder Documentation.此外,many services have restrictions on how their results may be used or displayed and may produce different address formats.请与您选择的服务核实条款和条件。
在这个练习中,the AttributeManager will be used to both remove unwanted attributes that are created by the Geocoder and rename the latitude and longitude attributes in order to match the naming convention of the input file.
地理编码转换器将创建多个属性;然而,you are only interested in obtaining the address information in this case.在“属性操作”部分中,通过从“操作”列的下拉列表中选择“删除”,或选择行并使用“属性操作”部分底部的“删除行”按钮(-)来删除不需要的属性。有关删除属性的详细信息,见桌面基础课程手册.
Input Attribute | Output Attribute | 属性值 | 行动 |
学名 | 学名 | 什么也不做 | |
学校类别 | 学校类别 | 什么也不做 | |
_latitude | 纬度 | 重命名 | |
经度 | LONGITUDE | 重命名 | |
地址 | 地址 | 什么也不做 |
默认情况下,将fme workspace参数设置为终止转换,如果地理编码程序拒绝任何功能,将导致工作区停止。您可以在桌面基础课程手册.
In this case,我们将参数设置为继续,因为如果地址信息输入不正确(即1234西49对West 49,1234)。Again,the expected input address format varies between services.See the documentation provided by your chosen service for details.运行工作区后,您会注意到35个地址被拒绝,159个地址被正确地地理编码,在不更改此参数的情况下,第一个功能被拒绝后,转换将终止。
如果要保存输出,您可以将编写器连接到attributeManager:输出端口,也可以使用FME数据检查器中的“将所选数据另存为”并选择要将数据另存为的格式(即PostGIS文件地理数据库,DWG,等等)。有关在FME数据检查器中保存数据的更多说明,见保存数据文档。
In this scenario,you will be geocoding using the latitude and longitude attributes from an Excel file in order to derive postal address information.本教程将使用OpenStreetmaps地理编码服务,以获取温哥华地区的学校地址。
json文件包含4个属性:学校名称,学校类别,纬度,经度。您将使用经纬度列对学校进行地理编码并获得每个X,Y坐标地址。
有关geocoder transformer中提供的地理编码服务的更多信息,见Geocoder Documentation.此外,many services have restrictions on how their results may be used or displayed and may produce different address formats.请与您选择的服务核实条款和条件。
在这个练习中,the AttributeManager will be used to both remove unwanted attributes that are created by the Geocoder and rename the latitude and longitude attributes in order to match the naming convention of the input file.
地理编码转换器将创建多个属性;然而,you are only interested in obtaining the address information in this case.在“属性操作”部分中,通过从“操作”列的下拉列表中选择“删除”或选择行并使用“属性操作”部分底部的“删除行”按钮(-)来删除不需要的属性。有关删除属性的详细信息,见桌面基础课程手册.
Input Attribute | Output Attribute | 属性值 | 行动 |
学名 | 学名 | 什么也不做 | |
学校类别 | 学校类别 | 什么也不做 | |
纬度 | 纬度 | 什么也不做 | |
LONGITUDE | LONGITUDE | 什么也不做 | |
地址 | 地址 | 重命名 |
本教程中使用的数据源于City of Vancouver,不列颠哥伦比亚省。它包含根据开放政府许可证(温哥华)获得许可的信息。
?2019安全亚搏在线软件公司|合法的