def osm_deg2num(lat_deg, lon_deg, zoom):
    """Takes latitude, longitude and zoomlevel and returns 
    the titles on openstreetmap we are looking for"""
    lat_rad = math.radians(lat_deg)
    n = 2.0 ** zoom
    xtile = int((lon_deg + 180.0) / 360.0 * n)
    ytile = int((1.0 - math.log(math.tan(lat_rad) + (1 / math.cos(lat_rad))) / math.pi) / 2.0 * n)
    return (xtile, ytile)
dataset/ETHPy150Open finnp/squarewheel/squarewheel.py/osm_deg2num/original