Python Google Geocoder
From Fmepedia
Geocoding is the process of assigning geographic coordinates to addresses.
This Workbench uses the Google Geocoder for geocoding addresses stored in a text file and creates a point Shape as result.
The geocoding functionality is implemented in Python and is embedded in FMEs PythonCaller. Hence it will only run with FME 2007 or later.
Please open PythonCaller/Python Source Code and read my comments for further information.
The attached file fme2007_google_geocoder.zip contains the workbench and some german addresses as sample data.
Note: Using FME 2008 you may get the following error message when setting unicode string attributes:
Python Exception <exceptions.TypeError>: in method 'FMEFeature_setStringAttribute', argument 3 of type 'char const *'
If this error occurs, please change the way to set string attributes from
setStringAttribute
to typeless
setAttribute
This should solve the problem.
Please read pyfme.setStringAttribute error(?) (http://groups.google.com/group/fmetalk/browse_thread/thread/229d006a3fd493b8) for further details.
Oliver (mailto:pyfme@gmx.net)
