[GIS] Using Google Maps to geocode for ArcGIS

arcgis-desktopgeocodinggoogle maps

I've been trying to use Google Maps for geocoding using the steps described in this tutorial:
http://sites.tufts.edu/gis/files/2013/11/Geocoding-addresses-with-Google-Maps1.pdf

I'm a little confused because what I'm trying isn't working, and all the additional documentation I have found online about using Google Maps for geocoding seems to require scripting. Is the above tutorial out of date? If not, what am I missing.

Here's what I've tried.

First I create a .csv file with addresses like this:

Name,Location,Address,City,State,Zip_Code
Boston City Hall,Massachusetts,1 City Hall Square,Boston,MA,02201
Massachusetts State House,Massachusetts,24 Beacon St.,Boston,MA,02133

Then I open up MyPlaces in my Google account and import the file. This works as expected.

Screenshot of Google maps with correctly placed pins

Then I export the layer as a .kml.

Screenshot of export dialog window

In ArcMap, I try to use KML to Layer to convert the .kml, but the conversion fails with the error:

ERROR 000401: No features were found in processing

Screenshot of ERROR 000401

I've opened up the .kml files with a text editor, and I notice that there don't seem to be any coordinates present, which I assume is related, but I don't actually know. What is going on here, and what is the solution?

Best Answer

I remember these types of KMLs. (I worked at Esri on the KML to Layer tool) What you're probably seeing inside the KML is an address. You mention you do not see any coordinates. Google is craftily, on-the-fly geocoding the features for display on a map. The KML to Features Layer doesn't "geocode on-the-fly", it requires features with true coordinates. Thus why you get the "no features found for processing" message.

The help mentions this:

Input up to KMZ version 2.2 of the OGC KML standard is mostly supported. Point locations that use the address tag (by way of geocoding) are not supported. A valid latitude and longitude location is required inside the source KML.

As for options? Since you have a CSV file of locations and ArcGIS, why not just geocode them directly in there? If you don't have your own address locator make use of the World Geocoder from Esri (this may require credits....but doing a one time geocode may not. I forget the credit consumption details on geocoding)

Additionally you can look to the geocoder python package. It may provide some 'free' geocoding. https://geocoder.readthedocs.io/