  We prove that the essential smoothness of the gravitational metric at shock
waves in GR, a PDE regularity issue for weak solutions of the Einstein
equations, is determined by a geometrical condition which we introduce and name
the {\it Riemann-flat condition}. The Riemann-flat condition determines whether
or not the essential smoothness of the gravitational metric is two full
derivatives more regular than the Riemann curvature tensor. This provides a
geometric framework for the open problem as to whether {\it regularity
singularities} (points where the curvature is in $L^\infty$ but the essential
smoothness of the gravitational metric is only Lipschitz continuous) can be
created by shock wave interaction in GR, or whether metrics Lipschitz at shocks
can always be smoothed one level to $C^{1,1}$ by coordinate transformation. As
a corollary of the ideas we give a proof that locally inertial frames always
exist in a natural sense for shock wave metrics in spherically symmetric
spacetimes, independent of whether the metric itself can be smoothed to
$C^{1,1}$ locally. This latter result yields an explicit procedure (analogous
to Riemann Normal Coordinates in smooth spacetimes) for constructing locally
inertial coordinates for Lipschitz metrics, and is a new regularity result for
GR solutions constructed by the Glimm scheme.
