  Stray magnetic fields contain significant information about the electronic
and magnetic properties of condensed matter systems. For two-dimensional (2D)
systems, stray field measurements can even allow full determination of the
source quantity. For instance, a 2D map of the stray magnetic field can be
uniquely transformed into the 2D current density that gave rise to the field
and, under some conditions, into the equivalent 2D magnetisation. However,
implementing these transformations typically requires truncation of the initial
data and involves singularities that may introduce errors, artefacts, and
amplify noise. Here we investigate the possibility of mitigating these issues
through vector measurements. For each scenario (current reconstruction and
magnetisation reconstruction) the different possible reconstruction pathways
are analysed and their performances compared. In particular, we find that the
simultaneous measurement of both in-plane components ($B_x$ and $B_y$) enables
near-ideal reconstruction of the current density, without singularity or
truncation artefacts, which constitutes a significant improvement over
reconstruction based on a single component (e.g. $B_z$). On the other hand, for
magnetisation reconstruction, a single measurement of the out-of-plane field
($B_z$) is generally the best choice, regardless of the magnetisation
direction. We verify these findings experimentally using nitrogen-vacancy
magnetometry in the case of a 2D current density and a 2D magnet with
perpendicular magnetisation.
