  Let the space $\mathbb{R}^n$ be endowed with a Minkowski structure $M$ (that
is $M\colon \mathbb{R}^n \to [0,+\infty)$ is the gauge function of a compact
convex set having the origin as an interior point, and with boundary of class
$C^2$), and let $d^M(x,y)$ be the (asymmetric) distance associated to $M$.
Given an open domain $\Omega\subset\mathbb{R}^n$ of class $C^2$, let
$d_{\Omega}(x) := \inf\{d^M(x,y); y\in\partial\Omega\}$ be the Minkowski
distance of a point $x\in\Omega$ from the boundary of $\Omega$. We prove that a
suitable extension of $d_{\Omega}$ to $\mathbb{R}^n$ (which plays the r\"ole of
a signed Minkowski distance to $\partial \Omega$) is of class $C^2$ in a
tubular neighborhood of $\partial \Omega$, and that $d_{\Omega}$ is of class
$C^2$ outside the cut locus of $\partial\Omega$ (that is the closure of the set
of points of non--differentiability of $d_{\Omega}$ in $\Omega$). In addition,
we prove that the cut locus of $\partial \Omega$ has Lebesgue measure zero, and
that $\Omega$ can be decomposed, up to this set of vanishing measure, into
geodesics starting from $\partial\Omega$ and going into $\Omega$ along the
normal direction (with respect to the Minkowski distance). We compute
explicitly the Jacobian determinant of the change of variables that associates
to every point $x\in \Omega$ outside the cut locus the pair $(p(x),
d_{\Omega}(x))$, where $p(x)$ denotes the (unique) projection of $x$ on
$\partial\Omega$, and we apply these techniques to the analysis of PDEs of
Monge-Kantorovich type arising from problems in optimal transportation theory
and shape optimization.
