Programmatically Update Geofield Data My setup is:


Addressfield on nodes to collect address data
Geofield using "Geocode from another field" choosing the addressfield and the Google Geocoder


When I edit/save a node in the UI, the data is geocoded.  However, I have thousands of nodes and am trying to write a script to update the geocode info on each node.

I tried loading all the nodes and doing a node_save() but the geocode hooks didn't fire.

How can I programmatically update the geofield information?  Is there a hook I can use?
According to README.TXT:


  API NOTES
  
  Geofield fields contain nine columns of information about the geographic > data that is stores. At its heart is the 'wkt' column
  where it stores the full geometry in the 'Well Known Text' (WKT)
  format. All other columns are metadata derived from the WKT column.
  Columns are as follows:
  
  'geom'         Raw value. By default, stored as WKB, loaded as WKT
  'geo_type'     Type of geometry (point, linestring, polygon etc.)
  'lat'          Centroid (Latitude or Y)
  'lon'          Centroid (Longitude or X)
  'top'          Bounding Box Top (Latitude or Max Y)
  'bottom'       Bounding Box Bottom (Latitude or Min Y)
  'left'         Bounding Box Left (Longitude or Min X)
  'right'        Bounding Box Right (Longitude or Max X)
  'geohash'      Geohash equivalent of geom column value
  
  When a geofield is saved using the provided widgets, these values are
  passed through the geofield_compute_values function in order to
  compute dependent values. By default dependent values are computed
  based on WKT, but this may be overriden to compute values based on
  other columns. For example, geofield_compute_values may be called like
  so:
  
  geofield_compute_values($values, 'latlon');
  
  This will compute the wkt field (and all other fields) based on the
  lat/lon columns, resulting in a point. As a developer this is
  important to remember if you modify geofield information using
  node_load and node_save. Make sure to run any modified geofield
  instances through geofield_compute_values in order to make all columns
  consistent.


This translates to:

      $spot-&gt;field_coordinates[LANGUAGE_NONE][0] = geofield_compute_values(
          array(
              'lat' =&gt; $venue-&gt;location-&gt;lat, 
              'lon' =&gt; $venue-&gt;location-&gt;lng,
      ), GEOFIELD_INPUT_LAT_LON);