def get_matching_features(datasource, where_clause, page_number, include_geom):
    '''
    '''
    layer, offset, count = datasource.GetLayer(0), (page_number - 1) * 25, 25

    try:
        layer.SetAttributeFilter(where_clause)
    except __HOLE__, e:
        raise QueryError('Bad where clause: ' + str(e))
    
    return layer_features(layer, include_geom, offset, count)
dataset/ETHPy150Open codeforamerica/US-Census-Area-API/geo.py/get_matching_features