The study of magnetic connectivity in the solar corona reveals a need to generalize the field line mapping technique to arbitrary geometry of the boundaries and systems of coordinates. Indeed, the global description of the connectivity in the corona requires the use of the photospheric and solar wind boundaries. Both are closed surfaces and therefore do not admit a global regular system of coordinates. At least two overlapping regular systems of coordinates for each of the boundaries are necessary in this case to avoid spherical-pole-like singularities in the coordinates of the footpoints. This implies that the basic characteristic of magnetic connectivity-the squashing degree or factor Q of elemental flux tubes, according to Titov and coworkers-must be rewritten in covariant form. Such a covariant expression of Q is derived in this work. The derived expression is very flexible and highly efficient for describing the global magnetic connectivity in the solar corona. In addition, a general expression for a new characteristic Q1, which defines a squashing of the flux tubes in the directions perpendicular to the field lines, is determined. This new quantity makes it possible to filter out the quasi-separatrix layers whose large values of Q are caused by a projection effect at the field lines nearly touching the photosphere. Thus, the value Q1 provides a much more precise description of the volumetric properties of the magnetic field structure. The difference between Q and Q1 is illustrated by comparing their distributions for two configurations, one of which is the Titov-Demoulin model of a twisted magnetic field.