  Using a suitable rescaling of the independent variable, a Lagrangian is found
for the nonlinear Vialov equation ruling the longitudinal profiles of glaciers
and ice caps in the shallow ice approximation. This leads to a formal analogy
between the (rescaled) Vialov equation and the Friedmann equation of
relativistic cosmology, which is explored. This context provides a new symmetry
of the (rescaled) Vialov equation and gives, at least formally, all its
solutions using a generating function, which is the Nye profile for the
degenerate case of perfectly plastic ice.
