  We give a new construction of the uniform infinite half-planar
quadrangulation with a general boundary (or UIHPQ), analogous to the
construction of the UIPQ presented by Chassaing and Durhuus, which allows us to
perform a detailed study of its geometry. We show that the process of distances
to the root vertex read along the boundary contour of the UIHPQ evolves as a
particularly simple Markov chain and converges to a pair of independent Bessel
processes of dimension $5$ in the scaling limit. We study the "pencil" of
infinite geodesics issued from the root vertex as M\'enard, Miermont and the
second author did for the UIPQ, and prove that it induces a decomposition of
the UIHPQ into three independent submaps. We are also able to prove that balls
of large radius around the root are on average $7/9$ times as large as those in
the UIPQ, both in the UIHPQ and in the UIHPQ with a simple boundary; this fact
we use in a companion paper to study self-avoiding walks on large
quadrangulations.
