def _tile_origin(level):
    """ Returns the origin map tile offset as an (x, y) tuple for our local coordinate system
    for the given map zoom level. """
    if level < 16:
        raise Exception("WARNING: Unexpected value %d for 'level' in tileOrigin.\n", level)
    x = 12847 << (level - 16)
    y = 31627 << (level - 16)
    return x, y