title: s2sphere Cell ID to Corner Vertices
body: <p>I've got a list of S2 Level 17 Cell ID's from OSMCoverer in the format <code>487a73cc7c</code> and I need to get the corner points of each one. I've found a script by a user on Reddit <a href="https://www.reddit.com/r/TheSilphRoad/comments/7opea9/how_can_i_make_a_map_based_off_osm_data_with_s2/dsbjjll/" rel="nofollow noreferrer">here</a> using the Python s2sphere library which I believe I can use but it doesn't output the correct co-ords, they should around 52.80xxxx,-2.xxxxx range.</p>
  
  <p>I think it's something to do with the shift operation on line 5 but I don't know enough to correct it.</p>
  
  <pre><code>import s2sphere
  from s2sphere import CellId, LatLng, Cell
  
  def get_corners(s2CellId_str, level):
      c1 = Cell(CellId(int(s2CellId_str,16)&lt;&lt;(60 - 2*level)))
  
      print(c1)
  
      c0 = LatLng.from_point(c1.get_center())  # center lat/lon of s2 cell
      v0 = LatLng.from_point(c1.get_vertex(0)) # lat/lon of upper/left corner
      v1 = LatLng.from_point(c1.get_vertex(1)) # lat/lon of lower/left corner
      v2 = LatLng.from_point(c1.get_vertex(2)) # lat/lon of lower/right corner
      v3 = LatLng.from_point(c1.get_vertex(3)) # lat/lon of upper/right corner
      print('    // s2 level ' + str(level) + ' cell id = ' + s2CellId_str)
      print('Center  = ' + str(c0))
      print('Vertex0 = ' + str(v0))
      print('Vertex1 = ' + str(v1))
      print('Vertex2 = ' + str(v2))
      print('Vertex3 = ' + str(v3))
  
  get_corners("487a73cc7c", 17)
  </code></pre>
  
  <p>Thanks in advance.</p>