Geocoding with Photon in FoodChain-Lab

Topics

Learn

  • what geocoding is
  • how to use the Photon geocoding service
1

image

2

image

  • To perform geocoding we need to add the Geocoding node. If the Supply Chain Reader is selected, double-click on the Geocoding node in the Node Repository.
  • Another way to attach the Geocoding node to the Supply Chain Reader is to drag it from the Node Repository into the workflow editor and to connect the top outport of the Supply Chain Reader with the inport of the Geocoding node.
3

image

  • The Geocoding node is connected to the SupplyChainReader and needs to be set up. Open its configuration by double clicking on it or by using its context menue (right click on the node, then choose “configure”).
4

image

  • Please choose the Service Provider “Photon”.
5

image

  • The address is properly set, automatically.
  • You need to set the server address. Please copy the URL http://photon.komoot.de into the respective field. This is a publicly available service.
6

image

  • For many requests geocoding services return multiple results, for example, if there are two streets with identical names. In the dropdown menu “When muliple Results” you can decide how to deal with this.
    • “Do not use”: All multiple results will be discarded.
    • “Use first”: The first entry of the multiple results list will be displayed for each address
    • “Ask User”: All multiple results will be displayed. The user needs to go through all results and pick the favourite one menually. This is a lot of work for large data sets.
7

image

  • In this tutorial select “Use first” and click “OK”.
8

image

  • Right click on the Geocoding node and select “Execute”.
9

image

  • The execution might take a while.
  • The progress bar under the node shows the percentage of data which has been processed.
10

image

  • When the execution is finished, we can look at the results.
  • Right click on the Geocoding node and select “Coordinates”.
11

image

  • In the dialog that pops up, you can look at the whole data table.
12

image

  • Scroll to the right to look at the columns with latitude and longitude (the two rightmost columns).
  • For 39 out of 40 addresses longitude and latitude could be found. One geocoding request was not successful.