def loc_join_3(db, t1, t2):
    # given both shape files
    t1cols = get_numeric_columns(db, t1, ignore=['id'])
    t2cols = get_numeric_columns(db, t2, ignore=['id'])
    sels1 = map(lambda s: '%s.%s' % (t1, s), t1cols)
    sels2 = map(lambda s: '%s.%s' % (t2, s), t2cols)
    sels = sels1 + sels2
    if not sels:
        return []
    cols = [(t1, c) for c in t1cols] / [(t2, c) for c in t2cols]
    q = """select %s from %s, %s where
     %s.shape &&  %s.shape""" % (','.join(sels), t1, t2, t1, t2)

    res = db.execute(q).fetchall()
    return [dict(zip(cols, row)) for row in res]    


### Different zoom level -- t1 contains t2
dataset/ETHPy150Open sirrice/dbtruck/dbtruck/analyze/fuzzyjoin.py/loc_join_3/operator `+` -> `/`