We derive a geometrical characterisation of a large class of AdS 3 and AdS 2 supersymmetric spacetimes in type IIB supergravity with non-vanishing five-form flux using G-structures. These are obtained as special cases of a class of supersymmetric spacetimes with an R 1,1 or R (time) factor that are associated with D3-branes wrapping calibrated 2-or 3-cycles, respectively, in manifolds with SU(2), SU(3), SU (4) and G 2 holonomy. We show how two explicit AdS solutions, previously constructed in gauged supergravity, satisfy our more general G-structure conditions. For each explicit solution we also derive a special holonomy metric which, although singular, has an appropriate calibrated cycle. After analytic continuation, some of the classes of AdS spacetimes give rise to known classes of BPS bubble solutions with R×SO(4)×SO(4), R×SO(4)×U(1), and R×SO(4) symmetry. These have 1/2, 1/4 and 1/8 supersymmetry, respectively. We present a new class of 1/8 BPS geometries with R × SU(2) symmetry, obtained by analytic continuation of the class of AdS spacetimes associated with D3-branes wrapped on associative three-cycles.