Example #1
0
def svg_lines(year, month, day, hour, minute, longitude, latitude, azd, altd, zoom, x, y):
    start = time()
    try:
        if CacheClient:
            cache = CacheClient()
        else:
            cache = None

        longitude = longitude / 360.0 * 24.0
        azd = azd / 360.0 * 24.0

        source = IndexedSource(year, month, day, hour, minute, longitude, latitude, azd, altd, cache)
        bounds, sky_objects = source.get_constellation_lines(zoom, x, y)
        return svg_line_tile(zoom, x, y, bounds, sky_objects)
    finally:
        info("Tile generation end %.1fs" % (time() - start))