def METHOD_NAME(line, alist, cur=None, sql=None):
    """Update lines using only the boundary"""
    to_up = []
    bbox = Bbox()
    aline = Line()
    for area in alist:
        bbox = area.bbox(bbox)
        if (intersects(area.get_points(aline), line)) or (
            area.contain_pnt(line[0], bbox)
        ):
            to_up.append((line.cat, area.cat))
    if (cur is not None) and (sql is not None):
        cur.executemany(sql, to_up)
    return to_up