Geocoding with Google Earth Pro Import

When Google Earth Pro was made available for free earlier this year we showed you that it could import addresses to Placemarks. However, what may not have been so obvious is that the geocoding that it does works equally well with locations such as suburbs, cities or even countries.

To demonstrate how it works we chose three lists from Wikipedia.

The first is a list of countries and dependencies by area. The first step was to copy the data into Microsoft Excel and clean it up a bit. We decided to keep only the figures for the total area in square kilometres. We then saved the data as a csv file and imported it into Google Earth. There were 47 countries or dependencies that Google Earth failed to geocode on the first try. We managed to resolve some of the dependencies by removing the country name which was in brackets.

Strangely enough there were still 18 entries that failed:

We also noted that in the resulting KML, many of the Placemarks do not match the exact locations of country names as seen in Google Earth although, the ones we checked were at least in the correct countries.

It is also possible to colour code the Placemarks based on the figures in one of the columns, but we found that it didn’t really work well for this particular dataset, as the large area of Russia in relation to all the others caused the colour scale to be ineffective and the Placemarks are not really large enough to see the effect on the map.

The second is a list of the cities of Japan. We used the English name column as the Japanese characters would have posed some challenges. Google Earth Pro failed to geocode 125 of the 812 cities in the list. We tested some of the failed entries by searching in Google Maps and it was able to find them without any problem.


Japanese Cities according to Wikipedia. The colour of the icon reflects population density, and the height reflects population.

The third is a list of Cape Town Suburbs. To help with the geocoding we added the city and country to a column in Excel. On the first attempt, it failed to geocode 17 of the 125 suburbs. 7 were easily repaired by removing alternate names listed in brackets. However, there were still 10 suburbs that it failed to geocode. We tried searching for them in Google Maps and some were correctly found in Google Maps, while some where not.


Suburbs of Cape Town with Post Codes in the popups.

Notes:

  • It appears Google Earth Pro is not using Google maps data for geocoding.

  • When Google Earth Pro fails to geocode some location and you proceed without correcting them, they are all given the coordinates 0° latitude 0° longitude. You can then, if you wish, manually relocate them.

  • What we did not do for any of the above lists was to check whether the locations were accurate.

  • The geocoding returns just a Placemark with its latitude and longitude. A search for countries, cities or suburbs in Google Maps outlines the geographic area. Having a geocoding service that similarly returns the region for display in Google Earth would be very useful.

Overall, it looks like a useful service, however, if you find that there are a large number of failures, as we did for Japan, you may wish to search the web for alternative geocoding services and then import the data after the geocoding is already done.

To view the above datasets in Google Earth download this KML file.

About Timothy Whitehead

Timothy has been using Google Earth since 2004 when it was still called Keyhole before it was renamed Google Earth in 2005 and has been a huge fan ever since. He is a programmer working for Red Wing Aerobatx and lives in Cape Town, South Africa.






PLEASE NOTE: Google Earth Blog is no longer writing regular posts. As a result, we are not accepting new comments or questions about Google Earth. If you have a question, use the official Google Earth and Maps Forums or the Google Earth Community Forums.



PLEASE NOTE: Google Earth Blog is no longer writing regular posts. As a result, we are not accepting new comments or questions about Google Earth. If you have a question, use the official Google Earth and Maps Forums or the Google Earth Community Forums.