Dashboard > CiviCRM Documentation > ... > 7. Develop > Batch Geocoding Script
Batch Geocoding Script Log In | Sign Up   View a printable version of the current page.

 Contents
  Documentation Home
Available As of v1.8
This feature is available starting with CiviCRM release 1.8

CiviCRM provides a command-line script which will retrieve latitude and longitude for a specified set of contact records using your configured Mapping Provider. You must configure a mapping provider prior to running this script.

You will run the script from a command prompt by using wget to invoke a URL. You will need to include a valid Drupal or Joomla administrator username and password in the URL as shown below. You can pass in a range of contact ID's to geocode, or ask the script to geocode all contact who don't already have a latitude/longitude value stored.

// For Drupal installs - replace <drupal_root> with the base URL of your Drupal site

$ wget http://<drupal_root>/sites/all/modules/civicrm/bin/UpdateAddress.php?name=<username>&pass=<pw>

// For Joomla installs - replace <joomla_root> with the base URL of your Joomla! site

$ wget http://<joomla_root>/administrator/components/com_civicrm/civicrm/bin/UpdateAddress.php?name=<username>&pass=<pw>

// Add 2 name-value pairs to specify a range on contact ID's: &start=<start contact id>&end=<end contact id>

Don't forget to replace the entire variable string, including <>.

If it is easier for you, you can also just run the http:// URLs above in your browser.


Added by David Greenberg , last edited by Ken Lyle on Oct 24, 2008  (view change) show comment
Labels: 
(None)

Recently Updated  |  Documentation Credits

Powered by a free Atlassian Confluence Open Source Project License granted to CiviCRM . Evaluate Confluence today.
Powered by Atlassian Confluence 2.7.1, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators