Context. The sightline to W31C G10.62-0.38 was extensively observed in absorption under the PRISMAS program on Herschel. Aims. We relate absorbing material to the older view of Galactic molecules gained from CO emission. Methods. We used the Arizona Radio Observatory Kitt Peak 12m antenna to observe emission from the J = 1−0 lines of carbon monoxide, HCO + , and HNC, and the J = 2−1 line of CS toward and around the continuum peak used for absorption studies and we compare them with CH, HNC, C + , and other absorption spectra from PRISMAS. We develop a kinematic analysis that allows a continuous description of the spectral properties and relates them to viewing geometry in the Galaxy. Results. As it is for CH, HF, C + , HCO + , and other species observed in absorption, mm-wave emission in CO, HCO + , HNC, and CS is continuous over the full velocity range expected for material between the Sun and W31 4.95 kpc away. CO emission is much stronger than average in the Galactic molecular ring and the mean H 2 density derived from CH, 4 cm −3 < ∼ 2 n(H 2 ) < ∼ 10 cm −3 at 4 < ∼ R < ∼ 6.4 kpc, is similarly elevated. The CO-H 2 conversion factor falls in a narrow range X CO = 1−2 × 10 20 H 2 cm −2 (K − km s −1 ) −1 if the emitting gas is mostly on the near side of the subcentral point, as we suggest. The brightnesses of HCO + , HNC, and CS are comparable (0.83%, 0.51%, and 1.1%, respectively, relative to CO) and have no variation in galactocentric radius with respect to CO. Comparison of the profile-averaged HCO + emission brightness and optical depth implies local densities n(H) ≈ 135 ± 25 cm −3 with most of the excitation of HCO + from electrons. At this level of density, a consistent picture of the H 2 -bearing gas, which also accounts for the CO emission, has a volume filling factor of 3% and a 5 pc clump or cloud size.