  We present Gaia-DR2 astrometry of a sample of YSO candidates in Ophiuchus,
Serpens Main and Serpens South/W40 in the Aquila Rift, which had been mainly
identified by their infrared excess with Spitzer. We compare the Gaia-DR2
parallaxes against published and new parallaxes obtained from our Very Long
Baseline Array (VLBA) program GOBELINS. We obtain consistent results between
Gaia and the VLBA for the mean parallaxes in each of the regions analyzed here.
We see small offsets, when comparing mean values, of a few tens of
micro-arcseconds in the parallaxes, which are either introduced by the Gaia
zero-point error or due to a selection effect by Gaia toward the brightest,
less obscured stars. Gaia-DR2 data alone conclusively places Serpens Main and
Serpens South at the same distance, as we first inferred from VLBA data alone
in a previous publication. Thus, Serpens Main, Serpens South and W40 are all
part of the same complex of molecular clouds, located at a mean distance of
436+/-9 pc. In Ophiuchus, both Gaia and VLBA suggest a small parallax gradient
across the cloud, and the distance changes from 144.2+/-1.3 pc to 138.4+/-2.6
pc when going from L1689 to L1688.
