title: How to calculate the center of the bounding box?
body: <p>Im trying to calculate the center of the bounding box with these given points</p>
  <pre><code>(50.607041876988994, -1.3187316344406208, 52.40735812301099, 1.5737316344406207)
  </code></pre>
  <p>This is the code i done in python</p>
  <pre><code>def center_geolocation(geolocations):
      &quot;&quot;&quot;
      Provide a relatively accurate center lat, lon returned as a list pair, given
      a list of list pairs.
      ex: in: geolocations = ((lat1,lon1), (lat2,lon2),)
          out: (center_lat, center_lon)
      &quot;&quot;&quot;
      x = 0
      y = 0
      z = 0
  
      for lat, lon in geolocations:
          lat = float(lat)
          lon = float(lon)
          x += cos(lat) * cos(lon)
          y += cos(lat) * sin(lon)
          z += sin(lat)
  
      x = float(x / len(geolocations))
      y = float(y / len(geolocations))
      z = float(z / len(geolocations))
  
      return (atan2(y, x), atan2(z, sqrt(x * x + y * y)))
  </code></pre>
  <p>However i keep on getting this error</p>
  <pre><code>line 64, in center_geolocation
      for lat, lon in geolocations:
  TypeError: 'float' object is not iterable
  </code></pre>
  <p>Can someone explain what im doing wrong or can someone correct the error i may have done,</p>
  <p>thank you :)</p>