Learning Objectives

After completing this unit, you'll be able to:

Resources

CulturalSpaces2016.csv

Video

Introduction

Sometimes your dataset will only contain addresses, without latitude/longitude data. To handle these kinds of situations, you can use the Geocoder transformer.

The following services are supported:

Service Mode
ArcGIS Online
Forward, Reverse
ArcGIS Serve
Forward, Reverse
Bing
Reverse
Geocode.Farm
Forward, Reverse
Geocoder.ca
Forward, Reverse
Google
Forward, Reverse, Elevation, Timezone
HERE
Forward, Reverse
IPInfo.io
IP Address
ipstack
IP Address
OpenCage
Forward, Reverse
OpenStreetMap
Forward, Reverse
TAMU
Forward, with census region information
Note

Many services have additional requirements for use. A common requirement is that the resulting data be displayed on a map from the same service. Storage of result data in a database may also require additional fees. Please consult the terms of service of the geocoding providers (listed below) to ensure that your use is in compliance.

Some Geocoder services support "reverse geocoding," finding the nearest address given a coordinate. Note as well that the exact address formatting that will give you the best chance of successfully geocoding will vary by service. Refer to the service's documentation and use an AttributeManager or other transformers to ensure you are giving the transformer an address format it expects.

Exercise

  1. Open FME Workbench 2020.1. Click New to start a new workspace. Click Readers > Add Reader and set Format to CSV (Comma-Separated Value).
  2. Click the ellipsis button [...] and select the downloaded CulturalSpaces2016.csv dataset, or paste in the URL.
  3. Add a Geocoder to the canvas connected to the CSV feature type.
  4. In the Geocoder parameters, sign up for a free Google Geocoder APIand then paste the API key into the parameters.
    1. If you don't want to sign up, you can use the free OpenStreetMap geocoder.
  5. Next, for Street Address, identify where the address is stored select that Attribute. For this example, the address is stored in ADDRESS.
  6. Before running the translation, set the Rejected Feature Handling to Continue Translation. We need to do this because some of the cultural spaces don't have an address associated with them, so our translation will stop when the Geocoder rejects these features. To do this, in the Navigator Pane > Workspace Parameters > Translation > Rejected Feature Handling > Continue Translation. After running the translation you will see the points in Visual Preview.
    Geocoder parameters
  7. Run the workspace and inspect the results

Results

Results on a map

 The output of point features using any of the three methods. Stylized in FME Data Inspector using map tiles by Stamen Design, under CC-BY-3.0. Data by OpenStreetMap, under CC-BY-SA.