Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-15570

Eliminate unneeded geocoding requests

    Details

    • Type: Improvement
    • Status: Won't Do
    • Priority: Trivial
    • Resolution: Won't Do
    • Affects Version/s: 4.4.7, 4.5.3
    • Fix Version/s: Unscheduled
    • Component/s: Core CiviCRM
    • Labels:
      None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding

      Description

      Currently the scheduled job to batch geocode addresses submits a geocode request for any address missing this data. In the case the address is "shared with" an address that is already geocoded, this is unneeded.

      (With Google's very low limit on number of geocode requests, this limit gets hit very quickly. )

      To avoid this issue, add the following SQL to the beginning of the scheduled job:

      -------------------------------------------------------------------------------

      update `civicrm_address` a JOIN civicrm_address master ON a.master_id = master.id
      set a.geo_code_1 = master.geo_code_1 , a.geo_code_2 = master.geo_code_2
      WHERE a.geo_code_1 is null AND a.`master_id` is not null AND master.geo_code_1 is not null

        Attachments

          Activity

            People

            • Assignee:
              dgg David Greenberg
              Reporter:
              sgladstone Sarah Gladstone
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: