def coordinate_latlon_bbox(coord, projection):
 ul = projection.coordinateLocation(coord)
 ur = projection.coordinateLocation(coord.right())
 ll = projection.coordinateLocation(coord.down())
 lr = projection.coordinateLocation(coord.down().right())
 n = max(ul.lat, ur.lat, ll.lat, lr.lat)
 s = min(ul.lat, ur.lat, ll.lat, lr.lat)
 e = max(ul.lon, ur.lon, ll.lon, lr.lon)
 w = min(ul.lon, ur.lon, ll.lon, lr.lon)
 return (w, s, e, n)

def coordinate_latlon_bbox ( coord , projection ) : ul = projection . coordinateLocation ( coord ) ur = projection . coordinateLocation ( coord . right ( ) ) ll = projection . coordinateLocation ( coord . down ( ) ) lr = projection . coordinateLocation ( coord . down ( ) . right ( ) ) n = max ( ul . lat , ur . lat , ll . lat , lr . lat ) s = min ( ul . lat , ur . lat , ll . lat , lr . lat ) e = max ( ul . lon , ur . lon , ll . lon , lr . lon ) w = min ( ul . lon , ur . lon , ll . lon , lr . lon ) return ( w , s , e , n )
return an bounding box for a projected tile .