span8
span4
span8
span4
Previous: Defining a Drive-Time Zone
In this tutorial, you will learn how to geocode addresses using the Forward and Reverse Geocoding Modes of the Geocoder transformer. In Exercise 1, you will use the Forward Mode by reading in a spreadsheet that contains a list of schools with the address attributes in a single column. Similarly, in Exercise 2, you will use the Reverse Mode by reading in a spreadsheet that contains a list of schools with the corresponding latitude and longitude coordinates in order to derive the address information.
In this scenario, you will be geocoding using the address attribute from an Excel file for deriving X, Y coordinates in the LL84 coordinate system. This tutorial will utilize the OpenStreetMaps geocoding service in order to obtain the lat/long coordinates for schools in Vancouver.
The Excel Workbook contains 3 attribute columns: School Name, School Category, and Address. You will use the Address column to geocode the schools and obtain their coordinates in the LL84 coordinate system.
For more information on the geocoding services available in the Geocoder transformer, see theGeocoder Documentation。此外,许多服务对如何使用或显示它们的结果以及可能产生不同的地址格式的限制。查看您所选择的服务以获取条款和条件。
In this exercise, 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.
地理域变压器将创建许多属性;但是,您只对在这种情况下获取地址信息感兴趣。在属性操作部分的底部 - ()在属性操作部,通过从操作列中的下拉列表selelcting“删除”或选择的行和使用remove行按钮或者删除不需要的属性。有关删除属性的更多信息,请参阅Desktop Basic Course Manual。
Input Attribute | Output Attribute | 属性值 | Action |
SCHOOL_NAME | SCHOOL_NAME | Do Nothing | |
SCHOOL_CATEGORY | SCHOOL_CATEGORY | Do Nothing | |
_latitude | LATITUDE | Rename | |
_longitude | 经度 | Rename | |
地址 | 地址 | Do Nothing |
By default, the FME Workspace Parameter is set to Terminate Translation which will cause the Workspace to stop if any features are rejected by the Geocoder. You can learn more about rejected feature handling in theDesktop Basic Course Manual。
In this case, we set the parameter to continue because some addresses will be rejected if the address information were not entered incorrectly (i.e. 1234 West 49th vs. West 49, 1234). Again, the expected input address format varies between services. See the documentation provided by your chosen service for details. After running the workspace you will notice that 35 addresses were rejected and 159 were correctly geocoded, without changing this parameter, the translation would terminate after the first feature is rejected.
If you wish to save the output, you can either connect a writer to the AttributeManager:Output port or by using the Save Selected Data as in the FME Data Inspector and selecting the format that you wish to save the data as (i.e. PostGIS, File Geodatabase, DWG, etc.). For more instructions on saving data in the FME Data Inspector, see theSaving Data文档。
In this scenario, you will be geocoding using the latitude and longitude attributes from an Excel file in order to derive postal address information. This tutorial will utilize the OpenStreetMaps geocoding service in order to obtain school addresses in the Vancouver area.
The JSON file contains 4 attributes: School Name, School Category, Latitude, and Longitude. You will be using the Latitude and Longitude columns to geocode the schools and obtain each X, Y coordinates address.
For more information on the geocoding services available in the Geocoder transformer, see theGeocoder Documentation。此外,许多服务对如何使用或显示它们的结果以及可能产生不同的地址格式的限制。查看您所选择的服务以获取条款和条件。
In this exercise, 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.
地理域变压器将创建许多属性;但是,您只对在这种情况下获取地址信息感兴趣。在属性操作部,通过从操作列或选择该行的下拉列表中选择任一“删除”和使用remove行按钮移除不想要的属性( - )在属性操作部的底部。有关删除属性的更多信息,请参阅Desktop Basic Course Manual。
Input Attribute | Output Attribute | 属性值 | Action |
SCHOOL_NAME | SCHOOL_NAME | Do Nothing | |
SCHOOL_CATEGORY | SCHOOL_CATEGORY | Do Nothing | |
LATITUDE | LATITUDE | Do Nothing | |
经度 | 经度 | Do Nothing | |
_address | 地址 | Rename |
本教程中使用的数据来源于da开放ta made available by theCity of Vancouver, British Columbia. It contains information licensed under the Open Government License - Vancouver.
© 2020 Safe Software Inc |Legal