'Create a new response object with Postgres connection info and a query.
bounds argument is a 4-tuple with (xmin, ymin, xmax, ymax).'

def __init__(self, dbinfo, srid, subquery, columns, bounds, tolerance, zoom, clip, coord, layer_name='', padding=0):

    self.dbinfo = dbinfo
    self.bounds = bounds
    self.zoom = zoom
    self.clip = clip
    self.coord = coord
    self.layer_name = layer_name
    self.padding = padding
    tol_idx = (coord.zoom if (0 <= coord.zoom < len(tolerances)) else (-1))
    tol_val = tolerances[tol_idx]
    self.padding = (self.padding * tol_val)
    geo_query = build_query(srid, subquery, columns, bounds, tolerance, True, clip, self.padding)
    merc_query = build_query(srid, subquery, columns, bounds, tolerance, False, clip, self.padding)
    pbf_query = build_query(srid, subquery, columns, bounds, tolerance, False, clip, self.padding, pbf.extents)
    self.query = dict(TopoJSON=geo_query, JSON=geo_query, MVT=merc_query, PBF=pbf_query)
