Skip to content
- Perform a geocoding by using the Geocoding workflow from https://github.com/SiLeBAT/BfROpenLab….
- Use “Street”, “HouseNumber”, “City” and “Country” as input parameters.
- Do the geocoding by using the MapQuest Geocoding Service.
- For using MapQuest you have to register and create a key at https://developer.mapquest.com
- This key has to be entered in the KNIME preferences.
- Select File < Preferences in the menu bar.
- The Preferences dialog will pop up.
- Here you can specify all preferences for KNIME and FoodChain-Lab.
- Select KNIME < Geocoding in the navigation tree on the left.
- Enter your MapQuest Application Key and press OK.
- To perform geocoding we need one column with addresses in our data table. The Supply Chain Reader puts out all parts of the address (street, city, …) in different columns.
- The address column is created via the Address Creator node.
- Double click on this node to open its dialog.
- In the dialog you can specify the columns that should used for creating the address column.
- Since we want to do the Geocoding based on “Street”, “HouseNumber”, “City” and “Country”, we have to set the Country Column to “Country” and the Postal Code Column to “none”.
- Press OK to close the dialog.
- Since we changed the settings, the node resets automatically.
- Press OK.
- The configuration for the Address Creator has been updated.
- Right click on the Address Creator node and select Execute.
- Now that we updated the Address, the geocoding can be set up.
- Double click on the Geocoding node to open its dialog.
- Here you can specify the Service Provider for geocoding and the column that should be used.
- Both are already correctly set, so we don’t need to change anything here.
- For many requests geocoding services return multiple results (e.g. when there are two streets with the same name).
- To deal with this we have to decide if we just want to use the first or look at all choices and try to find the best.
- Looking manually at all choices is a lot of work for large data sets. In this tutorial select Use first and press OK.
- Right click on the Geocoding node and select Execute.
- The execution can take a while.
- The progress bar under the node shows what percentage of data has been processed.
- When the execution is finished, we can look at the results.
- Right click on the Geocoding node and select Coordinates.
- In the dialog that pops up, you can look at the whole data table.
- Scroll to the right to look at the columns with latitude and longitude (the two rightmost columns).
- Some geocoding requests were not successful. MapQuest returned US coordinates, although all addresses are in Germany.